Class SAML2DateTimeAttributeTranscoder
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<DateTimeAttributeValue>
net.shibboleth.idp.saml.attribute.transcoding.impl.SAML2DateTimeAttributeTranscoder
- All Implemented Interfaces:
AttributeTranscoder<Attribute>,SAML2AttributeTranscoder<DateTimeAttributeValue>,Component,DestructableComponent,InitializableComponent
public class SAML2DateTimeAttributeTranscoder
extends AbstractSAML2AttributeTranscoder<DateTimeAttributeValue>
- Since:
- 4.3.0
-
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 StringOne of "ms" or "s", controlling the unit to use when converting to an epoch.Fields inherited from interface net.shibboleth.idp.saml.attribute.transcoding.SAML2AttributeTranscoder
PROP_ENCODE_TYPE, PROP_FRIENDLY_NAME, PROP_NAME, PROP_NAME_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanEncodeValue(IdPAttribute attribute, IdPAttributeValue value) protected IdPAttributeValuedecodeValue(ProfileRequestContext profileRequestContext, Attribute attribute, TranscodingRule rule, XMLObject value) protected XMLObjectencodeValue(ProfileRequestContext profileRequestContext, IdPAttribute attribute, TranscodingRule rule, DateTimeAttributeValue value) protected InstantgetDateTimeValue(TranscodingRule rule, Long value) Convert a long value into anInstant.protected InstantgetDateTimeValue(TranscodingRule rule, String value) Convert a string value into anInstant.protected InstantgetDateTimeValue(TranscodingRule rule, XMLObject object) Function to return an XML object in date/time form.Methods inherited from class net.shibboleth.idp.saml.attribute.transcoding.AbstractSAML2AttributeTranscoder
buildAttribute, buildIdPAttribute, 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, setActivationConditionMethods 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_EPOCH_UNITS
One of "ms" or "s", controlling the unit to use when converting to an epoch.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
SAML2DateTimeAttributeTranscoder
public SAML2DateTimeAttributeTranscoder()
-
-
Method Details
-
canEncodeValue
- Specified by:
canEncodeValuein classAbstractSAMLAttributeTranscoder<Attribute,DateTimeAttributeValue>
-
encodeValue
@Nullable protected XMLObject encodeValue(@Nullable ProfileRequestContext profileRequestContext, @Nonnull IdPAttribute attribute, @Nonnull TranscodingRule rule, @Nonnull DateTimeAttributeValue value) throws AttributeEncodingException - Specified by:
encodeValuein classAbstractSAMLAttributeTranscoder<Attribute,DateTimeAttributeValue> - Throws:
AttributeEncodingException
-
decodeValue
@Nullable protected IdPAttributeValue decodeValue(@Nullable ProfileRequestContext profileRequestContext, @Nonnull Attribute attribute, @Nonnull TranscodingRule rule, @Nullable XMLObject value) - Specified by:
decodeValuein classAbstractSAMLAttributeTranscoder<Attribute,DateTimeAttributeValue>
-
getDateTimeValue
@Nullable protected Instant getDateTimeValue(@Nonnull TranscodingRule rule, @Nonnull XMLObject object) Function to return an XML object in date/time form.- Parameters:
rule- transcoding ruleobject- object to decode- Returns:
- decoded date/time, or null
-
getDateTimeValue
Convert a string value into anInstant.- Parameters:
rule- transcoding rulevalue- input value- Returns:
- converted result or null
-
getDateTimeValue
Convert a long value into anInstant.- Parameters:
rule- transcoding rulevalue- input value- Returns:
- converted result
-