Package net.shibboleth.idp.attribute.transcoding

# 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 final String`
`PROP_CONDITION`
Property name for accessing an activation condition object to apply.
`static final String`
`PROP_DECODER`
Property prefix for indicating whether a rule applies to decoding.
`static final String`
`PROP_DESCRIPTION`
Property prefix for language-specific description of attribute.
`static final String`
`PROP_DISPLAY_NAME`
Property prefix for language-specific display name of attribute.
`static final String`
`PROP_ENCODER`
Property prefix for indicating whether a rule applies to encoding.
`static final String`
`PROP_ID`
Property name for accessing the name of the `IdPAttribute` to decode into.
`static final String`
`PROP_RELYINGPARTIES`
Property name for accessing relying parties to wrap an activation condition around.
`static final String`
`PROP_TRANSCODER`
Property name for accessing `AttributeTranscoder` object to use.

## Method Summary

Modifier and Type
Method
Description
`Map<Locale,String>`
`getDescriptions(IdPAttribute attribute)`
Get the localized descriptions for an `IdPAttribute`.
`Map<Locale,String>`
`getDisplayNames(IdPAttribute attribute)`
Get the localized display names for an `IdPAttribute`.
`Collection<TranscodingRule>`
`getTranscodingRules(IdPAttribute from, Class<?> to)`
Obtains a set of instructions for encoding an input `IdPAttribute` into a target type.
`<T> Collection<TranscodingRule>`
`getTranscodingRules(T from)`
Obtains a set of instructions for decoding an input object into an `IdPAttribute`.

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

## Field Details

### PROP_ID

@Nonnull @NotEmpty static final String PROP_ID
Property name for accessing the name of the `IdPAttribute` to decode into.

See Also:
  - Constant Field Values

### PROP_TRANSCODER

@Nonnull @NotEmpty static final String PROP_TRANSCODER
Property name for accessing `AttributeTranscoder` object to use.

See Also:
  - Constant Field Values

### PROP_CONDITION

@Nonnull @NotEmpty static final String PROP_CONDITION
Property name for accessing an activation condition object to apply.

See Also:
  - Constant Field Values

### PROP_RELYINGPARTIES

@Nonnull @NotEmpty static final String PROP_RELYINGPARTIES
Property name for accessing relying parties to wrap an activation condition around.

See Also:
  - Constant Field Values

### PROP_DISPLAY_NAME

@Nonnull @NotEmpty static final String PROP_DISPLAY_NAME
Property prefix for language-specific display name of attribute.

See Also:
  - Constant Field Values

### PROP_DESCRIPTION

@Nonnull @NotEmpty static final String PROP_DESCRIPTION
Property prefix for language-specific description of attribute.

See Also:
  - Constant Field Values

### PROP_ENCODER

@Nonnull @NotEmpty static final String PROP_ENCODER
Property prefix for indicating whether a rule applies to encoding.

See Also:
  - Constant Field Values

### PROP_DECODER

@Nonnull @NotEmpty static final String PROP_DECODER
Property prefix for indicating whether a rule applies to decoding.

See Also:
  - Constant Field Values

## Method Details

### getDisplayNames

@Nonnull @NotLive @Unmodifiable Map<Locale,String> getDisplayNames(@Nonnull IdPAttribute attribute)
Get the localized display names for an `IdPAttribute`.

Parameters:
  `attribute` - input attribute
Returns:
  map of locale-based names

### getDescriptions

@Nonnull @NotLive @Unmodifiable Map<Locale,String> getDescriptions(@Nonnull IdPAttribute attribute)
Get the localized descriptions for an `IdPAttribute`.

Parameters:
  `attribute` - input attribute
Returns:
  map of locale-based descriptions

### getTranscodingRules

@Nonnull @Unmodifiable @NotLive Collection<TranscodingRule> getTranscodingRules(@Nonnull IdPAttribute from, @Nonnull Class<?> to)
Obtains a set of instructions for encoding an input `IdPAttribute` into a target type.

The principal property useful to a caller is `PROP_TRANSCODER` to obtain an instance of the appropriate `AttributeTranscoder` to call, passing in the properties to drive that call.

Parameters:
  `from` - the input object to encode
  `to` - class of object being encoded
Returns:
  a collection of `TranscodingRule` objects, possibly empty

### getTranscodingRules

@Nonnull @Unmodifiable @NotLive <T> Collection<TranscodingRule> getTranscodingRules(@Nonnull T from)
Obtains a set of instructions for decoding an input object into an `IdPAttribute`.

The principal property useful to a caller is `PROP_TRANSCODER` to obtain an instance of the appropriate `AttributeTranscoder` 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