Package netscape.ldap.controls
Class LDAPPasswordExpiredControl
- java.lang.Object
-
- netscape.ldap.LDAPControl
-
- netscape.ldap.controls.LDAPPasswordExpiredControl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class LDAPPasswordExpiredControl extends LDAPControl
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.- Version:
- 1.0
- See Also:
LDAPControl, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXPIREDprotected java.lang.Stringm_msg-
Fields inherited from class netscape.ldap.LDAPControl
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
-
-
Constructor Summary
Constructors Constructor Description LDAPPasswordExpiredControl(java.lang.String oid, boolean critical, byte[] value)Contructs anLDAPPasswordExpiredControlobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetMessage()Gets the message returned by the server with this control.static java.lang.StringparseResponse(LDAPControl[] controls)Deprecated.LDAPPasswordExpiredControl controls are now automatically instantiated.static java.lang.StringparseResponse(LDAPControl[] controls, java.lang.String type)Parses a response control sent by the server and retrieves a string.java.lang.StringtoString()Return a string representation of the control for debugging-
Methods inherited from class netscape.ldap.LDAPControl
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
-
-
-
-
Field Detail
-
EXPIRED
public static final java.lang.String EXPIRED
- See Also:
- Constant Field Values
-
m_msg
protected java.lang.String m_msg
-
-
Constructor Detail
-
LDAPPasswordExpiredControl
public LDAPPasswordExpiredControl(java.lang.String oid, boolean critical, byte[] value) throws LDAPExceptionContructs anLDAPPasswordExpiredControlobject. This constructor is used byLDAPControl.registerto instantiate password expired controls.To retrieve the message from the server, call
getMessage.- Parameters:
oid- this parameter must be equal toLDAPPasswordExpiredControl.EXPIREDor anLDAPExceptionis throwncritical-trueif this control is criticalvalue- the value associated with this control- Throws:
LDAPException- If oid is notLDAPPasswordExpiredControl.EXPIRED.- See Also:
LDAPControl.register(java.lang.String, java.lang.Class<?>)
-
-
Method Detail
-
parseResponse
@Deprecated public static java.lang.String parseResponse(LDAPControl[] controls)
Deprecated.LDAPPasswordExpiredControl controls are now automatically instantiated.- Parameters:
controls- an array ofLDAPControlobjects, representing the controls returned by the server after a search. To get these controls, use thegetResponseControlsmethod of theLDAPConnectionclass.- Returns:
- an error message string, or null if none is in the control.
- See Also:
LDAPConnection.getResponseControls()
-
getMessage
public java.lang.String getMessage()
Gets the message returned by the server with this control.- Returns:
- the message returned by the server.
-
toString
public java.lang.String toString()
Description copied from class:LDAPControlReturn a string representation of the control for debugging- Overrides:
toStringin classLDAPControl- Returns:
- a string representation of the control.
-
parseResponse
public static java.lang.String parseResponse(LDAPControl[] controls, java.lang.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
getResponseControlsmethod of theLDAPConnectionclass.- Parameters:
controls- an array ofLDAPControlobjects, representing the controls returned by the server after a search. To get these controls, use thegetResponseControlsmethod of theLDAPConnectionclass.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()
-
-