Class SAML2XMLObjectAttributeTranscoder
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.attribute.transcoding.AbstractAttributeTranscoder<AttributeType>
net.shibboleth.idp.saml.attribute.transcoding.AbstractSAMLAttributeTranscoder<Attribute,EncodedType>
net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML2AttributeTranscoder<XMLObjectAttributeValue>
net.shibboleth.idp.saml.attribute.transcoding.impl.SAML2XMLObjectAttributeTranscoder
- All Implemented Interfaces:
AttributeTranscoder<Attribute>,SAML2AttributeTranscoder<XMLObjectAttributeValue>,Component,DestructableComponent,InitializableComponent
public class SAML2XMLObjectAttributeTranscoder
extends AbstractSAML2AttributeTranscoder<XMLObjectAttributeValue>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML2AttributeTranscoder
AbstractSAML2AttributeTranscoder.NamingFunction -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.static final StringProperty indicating whether to decode the AttributeValue element itself, or its child element.Fields inherited from interface net.shibboleth.idp.saml.attribute.transcoding.SAML2AttributeTranscoder
METADATA_TAG_NAME, PROP_ENCODE_TYPE, PROP_FRIENDLY_NAME, PROP_NAME, PROP_NAME_FORMAT, PROP_NAME_FROM_METADATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanEncodeValue(IdPAttribute attribute, IdPAttributeValue value) Checks if the given value can be handled by the transcoder.protected IdPAttributeValuedecodeValue(ProfileRequestContext profileRequestContext, Attribute attribute, TranscodingRule rule, XMLObject value) Function to decode a singleXMLObjectinto anIdPAttributeValue.protected XMLObjectencodeValue(ProfileRequestContext profileRequestContext, IdPAttribute attribute, TranscodingRule rule, XMLObjectAttributeValue value) Encodes an attribute value into a SAML AttributeValue element.Methods inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML2AttributeTranscoder
buildAttribute, buildIdPAttribute, encodeName, getEncodedName, getEncodedType, getValuesMethods inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAMLAttributeTranscoder
doDecode, doEncode, getStringValueMethods inherited from class net.shibboleth.idp.attribute.transcoding.AbstractAttributeTranscoder
decode, encode, getNameFromMetadata, setActivationCondition, setNameFromMetadataLookupStrategyMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.idp.attribute.transcoding.AttributeTranscoder
decode, encodeMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
PROP_INCLUDE_ATTR_VALUE
Property indicating whether to decode the AttributeValue element itself, or its child element.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
SAML2XMLObjectAttributeTranscoder
public SAML2XMLObjectAttributeTranscoder()
-
-
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:
canEncodeValuein classAbstractSAMLAttributeTranscoder<Attribute,XMLObjectAttributeValue> - 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 XMLObjectAttributeValue value) throws AttributeEncodingException Encodes an attribute value into a SAML AttributeValue element.- Specified by:
encodeValuein classAbstractSAMLAttributeTranscoder<Attribute,XMLObjectAttributeValue> - 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 Attribute attribute, @Nonnull TranscodingRule rule, @Nullable XMLObject value) Function to decode a singleXMLObjectinto anIdPAttributeValue.- Specified by:
decodeValuein classAbstractSAMLAttributeTranscoder<Attribute,XMLObjectAttributeValue> - Parameters:
profileRequestContext- current profile requestattribute- the attribute being decodedrule- properties to control decodingvalue- the value to decode- Returns:
- the returned final
IdPAttributeValueor null if decoding failed
-