Class ScopedAttributeDefinition

    • Constructor Detail

      • ScopedAttributeDefinition

        public ScopedAttributeDefinition()
    • Method Detail

      • getScope

        @Nullable
        public String getScope()
        Get scope value.
        Returns:
        Returns the scope.
      • setScope

        public void setScope​(@Nonnull @NotEmpty
                             String newScope)
        Set the scope for this definition.
        Parameters:
        newScope - what to set.
      • getScopeSource

        @Nullable
        public String getScopeSource()
        Get scope source (attribute id).
        Returns:
        Returns the scope.
      • setScopeSource

        public void setScopeSource​(@Nonnull @NotEmpty
                                   String attributeId)
        Set the source of the scope for this definition.
        Parameters:
        attributeId - what to set.
      • getScopeFromSource

        private String getScopeFromSource​(@Nonnull
                                          AttributeResolverWorkContext workContext)
                                   throws ResolutionException
        Lookup the source attribute in the resolved list.
        Parameters:
        workContext - where to look
        Returns:
        the single string value contained in the attribute
        Throws:
        ResolutionException - if the attribute was not there or if it didn't have only one string value
      • doAttributeDefinitionResolve

        @Nonnull
        protected IdPAttribute doAttributeDefinitionResolve​(@Nonnull
                                                            AttributeResolutionContext resolutionContext,
                                                            @Nonnull
                                                            AttributeResolverWorkContext workContext)
                                                     throws ResolutionException
        Creates and populates the values for the resolved attribute. Implementations should not set, or otherwise manage, the resolved attribute's display name, description or encoders. Nor should the resultant attribute be recorded in the given resolution context.
        Specified by:
        doAttributeDefinitionResolve in class AbstractAttributeDefinition
        Parameters:
        resolutionContext - current attribute resolution context
        workContext - current resolver work context
        Returns:
        resolved attribute or null if nothing to resolve.
        Throws:
        ResolutionException - thrown if there is a problem resolving and creating the attribute