Directory SDK
for Java 4.19

netscape.ldap.controls
Class LDAPPasswordExpiredControl

java.lang.Object
  extended bynetscape.ldap.LDAPControl
      extended bynetscape.ldap.controls.LDAPStringControl
          extended bynetscape.ldap.controls.LDAPPasswordExpiredControl
All Implemented Interfaces:
Cloneable, Serializable

public class LDAPPasswordExpiredControl
extends netscape.ldap.controls.LDAPStringControl

Represents an LDAP v3 server control that may be returned if a password has expired, and password policy is enabled on the server. The OID for this control is 2.16.840.1.113730.3.4.4.

See Also:
LDAPControl, Serialized Form

Field Summary
static String EXPIRED
           
 
Fields inherited from class netscape.ldap.LDAPControl
MANAGEDSAIT, PWEXPIRED, PWEXPIRING
 
Constructor Summary
LDAPPasswordExpiredControl(String oid, boolean critical, byte[] value)
          Contructs an LDAPPasswordExpiredControl object.
 
Method Summary
 String getMessage()
          Gets the message returned by the server with this control.
static String parseResponse(LDAPControl[] controls)
          Deprecated. LDAPPasswordExpiredControl controls are now automatically instantiated.
static String parseResponse(LDAPControl[] controls, String type)
          Parses a response control sent by the server and retrieves a string.
 String toString()
          Return a string representation of the control for debugging
 
Methods inherited from class netscape.ldap.LDAPControl
clone, getID, getValue, isCritical, newInstance, register
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPIRED

public static final String EXPIRED
See Also:
Constant Field Values
Constructor Detail

LDAPPasswordExpiredControl

public LDAPPasswordExpiredControl(String oid,
                                  boolean critical,
                                  byte[] value)
                           throws LDAPException
Contructs an LDAPPasswordExpiredControl object. This constructor is used by LDAPControl.register to instantiate password expired controls.

To retrieve the message from the server, call getMessage.

Parameters:
oid - this parameter must be equal to LDAPPasswordExpiredControl.EXPIRED or an LDAPException is thrown
critical - true if this control is critical
value - the value associated with this control
Throws:
LDAPException - If oid is not LDAPPasswordExpiredControl.EXPIRED.
See Also:
LDAPControl.register(java.lang.String, java.lang.Class)
Method Detail

parseResponse

public static String parseResponse(LDAPControl[] controls)
Deprecated. LDAPPasswordExpiredControl controls are now automatically instantiated.

Parameters:
controls - an array of LDAPControl objects, representing the controls returned by the server after a search. To get these controls, use the getResponseControls method of the LDAPConnection class.
Returns:
an error message string, or null if none is in the control.
See Also:
LDAPConnection.getResponseControls()

getMessage

public String getMessage()
Gets the message returned by the server with this control.

Returns:
the message returned by the server.

toString

public String toString()
Description copied from class: LDAPControl
Return a string representation of the control for debugging

Overrides:
toString in class LDAPControl
Returns:
a string representation of the control.

parseResponse

public static String parseResponse(LDAPControl[] controls,
                                   String type)
Parses a response control sent by the server and retrieves a string.

You can get the controls returned by the server by using the getResponseControls method of the LDAPConnection class.

Parameters:
controls - an array of LDAPControl objects, representing the controls returned by the server after a search. To get these controls, use the getResponseControls method of the LDAPConnection class.
type - the OID of the control to look for
Returns:
a message string, or null if the server did not return a string.
See Also:
LDAPConnection.getResponseControls()

Directory SDK
for Java 4.19

Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.