public class GeneralizedTimeSyntax extends AttributeSyntax<AttributeSyntaxCfg>
Constructor and Description |
---|
GeneralizedTimeSyntax()
Creates a new instance of this syntax.
|
Modifier and Type | Method and Description |
---|---|
static org.forgerock.opendj.ldap.ByteString |
createGeneralizedTimeValue(long time)
Retrieves an attribute value containing a generalized time representation
of the provided date.
|
static long |
decodeGeneralizedTimeValue(org.forgerock.opendj.ldap.ByteSequence value)
Decodes the provided normalized value as a generalized time value and
retrieves a timestamp containing its representation.
|
static String |
format(Date d)
Retrieves the generalized time representation of the provided date.
|
static String |
format(long t)
Retrieves the generalized time representation of the provided date.
|
String |
getDescription()
Retrieves a description for this attribute syntax.
|
String |
getName()
Retrieves the common name for this attribute syntax.
|
String |
getOID()
Retrieves the OID for this attribute syntax.
|
org.forgerock.opendj.ldap.schema.Syntax |
getSDKSyntax(org.forgerock.opendj.ldap.schema.Schema schema)
Returns the SDK Syntax equivalent to this syntax.
|
equals, finalizeSyntax, getApproximateMatchingRule, getEqualityMatchingRule, getOrderingMatchingRule, getSubstringMatchingRule, hashCode, initializeSyntax, isBEREncodingRequired, isConfigurationAcceptable, isHumanReadable, toString, toString, valueIsAcceptable
public GeneralizedTimeSyntax()
initializeSyntax
method.public org.forgerock.opendj.ldap.schema.Syntax getSDKSyntax(org.forgerock.opendj.ldap.schema.Schema schema)
This method allow smooth migration to SDK syntax. It will disappear once the the migration to SDK schema is complete, together with this class and all its implementation.
getSDKSyntax
in class AttributeSyntax<AttributeSyntaxCfg>
schema
- Schema to use to retrieve the syntaxpublic String getName()
getName
in class AttributeSyntax<AttributeSyntaxCfg>
public String getOID()
getOID
in class AttributeSyntax<AttributeSyntaxCfg>
public String getDescription()
getDescription
in class AttributeSyntax<AttributeSyntaxCfg>
public static String format(Date d)
d
- The date to retrieve in generalized time form.public static String format(long t)
t
- The timestamp to retrieve in generalized time form.public static org.forgerock.opendj.ldap.ByteString createGeneralizedTimeValue(long time)
time
- The time for which to retrieve the generalized time value.public static long decodeGeneralizedTimeValue(org.forgerock.opendj.ldap.ByteSequence value) throws DirectoryException
value
- The normalized value to decode using the generalized time
syntax.DirectoryException
- If the provided value cannot be parsed as a
valid generalized time string.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.