Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AAF710D66 for ; Fri, 24 Jan 2014 21:48:28 +0000 (UTC) Received: (qmail 49200 invoked by uid 500); 24 Jan 2014 21:48:26 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 49099 invoked by uid 500); 24 Jan 2014 21:48:25 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 49069 invoked by uid 99); 24 Jan 2014 21:48:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jan 2014 21:48:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jan 2014 21:48:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D05D523889EB; Fri, 24 Jan 2014 21:48:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1561204 - /directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponse.java Date: Fri, 24 Jan 2014 21:48:03 -0000 To: commits@directory.apache.org From: lucastheisen@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140124214803.D05D523889EB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: lucastheisen Date: Fri Jan 24 21:48:03 2014 New Revision: 1561204 URL: http://svn.apache.org/r1561204 Log: DIRAPI-169: Formalize the contract of PasswordPolicyResponse by stating that -1 is returned if no value is set. Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponse.java Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponse.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponse.java?rev=1561204&r1=1561203&r2=1561204&view=diff ============================================================================== --- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponse.java (original) +++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ppolicy/PasswordPolicyResponse.java Fri Jan 24 21:48:03 2014 @@ -21,8 +21,8 @@ package org.apache.directory.api.ldap.ex /** - * The PasswordPolciy reponse. It contains information about the error if we - * had one when injecting a bad passsword into the server. + * The PasswordPolicy response. It contains information about the error if we + * had one when injecting a bad password into the server. * * @author Apache Directory Project * @version $Rev$, $Date$ @@ -30,40 +30,52 @@ package org.apache.directory.api.ldap.ex public interface PasswordPolicyResponse { /** - * @return The time before expiration of the password + * Returns the time before expiration. Will return -1 if this warning + * was not present in the response. + * + * @return The time before expiration of the password, or -1 if not set */ int getTimeBeforeExpiration(); /** - * Set a date of expiration for the password + * Set a date of expiration for the password. + * * @param timeBeforeExpiration The time before the password will expire */ void setTimeBeforeExpiration( int timeBeforeExpiration ); /** + * Returns the number of possible attempts on the password before it's + * locked. Will return -1 if this warning was not present in the + * response. + * * @return The number of possible attempts on the password before it's locked */ int getGraceAuthNRemaining(); /** - * Sets the number of remaining wrong authentication for this password + * Sets the number of remaining wrong authentication for this password. + * * @param graceAuthNRemaining The number of remaining attempts */ void setGraceAuthNRemaining( int graceAuthNRemaining ); /** - * @return The PasswordPolicy error number + * Returns the password policy error. + * + * @return The PasswordPolicyErrorEnum representing the error */ PasswordPolicyErrorEnum getPasswordPolicyError(); /** - * Sets the PasswordPolicy error number - * @param ppolicyError The error number + * Sets the PasswordPolicy error. + * + * @param ppolicyError The PasswordPolicyErrorEnum representing the error */ void setPasswordPolicyError( PasswordPolicyErrorEnum ppolicyError ); } \ No newline at end of file