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, theControlclass should be used instead.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMANAGEDSAITThe OID for the ManageDsaIT request control.static java.lang.StringPWEXPIREDThe OID for the password expired control.static java.lang.StringPWEXPIRINGThe 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 LDAPControlduplicate()Creates a duplicate of this control.java.lang.StringgetID()Retrieves the OID for this control.byte[]getValue()Retrieves the value for this control, if available.booleanisCritical()Indicates whether this control is marked critical.ControltoControl()Converts this LDAP control to aControlobject.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.StringtoString()Retrieves a string representation of this control.
-
-
-
Field Detail
-
MANAGEDSAIT
@NotNull public static final java.lang.String MANAGEDSAIT
The OID for the ManageDsaIT request control.- See Also:
- Constant Field Values
-
PWEXPIRED
@NotNull public static final java.lang.String PWEXPIRED
The OID for the password expired control.- See Also:
- Constant Field Values
-
PWEXPIRING
@NotNull public static final java.lang.String PWEXPIRING
The OID for the password expiring control.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LDAPControl
public LDAPControl(@NotNull Control control)
Creates a new LDAP control from the provided control.- Parameters:
control- The control to use to create this control.
-
LDAPControl
public LDAPControl(@NotNull java.lang.String id, boolean critical, @Nullable 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
@NotNull 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:
trueif this control is marked critical, orfalseif not.
-
getValue
@Nullable public byte[] getValue()
Retrieves the value for this control, if available.- Returns:
- The value for this control, or
nullif there is none.
-
toControl
@NotNull public final Control toControl()
Converts this LDAP control to aControlobject.- Returns:
- The
Controlobject for this LDAP control.
-
toControls
@Nullable public static Control[] toControls(@Nullable 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
@Nullable public static LDAPControl[] toLDAPControls(@Nullable 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
@NotNull public LDAPControl duplicate()
Creates a duplicate of this control.- Returns:
- A duplicate of this control.
-
-