001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.forgerock.opendj.server.config.client;
017
018
019
020import org.forgerock.opendj.config.ManagedObjectDefinition;
021import org.forgerock.opendj.config.PropertyException;
022import org.forgerock.opendj.server.config.server.UniqueCharactersPasswordValidatorCfg;
023
024
025
026/**
027 * A client-side interface for reading and modifying Unique Characters
028 * Password Validator settings.
029 * <p>
030 * The Unique Characters Password Validator is used to determine
031 * whether a proposed password is acceptable based on the number of
032 * unique characters that it contains.
033 */
034public interface UniqueCharactersPasswordValidatorCfgClient extends PasswordValidatorCfgClient {
035
036  /**
037   * Get the configuration definition associated with this Unique Characters Password Validator.
038   *
039   * @return Returns the configuration definition associated with this Unique Characters Password Validator.
040   */
041  ManagedObjectDefinition<? extends UniqueCharactersPasswordValidatorCfgClient, ? extends UniqueCharactersPasswordValidatorCfg> definition();
042
043
044
045  /**
046   * Gets the "case-sensitive-validation" property.
047   * <p>
048   * Indicates whether this password validator should treat password
049   * characters in a case-sensitive manner.
050   * <p>
051   * A value of true indicates that the validator does not consider a
052   * capital letter to be the same as its lower-case counterpart. A
053   * value of false indicates that the validator ignores differences in
054   * capitalization when looking at the number of unique characters in
055   * the password.
056   *
057   * @return Returns the value of the "case-sensitive-validation" property.
058   */
059  Boolean isCaseSensitiveValidation();
060
061
062
063  /**
064   * Sets the "case-sensitive-validation" property.
065   * <p>
066   * Indicates whether this password validator should treat password
067   * characters in a case-sensitive manner.
068   * <p>
069   * A value of true indicates that the validator does not consider a
070   * capital letter to be the same as its lower-case counterpart. A
071   * value of false indicates that the validator ignores differences in
072   * capitalization when looking at the number of unique characters in
073   * the password.
074   *
075   * @param value The value of the "case-sensitive-validation" property.
076   * @throws PropertyException
077   *           If the new value is invalid.
078   */
079  void setCaseSensitiveValidation(boolean value) throws PropertyException;
080
081
082
083  /**
084   * Gets the "java-class" property.
085   * <p>
086   * Specifies the fully-qualified name of the Java class that
087   * provides the password validator implementation.
088   *
089   * @return Returns the value of the "java-class" property.
090   */
091  String getJavaClass();
092
093
094
095  /**
096   * Sets the "java-class" property.
097   * <p>
098   * Specifies the fully-qualified name of the Java class that
099   * provides the password validator implementation.
100   *
101   * @param value The value of the "java-class" property.
102   * @throws PropertyException
103   *           If the new value is invalid.
104   */
105  void setJavaClass(String value) throws PropertyException;
106
107
108
109  /**
110   * Gets the "min-unique-characters" property.
111   * <p>
112   * Specifies the minimum number of unique characters that a password
113   * will be allowed to contain.
114   * <p>
115   * A value of zero indicates that no minimum value is enforced.
116   *
117   * @return Returns the value of the "min-unique-characters" property.
118   */
119  Integer getMinUniqueCharacters();
120
121
122
123  /**
124   * Sets the "min-unique-characters" property.
125   * <p>
126   * Specifies the minimum number of unique characters that a password
127   * will be allowed to contain.
128   * <p>
129   * A value of zero indicates that no minimum value is enforced.
130   *
131   * @param value The value of the "min-unique-characters" property.
132   * @throws PropertyException
133   *           If the new value is invalid.
134   */
135  void setMinUniqueCharacters(int value) throws PropertyException;
136
137}