Package com.unboundid.ldap.sdk.controls
Class ContentSyncStateControl
java.lang.Object
com.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.controls.ContentSyncStateControl
- All Implemented Interfaces:
DecodeableControl,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class ContentSyncStateControl
extends Control
implements DecodeableControl
This class provides an implementation of the LDAP content synchronization
state control as defined in
RFC 4533. Directory
servers may include this control in search result entry and search result
reference messages returned for a search request containing the content
synchronization request control. See the documentation for the
ContentSyncRequestControl class for more information information
about using the content synchronization operation.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.4203.1.9.1.2) for the sync state control. -
Constructor Summary
ConstructorsConstructorDescriptionContentSyncStateControl(ContentSyncState state, UUID entryUUID, ASN1OctetString cookie) Creates a new content synchronization state control that provides information about a search result entry or referenced returned by a search containing the content synchronization request control.ContentSyncStateControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new content synchronization state control which is decoded from the provided information from a generic control. -
Method Summary
Modifier and TypeMethodDescriptiondecodeControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new instance of this decodeable control from the provided information.static ContentSyncStateControlget(SearchResultEntry entry) Extracts a content sync state control from the provided search result entry.static ContentSyncStateControlget(SearchResultReference ref) Extracts a content sync state control from the provided search result reference.Retrieves the user-friendly name for this control, if available.Retrieves a cookie providing updated state information for the synchronization session, if available.Retrieves the entryUUID for the associated search result entry or reference.getState()Retrieves the synchronization state for this control, which provides information about the state of the associated search result entry or reference.voidtoString(StringBuilder buffer) Appends a string representation of this LDAP control to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.Control
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toJSONControl, toString, writeTo
-
Field Details
-
SYNC_STATE_OID
The OID (1.3.6.1.4.1.4203.1.9.1.2) for the sync state control.- See Also:
-
-
Constructor Details
-
ContentSyncStateControl
public ContentSyncStateControl(@NotNull ContentSyncState state, @NotNull UUID entryUUID, @Nullable ASN1OctetString cookie) Creates a new content synchronization state control that provides information about a search result entry or referenced returned by a search containing the content synchronization request control.- Parameters:
state- The sync state for the associated entry or reference. It must not benull.entryUUID- The entryUUID for the associated entry or reference. It must not benull.cookie- A cookie with an updated synchronization state. It may benullif no updated state is available.
-
ContentSyncStateControl
public ContentSyncStateControl(@NotNull String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException Creates a new content synchronization state control which is decoded from the provided information from a generic control.- Parameters:
oid- The OID for the control used to create this control.isCritical- Indicates whether the control is marked critical.value- The encoded value for the control.- Throws:
LDAPException- If the provided control cannot be decoded as a content synchronization state control.
-
-
Method Details
-
decodeControl
@NotNull public ContentSyncStateControl decodeControl(@NotNull String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException Creates a new instance of this decodeable control from the provided information.- Specified by:
decodeControlin interfaceDecodeableControl- Parameters:
oid- The OID for the control.isCritical- Indicates whether the control should be marked critical.value- The encoded value for the control. This may benullif no value was provided.- Returns:
- The decoded representation of this control.
- Throws:
LDAPException- If the provided information cannot be decoded as a valid instance of this decodeable control.
-
get
@Nullable public static ContentSyncStateControl get(@NotNull SearchResultEntry entry) throws LDAPException Extracts a content sync state control from the provided search result entry.- Parameters:
entry- The search result entry from which to retrieve the content sync state control.- Returns:
- The content sync state control contained in the provided search
result entry, or
nullif the entry did not contain a content sync state control. - Throws:
LDAPException- If a problem is encountered while attempting to decode the content sync state control contained in the provided search result entry.
-
get
@Nullable public static ContentSyncStateControl get(@NotNull SearchResultReference ref) throws LDAPException Extracts a content sync state control from the provided search result reference.- Parameters:
ref- The search result reference from which to retrieve the content sync state control.- Returns:
- The content sync state control contained in the provided search
result reference, or
nullif the reference did not contain a content sync state control. - Throws:
LDAPException- If a problem is encountered while attempting to decode the content sync state control contained in the provided search result reference.
-
getState
Retrieves the synchronization state for this control, which provides information about the state of the associated search result entry or reference.- Returns:
- The state value for this content synchronization state control.
-
getEntryUUID
Retrieves the entryUUID for the associated search result entry or reference.- Returns:
- The entryUUID for the associated search result entry or reference.
-
getCookie
Retrieves a cookie providing updated state information for the synchronization session, if available.- Returns:
- A cookie providing updated state information for the
synchronization session, or
nullif none was included in the control.
-
getControlName
Retrieves the user-friendly name for this control, if available. If no user-friendly name has been defined, then the OID will be returned.- Overrides:
getControlNamein classControl- Returns:
- The user-friendly name for this control, or the OID if no user-friendly name is available.
-
toString
Appends a string representation of this LDAP control to the provided buffer.
-