| | |
| | | public void initializeSyntax(ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | |
| | | defaultEqualityMatchingRule = |
| | | DirectoryServer.getEqualityMatchingRule(EMR_GENERALIZED_TIME_OID); |
| | | if (defaultEqualityMatchingRule == null) |
| | |
| | | */ |
| | | public String getSyntaxName() |
| | | { |
| | | |
| | | return SYNTAX_UTC_TIME_NAME; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getOID() |
| | | { |
| | | |
| | | return SYNTAX_UTC_TIME_OID; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getDescription() |
| | | { |
| | | |
| | | return SYNTAX_UTC_TIME_DESCRIPTION; |
| | | } |
| | | |
| | |
| | | */ |
| | | public EqualityMatchingRule getEqualityMatchingRule() |
| | | { |
| | | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | | |
| | |
| | | */ |
| | | public OrderingMatchingRule getOrderingMatchingRule() |
| | | { |
| | | |
| | | return defaultOrderingMatchingRule; |
| | | } |
| | | |
| | |
| | | */ |
| | | public SubstringMatchingRule getSubstringMatchingRule() |
| | | { |
| | | |
| | | return defaultSubstringMatchingRule; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ApproximateMatchingRule getApproximateMatchingRule() |
| | | { |
| | | |
| | | // Approximate matching will not be allowed by default. |
| | | return null; |
| | | } |
| | |
| | | public boolean valueIsAcceptable(ByteString value, |
| | | StringBuilder invalidReason) |
| | | { |
| | | |
| | | |
| | | // Get the value as a string and verify that it is at least long enough for |
| | | // "YYYYMMDDhhmmZ", which is the shortest allowed value. |
| | | String valueString = value.stringValue().toUpperCase(); |
| | |
| | | private boolean hasValidOffset(String value, int startPos, |
| | | StringBuilder invalidReason) |
| | | { |
| | | |
| | | |
| | | int offsetLength = value.length() - startPos; |
| | | if (offsetLength < 2) |
| | | { |
| | |
| | | */ |
| | | public static AttributeValue createUTCTimeValue(Date d) |
| | | { |
| | | |
| | | String valueString; |
| | | |
| | | dateFormatLock.lock(); |
| | |
| | | public static Date decodeUTCTimeValue(ByteString normalizedValue) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | String valueString = normalizedValue.stringValue(); |
| | | try |
| | | { |