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 legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.opends.server.admin.std.client; 027 028 029 030import java.util.Collection; 031import java.util.SortedSet; 032import org.opends.server.admin.ManagedObjectDefinition; 033import org.opends.server.admin.PropertyException; 034import org.opends.server.admin.std.server.RandomPasswordGeneratorCfg; 035 036 037 038/** 039 * A client-side interface for reading and modifying Random Password 040 * Generator settings. 041 * <p> 042 * The Random Password Generator creates random passwords based on 043 * fixed-length strings built from one or more character sets. 044 */ 045public interface RandomPasswordGeneratorCfgClient extends PasswordGeneratorCfgClient { 046 047 /** 048 * Get the configuration definition associated with this Random Password Generator. 049 * 050 * @return Returns the configuration definition associated with this Random Password Generator. 051 */ 052 ManagedObjectDefinition<? extends RandomPasswordGeneratorCfgClient, ? extends RandomPasswordGeneratorCfg> definition(); 053 054 055 056 /** 057 * Gets the "java-class" property. 058 * <p> 059 * Specifies the fully-qualified name of the Java class that 060 * provides the Random Password Generator implementation. 061 * 062 * @return Returns the value of the "java-class" property. 063 */ 064 String getJavaClass(); 065 066 067 068 /** 069 * Sets the "java-class" property. 070 * <p> 071 * Specifies the fully-qualified name of the Java class that 072 * provides the Random Password Generator implementation. 073 * 074 * @param value The value of the "java-class" property. 075 * @throws PropertyException 076 * If the new value is invalid. 077 */ 078 void setJavaClass(String value) throws PropertyException; 079 080 081 082 /** 083 * Gets the "password-character-set" property. 084 * <p> 085 * Specifies one or more named character sets. 086 * <p> 087 * This is a multi-valued property, with each value defining a 088 * different character set. The format of the character set is the 089 * name of the set followed by a colon and the characters that are in 090 * that set. For example, the value 091 * "alpha:abcdefghijklmnopqrstuvwxyz" defines a character set named 092 * "alpha" containing all of the lower-case ASCII alphabetic 093 * characters. 094 * 095 * @return Returns the values of the "password-character-set" property. 096 */ 097 SortedSet<String> getPasswordCharacterSet(); 098 099 100 101 /** 102 * Sets the "password-character-set" property. 103 * <p> 104 * Specifies one or more named character sets. 105 * <p> 106 * This is a multi-valued property, with each value defining a 107 * different character set. The format of the character set is the 108 * name of the set followed by a colon and the characters that are in 109 * that set. For example, the value 110 * "alpha:abcdefghijklmnopqrstuvwxyz" defines a character set named 111 * "alpha" containing all of the lower-case ASCII alphabetic 112 * characters. 113 * 114 * @param values The values of the "password-character-set" property. 115 * @throws PropertyException 116 * If one or more of the new values are invalid. 117 */ 118 void setPasswordCharacterSet(Collection<String> values) throws PropertyException; 119 120 121 122 /** 123 * Gets the "password-format" property. 124 * <p> 125 * Specifies the format to use for the generated password. 126 * <p> 127 * The value is a comma-delimited list of elements in which each of 128 * those elements is comprised of the name of a character set defined 129 * in the password-character-set property, a colon, and the number of 130 * characters to include from that set. For example, a value of 131 * "alpha:3,numeric:2,alpha:3" generates an 8-character password in 132 * which the first three characters are from the "alpha" set, the 133 * next two are from the "numeric" set, and the final three are from 134 * the "alpha" set. 135 * 136 * @return Returns the value of the "password-format" property. 137 */ 138 String getPasswordFormat(); 139 140 141 142 /** 143 * Sets the "password-format" property. 144 * <p> 145 * Specifies the format to use for the generated password. 146 * <p> 147 * The value is a comma-delimited list of elements in which each of 148 * those elements is comprised of the name of a character set defined 149 * in the password-character-set property, a colon, and the number of 150 * characters to include from that set. For example, a value of 151 * "alpha:3,numeric:2,alpha:3" generates an 8-character password in 152 * which the first three characters are from the "alpha" set, the 153 * next two are from the "numeric" set, and the final three are from 154 * the "alpha" set. 155 * 156 * @param value The value of the "password-format" property. 157 * @throws PropertyException 158 * If the new value is invalid. 159 */ 160 void setPasswordFormat(String value) throws PropertyException; 161 162}