| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | | import static org.opends.server.messages.SchemaMessages.*; |
| | |
| | | public class UserPasswordSyntax |
| | | extends AttributeSyntax |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.schema.UserPasswordSyntax"; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | } |
| | | |
| | | |
| | |
| | | public void initializeSyntax(ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeSyntax", |
| | | String.valueOf(configEntry)); |
| | | |
| | | defaultEqualityMatchingRule = |
| | | DirectoryServer.getEqualityMatchingRule(EMR_USER_PASSWORD_EXACT_OID); |
| | |
| | | */ |
| | | public String getSyntaxName() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSyntaxName"); |
| | | |
| | | return SYNTAX_USER_PASSWORD_NAME; |
| | | } |
| | |
| | | */ |
| | | public String getOID() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOID"); |
| | | |
| | | return SYNTAX_USER_PASSWORD_OID; |
| | | } |
| | |
| | | */ |
| | | public String getDescription() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDescription"); |
| | | |
| | | return SYNTAX_USER_PASSWORD_DESCRIPTION; |
| | | } |
| | |
| | | */ |
| | | public EqualityMatchingRule getEqualityMatchingRule() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEqualityMatchingRule"); |
| | | |
| | | return defaultEqualityMatchingRule; |
| | | } |
| | |
| | | */ |
| | | public OrderingMatchingRule getOrderingMatchingRule() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOrderingMatchingRule"); |
| | | |
| | | // There is no ordering matching rule by default. |
| | | return null; |
| | |
| | | */ |
| | | public SubstringMatchingRule getSubstringMatchingRule() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSubstringMatchingRule"); |
| | | |
| | | // There is no substring matching rule by default. |
| | | return null; |
| | |
| | | */ |
| | | public ApproximateMatchingRule getApproximateMatchingRule() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getApproximateMatchingRule"); |
| | | |
| | | // There is no approximate matching rule by default. |
| | | return null; |
| | |
| | | public boolean valueIsAcceptable(ByteString value, |
| | | StringBuilder invalidReason) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value), |
| | | "java.lang.StringBuilder"); |
| | | |
| | | |
| | | // We have to accept any value here because in many cases the value will not |
| | |
| | | public static String[] decodeUserPassword(String userPasswordValue) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "decodeUserPassword", |
| | | String.valueOf(userPasswordValue)); |
| | | |
| | | |
| | | // Make sure that there actually is a value to decode. |
| | |
| | | */ |
| | | public static boolean isEncoded(ByteString value) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isEncoded", String.valueOf(value)); |
| | | |
| | | |
| | | // If the value is null or empty, then it's not. |