Class AttributeContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.attribute.context.AttributeContext
All Implemented Interfaces:
Iterable<BaseContext>

@NotThreadSafe public final class AttributeContext extends BaseContext
A BaseContext that tracks a set of attributes. Usually the tracked attributes are about a particular user and associated with a particular service request.
  • Field Details

    • attributes

      @Nonnull @NonnullElements private Map<String,IdPAttribute> attributes
      The attributes tracked by this context.
    • unfilteredAttributes

      @Nullable @NonnullElements private Map<String,IdPAttribute> unfilteredAttributes
      The attributes tracked by this context prior to filtering.
    • consented

      private boolean consented
      Whether attribute release consent was obtained from the subject.
  • Constructor Details

    • AttributeContext

      public AttributeContext()
      Constructor.
  • Method Details

    • getIdPAttributes

      @Nonnull @NonnullElements @Unmodifiable @NotLive public Map<String,IdPAttribute> getIdPAttributes()
      Gets the map of attributes, indexed by attribute ID, tracked by this context.
      Returns:
      the collection of attributes indexed by attribute ID
    • setIdPAttributes

      @Nonnull public AttributeContext setIdPAttributes(@Nullable @NonnullElements Collection<IdPAttribute> newAttributes)
      Sets the attributes tracked by this context.
      Parameters:
      newAttributes - the attributes
      Returns:
      this context
    • getUnfilteredIdPAttributes

      @Nonnull @NonnullElements @Unmodifiable @NotLive public Map<String,IdPAttribute> getUnfilteredIdPAttributes()
      Gets the map of unfiltered attributes, indexed by attribute ID, tracked by this context.
      Returns:
      the collection of attributes indexed by attribute ID
    • setUnfilteredIdPAttributes

      @Nonnull public AttributeContext setUnfilteredIdPAttributes(@Nullable @NonnullElements Collection<IdPAttribute> newAttributes)
      Sets the unfiltered attributes tracked by this context.
      Parameters:
      newAttributes - the attributes
      Returns:
      this context
    • isConsented

      public boolean isConsented()
      Gets whether attribute release consent was obtained from the subject during this request but not stored.
      Returns:
      true iff consent was obtained during this request but not stored
      Since:
      4.2.0
    • setConsented

      @Nonnull public AttributeContext setConsented(boolean flag)
      Sets whether attribute release consent was obtained from the subject during this request but not stored.
      Parameters:
      flag - flag to set
      Returns:
      this context
      Since:
      4.2.0