Package net.shibboleth.idp.saml.attribute.transcoding.impl

# Class SAML1ScopedStringAttributeTranscoder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.attribute.transcoding.AbstractAttributeTranscoder<AttributeType>
net.shibboleth.idp.saml.attribute.transcoding.AbstractSAMLAttributeTranscoder<AttributeDesignator,EncodedType>
net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML1AttributeTranscoder<ScopedStringAttributeValue>
net.shibboleth.idp.saml.attribute.transcoding.impl.SAML1ScopedStringAttributeTranscoder

All Implemented Interfaces:
  `AttributeTranscoder<AttributeDesignator>`, `SAML1AttributeTranscoder<ScopedStringAttributeValue>`, `Component`, `DestructableComponent`, `InitializableComponent`

public class SAML1ScopedStringAttributeTranscoder extends AbstractSAML1AttributeTranscoder<ScopedStringAttributeValue>
`AttributeTranscoder` that supports `AttributeDesignator` and `ScopedStringAttributeValue` objects.

## Nested Class Summary

## Nested classes/interfaces inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML1AttributeTranscoder

`AbstractSAML1AttributeTranscoder.NamingFunction`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`static final String`
`PROP_SCOPE_ATTR_NAME`
Name of XML attribute when scopeType property is "attribute".
`static final String`
`PROP_SCOPE_DELIMITER`
Scope delimiter when scopeType property is "inline".
`static final String`
`PROP_SCOPE_TYPE`
One of "inline" or "attribute", controlling the style of XML encoding.

### Fields inherited from interface net.shibboleth.idp.saml.attribute.transcoding.SAML1AttributeTranscoder

`METADATA_TAG_NAME, PROP_ENCODE_TYPE, PROP_NAME, PROP_NAME_FROM_METADATA, PROP_NAMESPACE`

## Constructor Summary

Constructors
Constructor
Description
`SAML1ScopedStringAttributeTranscoder()`

## Method Summary

Modifier and Type
Method
Description
`protected boolean`
`canEncodeValue(IdPAttribute attribute, IdPAttributeValue value)`
Checks if the given value can be handled by the transcoder.
`protected IdPAttributeValue`
`decodeValue(ProfileRequestContext profileRequestContext, AttributeDesignator attribute, TranscodingRule rule, XMLObject value)`
Function to decode a single `XMLObject` into an `IdPAttributeValue`.
`protected XMLObject`
`encodeValue(ProfileRequestContext profileRequestContext, IdPAttribute attribute, TranscodingRule rule, ScopedStringAttributeValue value)`
Encodes an attribute value into a SAML AttributeValue element.

### Methods inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML1AttributeTranscoder

`buildAttribute, buildIdPAttribute, encodeName, getEncodedName, getEncodedType, getValues`

### Methods inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAMLAttributeTranscoder

`doDecode, doEncode, getStringValue`

### Methods inherited from class net.shibboleth.idp.attribute.transcoding.AbstractAttributeTranscoder

`decode, encode, getNameFromMetadata, setActivationCondition, setNameFromMetadataLookupStrategy`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.idp.attribute.transcoding.AttributeTranscoder

`decode, encode`

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

`initialize, isInitialized`

## Field Details

### PROP_SCOPE_TYPE

@Nonnull @NotEmpty public static final String PROP_SCOPE_TYPE
One of "inline" or "attribute", controlling the style of XML encoding.

See Also:
  - Constant Field Values

### PROP_SCOPE_ATTR_NAME

@Nonnull @NotEmpty public static final String PROP_SCOPE_ATTR_NAME
Name of XML attribute when scopeType property is "attribute".

See Also:
  - Constant Field Values

### PROP_SCOPE_DELIMITER

@Nonnull @NotEmpty public static final String PROP_SCOPE_DELIMITER
Scope delimiter when scopeType property is "inline".

See Also:
  - Constant Field Values

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

## Constructor Details

### SAML1ScopedStringAttributeTranscoder

public SAML1ScopedStringAttributeTranscoder()

## Method Details

### canEncodeValue

protected boolean canEncodeValue(@Nonnull IdPAttribute attribute, @Nonnull IdPAttributeValue value)
Checks if the given value can be handled by the transcoder.

In many cases this is simply a check to see if the given object is of the right type.

Specified by:
  `canEncodeValue` in class `AbstractSAMLAttributeTranscoder<AttributeDesignator,ScopedStringAttributeValue>`
Parameters:
  `attribute` - the attribute being encoded, never null
  `value` - the value to check, never null
Returns:
  true if the transcoder can encode this value, false if not

### encodeValue

@Nullable protected XMLObject encodeValue(@Nullable ProfileRequestContext profileRequestContext, @Nonnull IdPAttribute attribute, @Nonnull TranscodingRule rule, @Nonnull ScopedStringAttributeValue value) throws AttributeEncodingException
Encodes an attribute value into a SAML AttributeValue element.

Specified by:
  `encodeValue` in class `AbstractSAMLAttributeTranscoder<AttributeDesignator,ScopedStringAttributeValue>`
Parameters:
  `profileRequestContext` - current profile request
  `attribute` - the attribute being encoded
  `rule` - properties to control encoding
  `value` - the value to encode
Returns:
  the attribute value or null if the resulting attribute value would be empty
Throws:
  `AttributeEncodingException` - thrown if there is a problem encoding the attribute value

### decodeValue

@Nullable protected IdPAttributeValue decodeValue(@Nullable ProfileRequestContext profileRequestContext, @Nonnull AttributeDesignator attribute, @Nonnull TranscodingRule rule, @Nullable XMLObject value)
Function to decode a single `XMLObject` into an `IdPAttributeValue`.

Specified by:
  `decodeValue` in class `AbstractSAMLAttributeTranscoder<AttributeDesignator,ScopedStringAttributeValue>`
Parameters:
  `profileRequestContext` - current profile request
  `attribute` - the attribute being decoded
  `rule` - properties to control decoding
  `value` - the value to decode
Returns:
  the returned final `IdPAttributeValue` or null if decoding failed