Class LDAPControl
- java.lang.Object
-
- com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPControl
-
- All Implemented Interfaces:
java.io.Serializable
@Extensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class LDAPControl extends java.lang.Object implements java.io.Serializable
This class provides a data structure that holds information about an LDAP control.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, theControl
class should be used instead.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MANAGEDSAIT
The OID for the ManageDsaIT request control.static java.lang.String
PWEXPIRED
The OID for the password expired control.static java.lang.String
PWEXPIRING
The OID for the password expiring control.
-
Constructor Summary
Constructors Constructor Description LDAPControl(Control control)
Creates a new LDAP control from the provided control.LDAPControl(java.lang.String id, boolean critical, byte[] vals)
Creates a new LDAP control with the specified information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPControl
duplicate()
Creates a duplicate of this control.java.lang.String
getID()
Retrieves the OID for this control.byte[]
getValue()
Retrieves the value for this control, if available.boolean
isCritical()
Indicates whether this control is marked critical.Control
toControl()
Converts this LDAP control to aControl
object.static Control[]
toControls(LDAPControl[] ldapControls)
Converts the provided array of controls to an array of LDAP controls.static LDAPControl[]
toLDAPControls(Control[] controls)
Converts the provided array of LDAP controls to an array of controls.java.lang.String
toString()
Retrieves a string representation of this control.
-
-
-
Field Detail
-
MANAGEDSAIT
public static final java.lang.String MANAGEDSAIT
The OID for the ManageDsaIT request control.- See Also:
- Constant Field Values
-
PWEXPIRED
public static final java.lang.String PWEXPIRED
The OID for the password expired control.- See Also:
- Constant Field Values
-
PWEXPIRING
public static final java.lang.String PWEXPIRING
The OID for the password expiring control.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LDAPControl
public LDAPControl(Control control)
Creates a new LDAP control from the provided control.- Parameters:
control
- The control to use to create this control.
-
LDAPControl
public LDAPControl(java.lang.String id, boolean critical, byte[] vals)
Creates a new LDAP control with the specified information.- Parameters:
id
- The OID for the control.critical
- Indicates whether the control should be marked critical.vals
- The encoded value for the control.
-
-
Method Detail
-
getID
public java.lang.String getID()
Retrieves the OID for this control.- Returns:
- The OID for this control.
-
isCritical
public boolean isCritical()
Indicates whether this control is marked critical.- Returns:
true
if this control is marked critical, orfalse
if not.
-
getValue
public byte[] getValue()
Retrieves the value for this control, if available.- Returns:
- The value for this control, or
null
if there is none.
-
toControl
public final Control toControl()
Converts this LDAP control to aControl
object.- Returns:
- The
Control
object for this LDAP control.
-
toControls
public static Control[] toControls(LDAPControl[] ldapControls)
Converts the provided array of controls to an array of LDAP controls.- Parameters:
ldapControls
- The LDAP controls to be converted.- Returns:
- The corresponding array of controls.
-
toLDAPControls
public static LDAPControl[] toLDAPControls(Control[] controls)
Converts the provided array of LDAP controls to an array of controls.- Parameters:
controls
- The controls to be converted.- Returns:
- The corresponding array of LDAP controls.
-
duplicate
public LDAPControl duplicate()
Creates a duplicate of this control.- Returns:
- A duplicate of this control.
-
toString
public java.lang.String toString()
Retrieves a string representation of this control.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this control.
-
-