Class AttributeResolutionContext

    • Field Detail

      • requestedAttributeNames

        @Nonnull
        @NonnullElements
        private Set<String> requestedAttributeNames
        (internal) Names of the attributes that have been requested to be resolved.
      • principal

        @Nullable
        private String principal
        The principal associated with this resolution.
      • attributeIssuerID

        @Nullable
        private String attributeIssuerID
        The attribute source identity.
      • attributeRecipientID

        @Nullable
        private String attributeRecipientID
        The attribute recipient identity.
      • attributeRecipientGroupID

        @Nullable
        private String attributeRecipientGroupID
        The attribute recipient's group identity.
      • allowCachedResults

        private boolean allowCachedResults
        Whether the resolver should allow for results to come from cache.
      • resolutionLabel

        @Nullable
        private String resolutionLabel
        Label distinguishing different "types" of attribute resolution for use in resolver.
    • Constructor Detail

      • AttributeResolutionContext

        public AttributeResolutionContext()
        Constructor.
    • Method Detail

      • getAllowCachedResults

        public boolean getAllowCachedResults()
        Get whether to allow for results from cache (defaults to true).
        Returns:
        whether to allow for results from cache
        Since:
        3.3.0
      • setAllowCachedResults

        @Nonnull
        public AttributeResolutionContext setAllowCachedResults​(boolean flag)
        Set whether to allow for results from cache.
        Parameters:
        flag - flag to set
        Returns:
        this context
        Since:
        3.3.0
      • getResolutionLabel

        @Nullable
        public String getResolutionLabel()
        Get the optional "contextual" label associated with this attribute resolution.

        Plugins/scripts/etc. can use this field to connect their behavior back to custom invocations of the resolver service.

        Returns:
        label
        Since:
        3.4.0
      • setResolutionLabel

        @Nonnull
        public AttributeResolutionContext setResolutionLabel​(@Nullable
                                                             String label)
        Set the optional "contextual" label associated with this attribute resolution.
        Parameters:
        label - label to set
        Returns:
        this context
        Since:
        3.4.0
      • getAttributeIssuerID

        @Nullable
        public String getAttributeIssuerID()
        Get the attribute issuer (me) associated with this resolution.
        Returns:
        the attribute issuer associated with this resolution.
      • setAttributeIssuerID

        @Nullable
        public AttributeResolutionContext setAttributeIssuerID​(@Nullable
                                                               String value)
        Set the attribute issuer (me) associated with this resolution.
        Parameters:
        value - the attribute issuer associated with this resolution.
        Returns:
        this context
      • getAttributeRecipientID

        @Nullable
        public String getAttributeRecipientID()
        Get the attribute recipient (her) associated with this resolution.
        Returns:
        the attribute recipient associated with this resolution.
      • setAttributeRecipientID

        @Nullable
        public AttributeResolutionContext setAttributeRecipientID​(@Nullable
                                                                  String value)
        Set the attribute recipient (her) associated with this resolution.
        Parameters:
        value - the attribute recipient associated with this resolution.
        Returns:
        this context
      • getAttributeRecipientGroupID

        @Nullable
        public String getAttributeRecipientGroupID()
        Get the attribute recipient grouping associated with this resolution.

        This is a protocol-independent way to represent an association between the attribute recipient and some larger group that may be relevant to attribute resolution.

        Returns:
        the attribute recipient group associated with this resolution
        Since:
        3.4.0
      • setAttributeRecipientGroupID

        @Nullable
        public AttributeResolutionContext setAttributeRecipientGroupID​(@Nullable
                                                                       String value)
        Set the attribute recipient grouping associated with this resolution.
        Parameters:
        value - the attribute recipient group associated with this resolution
        Returns:
        this context
        Since:
        3.4.0
      • getPrincipal

        @Nullable
        public String getPrincipal()
        Set the principal associated with this resolution.
        Returns:
        Returns the principal.
      • setPrincipal

        @Nullable
        public AttributeResolutionContext setPrincipal​(@Nullable
                                                       String who)
        Get the principal associated with this resolution.
        Parameters:
        who - the principal to set.
        Returns:
        this context
      • getRequestedIdPAttributeNames

        @Nonnull
        @NonnullElements
        @Live
        public Collection<String> getRequestedIdPAttributeNames()
        Get a live collection of the (internal) names of the attributes requested to be resolved.
        Returns:
        live collection of attributes requested to be resolved
      • setRequestedIdPAttributeNames

        @Nullable
        public AttributeResolutionContext setRequestedIdPAttributeNames​(@Nonnull @NonnullElements
                                                                        Collection<String> names)
        Set the (internal) names of the attributes requested to be resolved.
        Parameters:
        names - the (internal) names of the attributes requested to be resolved
        Returns:
        this context
      • resolveAttributes

        public void resolveAttributes​(@Nonnull
                                      ReloadableService<AttributeResolver> attributeResolverService)
        Helper method to invoke an AttributeResolver service using this context.
        Parameters:
        attributeResolverService - the service to invoke
        Since:
        3.3.0