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.RepeatedCharactersPasswordValidatorCfg;
023
024
025
026/**
027 * A client-side interface for reading and modifying Repeated
028 * Characters Password Validator settings.
029 * <p>
030 * The Repeated Characters Password Validator is used to determine
031 * whether a proposed password is acceptable based on the number of
032 * times any character appears consecutively in a password value.
033 */
034public interface RepeatedCharactersPasswordValidatorCfgClient extends PasswordValidatorCfgClient {
035
036  /**
037   * Get the configuration definition associated with this Repeated Characters Password Validator.
038   *
039   * @return Returns the configuration definition associated with this Repeated Characters Password Validator.
040   */
041  ManagedObjectDefinition<? extends RepeatedCharactersPasswordValidatorCfgClient, ? extends RepeatedCharactersPasswordValidatorCfg> 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   * If the value of this property is false, the validator ignores any
052   * differences in capitalization when looking for consecutive
053   * characters in the password. If the value is true, the validator
054   * considers a character to be repeating only if all consecutive
055   * occurrences use the same capitalization.
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   * If the value of this property is false, the validator ignores any
070   * differences in capitalization when looking for consecutive
071   * characters in the password. If the value is true, the validator
072   * considers a character to be repeating only if all consecutive
073   * occurrences use the same capitalization.
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 "max-consecutive-length" property.
111   * <p>
112   * Specifies the maximum number of times that any character can
113   * appear consecutively in a password value.
114   * <p>
115   * A value of zero indicates that no maximum limit is enforced.
116   *
117   * @return Returns the value of the "max-consecutive-length" property.
118   */
119  Integer getMaxConsecutiveLength();
120
121
122
123  /**
124   * Sets the "max-consecutive-length" property.
125   * <p>
126   * Specifies the maximum number of times that any character can
127   * appear consecutively in a password value.
128   * <p>
129   * A value of zero indicates that no maximum limit is enforced.
130   *
131   * @param value The value of the "max-consecutive-length" property.
132   * @throws PropertyException
133   *           If the new value is invalid.
134   */
135  void setMaxConsecutiveLength(int value) throws PropertyException;
136
137}