001 /*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License"). You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.admin.std.client;
028
029
030
031 import java.util.Collection;
032 import java.util.SortedSet;
033 import org.opends.server.admin.IllegalPropertyValueException;
034 import org.opends.server.admin.ManagedObjectDefinition;
035 import org.opends.server.admin.std.server.CharacterSetPasswordValidatorCfg;
036
037
038
039 /**
040 * A client-side interface for reading and modifying Character Set
041 * Password Validator settings.
042 * <p>
043 * The Character Set Password Validator determines whether a proposed
044 * password is acceptable by checking whether it contains a sufficient
045 * number of characters from one or more user-defined character sets.
046 */
047 public interface CharacterSetPasswordValidatorCfgClient extends PasswordValidatorCfgClient {
048
049 /**
050 * Get the configuration definition associated with this Character Set Password Validator.
051 *
052 * @return Returns the configuration definition associated with this Character Set Password Validator.
053 */
054 ManagedObjectDefinition<? extends CharacterSetPasswordValidatorCfgClient, ? extends CharacterSetPasswordValidatorCfg> definition();
055
056
057
058 /**
059 * Gets the "allow-unclassified-characters" property.
060 * <p>
061 * Indicates whether this password validator allows passwords to
062 * contain characters outside of any of the user-defined character
063 * sets.
064 * <p>
065 * If this is "false", then only those characters in the
066 * user-defined character sets may be used in passwords. Any password
067 * containing a character not included in any character set will be
068 * rejected.
069 *
070 * @return Returns the value of the "allow-unclassified-characters" property.
071 */
072 Boolean isAllowUnclassifiedCharacters();
073
074
075
076 /**
077 * Sets the "allow-unclassified-characters" property.
078 * <p>
079 * Indicates whether this password validator allows passwords to
080 * contain characters outside of any of the user-defined character
081 * sets.
082 * <p>
083 * If this is "false", then only those characters in the
084 * user-defined character sets may be used in passwords. Any password
085 * containing a character not included in any character set will be
086 * rejected.
087 *
088 * @param value The value of the "allow-unclassified-characters" property.
089 * @throws IllegalPropertyValueException
090 * If the new value is invalid.
091 */
092 void setAllowUnclassifiedCharacters(boolean value) throws IllegalPropertyValueException;
093
094
095
096 /**
097 * Gets the "character-set" property.
098 * <p>
099 * Specifies a character set containing characters that a password
100 * may contain and a value indicating the minimum number of
101 * characters required from that set.
102 * <p>
103 * Each value must be an integer (indicating the minimum required
104 * characters from the set) followed by a colon and the characters to
105 * include in that set (for example, "3:abcdefghijklmnopqrstuvwxyz"
106 * indicates that a user password must contain at least three
107 * characters from the set of lowercase ASCII letters). Multiple
108 * character sets can be defined in separate values, although no
109 * character can appear in more than one character set.
110 *
111 * @return Returns the values of the "character-set" property.
112 */
113 SortedSet<String> getCharacterSet();
114
115
116
117 /**
118 * Sets the "character-set" property.
119 * <p>
120 * Specifies a character set containing characters that a password
121 * may contain and a value indicating the minimum number of
122 * characters required from that set.
123 * <p>
124 * Each value must be an integer (indicating the minimum required
125 * characters from the set) followed by a colon and the characters to
126 * include in that set (for example, "3:abcdefghijklmnopqrstuvwxyz"
127 * indicates that a user password must contain at least three
128 * characters from the set of lowercase ASCII letters). Multiple
129 * character sets can be defined in separate values, although no
130 * character can appear in more than one character set.
131 *
132 * @param values The values of the "character-set" property.
133 * @throws IllegalPropertyValueException
134 * If one or more of the new values are invalid.
135 */
136 void setCharacterSet(Collection<String> values) throws IllegalPropertyValueException;
137
138
139
140 /**
141 * Gets the "java-class" property.
142 * <p>
143 * Specifies the fully-qualified name of the Java class that
144 * provides the password validator implementation.
145 *
146 * @return Returns the value of the "java-class" property.
147 */
148 String getJavaClass();
149
150
151
152 /**
153 * Sets the "java-class" property.
154 * <p>
155 * Specifies the fully-qualified name of the Java class that
156 * provides the password validator implementation.
157 *
158 * @param value The value of the "java-class" property.
159 * @throws IllegalPropertyValueException
160 * If the new value is invalid.
161 */
162 void setJavaClass(String value) throws IllegalPropertyValueException;
163
164 }