Class CASDateTimeAttributeTranscoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.attribute.transcoding.AbstractAttributeTranscoder<Attribute>
-
- net.shibboleth.idp.cas.attribute.AbstractCASAttributeTranscoder<DateTimeAttributeValue>
-
- net.shibboleth.idp.cas.attribute.transcoding.impl.CASDateTimeAttributeTranscoder
-
- All Implemented Interfaces:
AttributeTranscoder<Attribute>,CASAttributeTranscoder,Component,DestructableComponent,InitializableComponent
public class CASDateTimeAttributeTranscoder extends AbstractCASAttributeTranscoder<DateTimeAttributeValue>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.shibboleth.idp.cas.attribute.AbstractCASAttributeTranscoder
AbstractCASAttributeTranscoder.NamingFunction
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.static StringPROP_EPOCH_UNITSOne of "ms" or "s", controlling the unit to use when converting to an epoch.-
Fields inherited from interface net.shibboleth.idp.cas.attribute.CASAttributeTranscoder
PROP_NAME
-
-
Constructor Summary
Constructors Constructor Description CASDateTimeAttributeTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEncodeValue(IdPAttribute attribute, IdPAttributeValue value)protected IdPAttributeValuedecodeValue(ProfileRequestContext profileRequestContext, Attribute attribute, TranscodingRule rule, String value)protected StringencodeValue(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.-
Methods inherited from class net.shibboleth.idp.cas.attribute.AbstractCASAttributeTranscoder
buildIdPAttribute, doDecode, doEncode, getEncodedName, getEncodedType
-
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
-
PROP_EPOCH_UNITS
@Nonnull @NotEmpty public static final String PROP_EPOCH_UNITS
One of "ms" or "s", controlling the unit to use when converting to an epoch.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
-
Method Detail
-
canEncodeValue
protected boolean canEncodeValue(@Nonnull IdPAttribute attribute, @Nonnull IdPAttributeValue value)- Specified by:
canEncodeValuein classAbstractCASAttributeTranscoder<DateTimeAttributeValue>
-
encodeValue
@Nullable protected String encodeValue(@Nullable ProfileRequestContext profileRequestContext, @Nonnull IdPAttribute attribute, @Nonnull TranscodingRule rule, @Nonnull DateTimeAttributeValue value) throws AttributeEncodingException
- Specified by:
encodeValuein classAbstractCASAttributeTranscoder<DateTimeAttributeValue>- Throws:
AttributeEncodingException
-
decodeValue
@Nullable protected IdPAttributeValue decodeValue(@Nullable ProfileRequestContext profileRequestContext, @Nonnull Attribute attribute, @Nonnull TranscodingRule rule, @Nullable String value)
- Specified by:
decodeValuein classAbstractCASAttributeTranscoder<DateTimeAttributeValue>
-
getDateTimeValue
@Nullable protected Instant getDateTimeValue(@Nonnull TranscodingRule rule, @Nullable String value)
Convert a string value into anInstant.- Parameters:
rule- transcoding rulevalue- input value- Returns:
- converted result or null
-
getDateTimeValue
@Nullable protected Instant getDateTimeValue(@Nonnull TranscodingRule rule, @Nonnull Long value)
Convert a long value into anInstant.- Parameters:
rule- transcoding rulevalue- input value- Returns:
- converted result
-
-