Interface AttributeTranscoderRegistry
- All Superinterfaces:
Component
,IdentifiedComponent
- All Known Implementing Classes:
AttributeTranscoderRegistryImpl
@ThreadSafe public interface AttributeTranscoderRegistry extends IdentifiedComponent
The transcoder registry provides access to "instructions" for converting between
the
IdPAttribute
"neutral" representation within the IdP and protocol-specific
forms such as SAML Attributes or OIDC claims.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AttributeTranscoderRegistry.NamingFunction<T>
Interface to a naming function that allows an object to be turned into a unique string name. -
Field Summary
Fields Modifier and Type Field Description static String
PROP_CONDITION
Property name for accessing an activation condition object to apply.static String
PROP_DECODER
Property prefix for indicating whether a rule applies to decoding.static String
PROP_DESCRIPTION
Property prefix for language-specific description of attribute.static String
PROP_DISPLAY_NAME
Property prefix for language-specific display name of attribute.static String
PROP_ENCODER
Property prefix for indicating whether a rule applies to encoding.static String
PROP_ID
Property name for accessing the name of theIdPAttribute
to decode into.static String
PROP_RELYINGPARTIES
Property name for accessing relying parties to wrap an activation condition around.static String
PROP_TRANSCODER
Property name for accessingAttributeTranscoder
object to use. -
Method Summary
Modifier and Type Method Description Map<Locale,String>
getDescriptions(IdPAttribute attribute)
Get the localized descriptions for anIdPAttribute
.Map<Locale,String>
getDisplayNames(IdPAttribute attribute)
Get the localized display names for anIdPAttribute
.Collection<TranscodingRule>
getTranscodingRules(IdPAttribute from, Class<?> to)
Obtains a set of instructions for encoding an inputIdPAttribute
into a target type.<T> Collection<TranscodingRule>
getTranscodingRules(T from)
Obtains a set of instructions for decoding an input object into anIdPAttribute
.Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
Field Details
-
PROP_ID
Property name for accessing the name of theIdPAttribute
to decode into.- See Also:
- Constant Field Values
-
PROP_TRANSCODER
Property name for accessingAttributeTranscoder
object to use.- See Also:
- Constant Field Values
-
PROP_CONDITION
Property name for accessing an activation condition object to apply.- See Also:
- Constant Field Values
-
PROP_RELYINGPARTIES
Property name for accessing relying parties to wrap an activation condition around.- See Also:
- Constant Field Values
-
PROP_DISPLAY_NAME
Property prefix for language-specific display name of attribute.- See Also:
- Constant Field Values
-
PROP_DESCRIPTION
Property prefix for language-specific description of attribute.- See Also:
- Constant Field Values
-
PROP_ENCODER
Property prefix for indicating whether a rule applies to encoding.- See Also:
- Constant Field Values
-
PROP_DECODER
Property prefix for indicating whether a rule applies to decoding.- See Also:
- Constant Field Values
-
-
Method Details
-
getDisplayNames
@Nonnull @NonnullElements @NotLive @Unmodifiable Map<Locale,String> getDisplayNames(@Nonnull IdPAttribute attribute)Get the localized display names for anIdPAttribute
.- Parameters:
attribute
- input attribute- Returns:
- map of locale-based names
-
getDescriptions
@Nonnull @NonnullElements @NotLive @Unmodifiable Map<Locale,String> getDescriptions(@Nonnull IdPAttribute attribute)Get the localized descriptions for anIdPAttribute
.- Parameters:
attribute
- input attribute- Returns:
- map of locale-based descriptions
-
getTranscodingRules
@Nonnull @NonnullElements @Unmodifiable Collection<TranscodingRule> getTranscodingRules(@Nonnull IdPAttribute from, @Nonnull Class<?> to)Obtains a set of instructions for encoding an inputIdPAttribute
into a target type.The principal property useful to a caller is
PROP_TRANSCODER
to obtain an instance of the appropriateAttributeTranscoder
to call, passing in the properties to drive that call.- Parameters:
from
- the input object to encodeto
- class of object being encoded- Returns:
- a collection of
TranscodingRule
objects, possibly empty
-
getTranscodingRules
@Nonnull @NonnullElements @Unmodifiable <T> Collection<TranscodingRule> getTranscodingRules(@Nonnull T from)Obtains a set of instructions for decoding an input object into anIdPAttribute
.The principal property useful to a caller is
PROP_TRANSCODER
to obtain an instance of the appropriateAttributeTranscoder
to call, passing in the properties to drive that call.- Type Parameters:
T
- the type of object to decode- Parameters:
from
- object to decode- Returns:
- a collection of
TranscodingRule
objects, possibly empty
-