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.RandomPasswordGeneratorCfg;
036
037
038
039 /**
040 * A client-side interface for reading and modifying Random Password
041 * Generator settings.
042 * <p>
043 * The Random Password Generator creates random passwords based on
044 * fixed-length strings built from one or more character sets.
045 */
046 public interface RandomPasswordGeneratorCfgClient extends PasswordGeneratorCfgClient {
047
048 /**
049 * Get the configuration definition associated with this Random Password Generator.
050 *
051 * @return Returns the configuration definition associated with this Random Password Generator.
052 */
053 ManagedObjectDefinition<? extends RandomPasswordGeneratorCfgClient, ? extends RandomPasswordGeneratorCfg> definition();
054
055
056
057 /**
058 * Gets the "java-class" property.
059 * <p>
060 * Specifies the fully-qualified name of the Java class that
061 * provides the Random Password Generator implementation.
062 *
063 * @return Returns the value of the "java-class" property.
064 */
065 String getJavaClass();
066
067
068
069 /**
070 * Sets the "java-class" property.
071 * <p>
072 * Specifies the fully-qualified name of the Java class that
073 * provides the Random Password Generator implementation.
074 *
075 * @param value The value of the "java-class" property.
076 * @throws IllegalPropertyValueException
077 * If the new value is invalid.
078 */
079 void setJavaClass(String value) throws IllegalPropertyValueException;
080
081
082
083 /**
084 * Gets the "password-character-set" property.
085 * <p>
086 * Specifies one or more named character sets.
087 * <p>
088 * This is a multi-valued property, with each value defining a
089 * different character set. The format of the character set is the
090 * name of the set followed by a colon and the characters that are in
091 * that set. For example, the value
092 * "alpha:abcdefghijklmnopqrstuvwxyz" defines a character set named
093 * "alpha" containing all of the lower-case ASCII alphabetic
094 * characters.
095 *
096 * @return Returns the values of the "password-character-set" property.
097 */
098 SortedSet<String> getPasswordCharacterSet();
099
100
101
102 /**
103 * Sets the "password-character-set" property.
104 * <p>
105 * Specifies one or more named character sets.
106 * <p>
107 * This is a multi-valued property, with each value defining a
108 * different character set. The format of the character set is the
109 * name of the set followed by a colon and the characters that are in
110 * that set. For example, the value
111 * "alpha:abcdefghijklmnopqrstuvwxyz" defines a character set named
112 * "alpha" containing all of the lower-case ASCII alphabetic
113 * characters.
114 *
115 * @param values The values of the "password-character-set" property.
116 * @throws IllegalPropertyValueException
117 * If one or more of the new values are invalid.
118 */
119 void setPasswordCharacterSet(Collection<String> values) throws IllegalPropertyValueException;
120
121
122
123 /**
124 * Gets the "password-format" property.
125 * <p>
126 * Specifies the format to use for the generated password.
127 * <p>
128 * The value is a comma-delimited list of elements in which each of
129 * those elements is comprised of the name of a character set defined
130 * in the password-character-set property, a colon, and the number of
131 * characters to include from that set. For example, a value of
132 * "alpha:3,numeric:2,alpha:3" generates an 8-character password in
133 * which the first three characters are from the "alpha" set, the
134 * next two are from the "numeric" set, and the final three are from
135 * the "alpha" set.
136 *
137 * @return Returns the value of the "password-format" property.
138 */
139 String getPasswordFormat();
140
141
142
143 /**
144 * Sets the "password-format" property.
145 * <p>
146 * Specifies the format to use for the generated password.
147 * <p>
148 * The value is a comma-delimited list of elements in which each of
149 * those elements is comprised of the name of a character set defined
150 * in the password-character-set property, a colon, and the number of
151 * characters to include from that set. For example, a value of
152 * "alpha:3,numeric:2,alpha:3" generates an 8-character password in
153 * which the first three characters are from the "alpha" set, the
154 * next two are from the "numeric" set, and the final three are from
155 * the "alpha" set.
156 *
157 * @param value The value of the "password-format" property.
158 * @throws IllegalPropertyValueException
159 * If the new value is invalid.
160 */
161 void setPasswordFormat(String value) throws IllegalPropertyValueException;
162
163 }