Class AbstractSAML1AttributeTranscoder<EncodedType extends IdPAttributeValue>
- 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<EncodedType>
-
- Type Parameters:
EncodedType- the type of data that can be handled by the transcoder
- All Implemented Interfaces:
AttributeTranscoder<AttributeDesignator>,SAML1AttributeTranscoder<EncodedType>,Component,DestructableComponent,InitializableComponent
- Direct Known Subclasses:
SAML1ByteAttributeTranscoder,SAML1ScopedStringAttributeTranscoder,SAML1StringAttributeTranscoder,SAML1XMLObjectAttributeTranscoder
public abstract class AbstractSAML1AttributeTranscoder<EncodedType extends IdPAttributeValue> extends AbstractSAMLAttributeTranscoder<AttributeDesignator,EncodedType> implements SAML1AttributeTranscoder<EncodedType>
Base class for transcoders that operate on a SAML 1AttributeorAttributeDesignator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractSAML1AttributeTranscoder.NamingFunctionA function to produce a "canonical" name for a SAML 1AttributeDesignatorfor transcoding rules.
-
Field Summary
Fields Modifier and Type Field Description private SAMLObjectBuilder<Attribute>attributeBuilderBuilder used to constructAttributeobjects.private SAMLObjectBuilder<AttributeDesignator>designatorBuilderBuilder used to constructAttributeDesignatorobjects.private org.slf4j.LoggerlogClass logger.-
Fields inherited from interface net.shibboleth.idp.saml.attribute.transcoding.SAML1AttributeTranscoder
PROP_ENCODE_TYPE, PROP_NAME, PROP_NAMESPACE
-
-
Constructor Summary
Constructors Constructor Description AbstractSAML1AttributeTranscoder()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AttributeDesignatorbuildAttribute(ProfileRequestContext profileRequestContext, IdPAttribute attribute, Class<? extends AttributeDesignator> to, TranscodingRule rule, List<XMLObject> attributeValues)Builds a SAML attribute element from the given attribute values.protected IdPAttributebuildIdPAttribute(ProfileRequestContext profileRequestContext, AttributeDesignator attribute, TranscodingRule rule, List<IdPAttributeValue> attributeValues)Builds anIdPAttributefrom the given values.StringgetEncodedName(TranscodingRule rule)Get the name of the encoded object that would be created by a given set of instructions.Class<AttributeDesignator>getEncodedType()Get the class representing the type of object supported by this transcoder.protected Iterable<XMLObject>getValues(AttributeDesignator input)Returns the values to decode from the concrete input object.-
Methods inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAMLAttributeTranscoder
canEncodeValue, decodeValue, doDecode, doEncode, encodeValue, 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 Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
attributeBuilder
@Nonnull private final SAMLObjectBuilder<Attribute> attributeBuilder
Builder used to constructAttributeobjects.
-
designatorBuilder
@Nonnull private final SAMLObjectBuilder<AttributeDesignator> designatorBuilder
Builder used to constructAttributeDesignatorobjects.
-
-
Method Detail
-
getEncodedType
@Nonnull public Class<AttributeDesignator> getEncodedType()
Get the class representing the type of object supported by this transcoder.- Specified by:
getEncodedTypein interfaceAttributeTranscoder<EncodedType extends IdPAttributeValue>- Returns:
- object type supported
-
getEncodedName
@Nullable public String getEncodedName(@Nonnull TranscodingRule rule)
Get the name of the encoded object that would be created by a given set of instructions.- Specified by:
getEncodedNamein interfaceAttributeTranscoder<EncodedType extends IdPAttributeValue>- Parameters:
rule- properties governing the encoding process- Returns:
- a canonical name for objects produced by this transcoder for the given instructions
-
buildAttribute
@Nonnull protected AttributeDesignator buildAttribute(@Nullable ProfileRequestContext profileRequestContext, @Nullable IdPAttribute attribute, @Nonnull Class<? extends AttributeDesignator> to, @Nonnull TranscodingRule rule, @Nonnull @NonnullElements List<XMLObject> attributeValues) throws AttributeEncodingException
Builds a SAML attribute element from the given attribute values.- Specified by:
buildAttributein classAbstractSAMLAttributeTranscoder<AttributeDesignator,EncodedType extends IdPAttributeValue>- Parameters:
profileRequestContext- current profile requestattribute- the attribute being encodedto- target type to createrule- properties to control encodingattributeValues- the encoded values for the attribute- Returns:
- the SAML attribute object
- Throws:
AttributeEncodingException- thrown if there is a problem constructing the SAML attribute
-
buildIdPAttribute
@Nonnull protected IdPAttribute buildIdPAttribute(@Nullable ProfileRequestContext profileRequestContext, @Nonnull AttributeDesignator attribute, @Nonnull TranscodingRule rule, @Nonnull @NonnullElements List<IdPAttributeValue> attributeValues) throws AttributeDecodingException
Builds anIdPAttributefrom the given values.- Specified by:
buildIdPAttributein classAbstractSAMLAttributeTranscoder<AttributeDesignator,EncodedType extends IdPAttributeValue>- Parameters:
profileRequestContext- current profile requestattribute- the attribute being decodedrule- properties to control decodingattributeValues- the decoded values for the attribute- Returns:
- the IdPAttribute object
- Throws:
AttributeDecodingException- thrown if there is a problem constructing the IdPAttribute
-
getValues
@Nonnull protected Iterable<XMLObject> getValues(@Nonnull AttributeDesignator input)
Returns the values to decode from the concrete input object.- Specified by:
getValuesin classAbstractSAMLAttributeTranscoder<AttributeDesignator,EncodedType extends IdPAttributeValue>- Parameters:
input- input object- Returns:
- values to decode
-
-