Class SAML1ByteAttributeTranscoder
java.lang.Object
net.shibboleth.utilities.java.support.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<ByteAttributeValue>
net.shibboleth.idp.saml.attribute.transcoding.impl.SAML1ByteAttributeTranscoder
- All Implemented Interfaces:
AttributeTranscoder<AttributeDesignator>
,SAML1AttributeTranscoder<ByteAttributeValue>
,Component
,DestructableComponent
,InitializableComponent
public class SAML1ByteAttributeTranscoder
extends AbstractSAML1AttributeTranscoder<ByteAttributeValue>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML1AttributeTranscoder
AbstractSAML1AttributeTranscoder.NamingFunction
-
Field Summary
FieldsFields inherited from interface net.shibboleth.idp.saml.attribute.transcoding.SAML1AttributeTranscoder
PROP_ENCODE_TYPE, PROP_NAME, PROP_NAMESPACE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 singleXMLObject
into anIdPAttributeValue
.protected XMLObject
encodeValue
(ProfileRequestContext profileRequestContext, IdPAttribute attribute, TranscodingRule rule, ByteAttributeValue value) Encodes an attribute value into a SAML AttributeValue element.Methods inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML1AttributeTranscoder
buildAttribute, buildIdPAttribute, 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, setActivationCondition
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, 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.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
SAML1ByteAttributeTranscoder
public SAML1ByteAttributeTranscoder()
-
-
Method Details
-
canEncodeValue
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 classAbstractSAMLAttributeTranscoder<AttributeDesignator,
ByteAttributeValue> - Parameters:
attribute
- the attribute being encoded, never nullvalue
- 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 ByteAttributeValue value) throws AttributeEncodingException Encodes an attribute value into a SAML AttributeValue element.- Specified by:
encodeValue
in classAbstractSAMLAttributeTranscoder<AttributeDesignator,
ByteAttributeValue> - Parameters:
profileRequestContext
- current profile requestattribute
- the attribute being encodedrule
- properties to control encodingvalue
- 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 singleXMLObject
into anIdPAttributeValue
.- Specified by:
decodeValue
in classAbstractSAMLAttributeTranscoder<AttributeDesignator,
ByteAttributeValue> - Parameters:
profileRequestContext
- current profile requestattribute
- the attribute being decodedrule
- properties to control decodingvalue
- the value to decode- Returns:
- the returned final
IdPAttributeValue
or null if decoding failed
-