Package com.unboundid.ldap.sdk.controls
Class ContentSyncInfoIntermediateResponse
- java.lang.Object
-
- com.unboundid.ldap.sdk.IntermediateResponse
-
- com.unboundid.ldap.sdk.controls.ContentSyncInfoIntermediateResponse
-
- All Implemented Interfaces:
LDAPResponse,java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ContentSyncInfoIntermediateResponse extends IntermediateResponse
This class provides an implementation of the sync info message, which is an intermediate response message used by the content synchronization operation as defined in RFC 4533. Directory servers may return this response in the course of processing a search request containing the content synchronization request control. See the documentation for theContentSyncRequestControlclass for more information about using the content synchronization operation.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSYNC_INFO_OIDThe OID (1.3.6.1.4.1.4203.1.9.1.4) for the sync info intermediate response.-
Fields inherited from class com.unboundid.ldap.sdk.IntermediateResponse
TYPE_INTERMEDIATE_RESPONSE_OID, TYPE_INTERMEDIATE_RESPONSE_VALUE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentSyncInfoIntermediateResponsecreateNewCookieResponse(ASN1OctetString cookie, Control... controls)Creates a new sync info intermediate response with a type ofContentSyncInfoType.NEW_COOKIE.static ContentSyncInfoIntermediateResponsecreateRefreshDeleteResponse(ASN1OctetString cookie, boolean refreshDone, Control... controls)Creates a new sync info intermediate response with a type ofContentSyncInfoType.REFRESH_DELETE.static ContentSyncInfoIntermediateResponsecreateRefreshPresentResponse(ASN1OctetString cookie, boolean refreshDone, Control... controls)Creates a new sync info intermediate response with a type ofContentSyncInfoType.REFRESH_PRESENT.static ContentSyncInfoIntermediateResponsecreateSyncIDSetResponse(ASN1OctetString cookie, java.util.List<java.util.UUID> entryUUIDs, boolean refreshDeletes, Control... controls)Creates a new sync info intermediate response with a type ofContentSyncInfoType.SYNC_ID_SET.static ContentSyncInfoIntermediateResponsedecode(IntermediateResponse r)Decodes the provided generic intermediate response as a sync info intermediate response.ASN1OctetStringgetCookie()Retrieves an updated state cookie for the synchronization session, if available.java.util.List<java.util.UUID>getEntryUUIDs()Retrieves a list of the entryUUID values for the entries referenced in this message.java.lang.StringgetIntermediateResponseName()Retrieves the user-friendly name for the intermediate response, if available.ContentSyncInfoTypegetType()Retrieves the type of content synchronization information represented in this response.booleanrefreshDeletes()Indicates whether the provided set of UUIDs represent entries that have been removed.booleanrefreshDone()Indicates whether the refresh phase of the synchronization operation has completed.voidtoString(java.lang.StringBuilder buffer)Appends a string representation of this intermediate response to the provided buffer.java.lang.StringvalueToString()Retrieves a human-readable string representation for the contents of the value for this intermediate response, if appropriate.-
Methods inherited from class com.unboundid.ldap.sdk.IntermediateResponse
getControl, getControls, getMessageID, getOID, getValue, toString
-
-
-
-
Field Detail
-
SYNC_INFO_OID
public static final java.lang.String SYNC_INFO_OID
The OID (1.3.6.1.4.1.4203.1.9.1.4) for the sync info intermediate response.- See Also:
- Constant Field Values
-
-
Method Detail
-
createNewCookieResponse
public static ContentSyncInfoIntermediateResponse createNewCookieResponse(ASN1OctetString cookie, Control... controls)
Creates a new sync info intermediate response with a type ofContentSyncInfoType.NEW_COOKIE.- Parameters:
cookie- The updated state cookie for the synchronization session. It must not benull.controls- An optional set of controls to include in the response. It may benullor empty if no controls should be included.- Returns:
- The created sync info intermediate response.
-
createRefreshDeleteResponse
public static ContentSyncInfoIntermediateResponse createRefreshDeleteResponse(ASN1OctetString cookie, boolean refreshDone, Control... controls)
Creates a new sync info intermediate response with a type ofContentSyncInfoType.REFRESH_DELETE.- Parameters:
cookie- The updated state cookie for the synchronization session. It may benullif no new cookie is available.refreshDone- Indicates whether the refresh phase of the synchronization operation has completed.controls- An optional set of controls to include in the response. It may benullor empty if no controls should be included.- Returns:
- The created sync info intermediate response.
-
createRefreshPresentResponse
public static ContentSyncInfoIntermediateResponse createRefreshPresentResponse(ASN1OctetString cookie, boolean refreshDone, Control... controls)
Creates a new sync info intermediate response with a type ofContentSyncInfoType.REFRESH_PRESENT.- Parameters:
cookie- The updated state cookie for the synchronization session. It may benullif no new cookie is available.refreshDone- Indicates whether the refresh phase of the synchronization operation has completed.controls- An optional set of controls to include in the response. It may benullor empty if no controls should be included.- Returns:
- The created sync info intermediate response.
-
createSyncIDSetResponse
public static ContentSyncInfoIntermediateResponse createSyncIDSetResponse(ASN1OctetString cookie, java.util.List<java.util.UUID> entryUUIDs, boolean refreshDeletes, Control... controls)
Creates a new sync info intermediate response with a type ofContentSyncInfoType.SYNC_ID_SET.- Parameters:
cookie- The updated state cookie for the synchronization session. It may benullif no new cookie is available.entryUUIDs- The set of entryUUIDs for the entries referenced in this response. It must not benull.refreshDeletes- Indicates whether the entryUUIDs represent entries that have been removed rather than those that have remained unchanged.controls- An optional set of controls to include in the response. It may benullor empty if no controls should be included.- Returns:
- The created sync info intermediate response.
-
decode
public static ContentSyncInfoIntermediateResponse decode(IntermediateResponse r) throws LDAPException
Decodes the provided generic intermediate response as a sync info intermediate response.- Parameters:
r- The intermediate response to be decoded as a sync info intermediate response. It must not benull.- Returns:
- The decoded sync info intermediate response.
- Throws:
LDAPException- If a problem occurs while trying to decode the provided intermediate response as a sync info response.
-
getType
public ContentSyncInfoType getType()
Retrieves the type of content synchronization information represented in this response.- Returns:
- The type of content synchronization information represented in this response.
-
getCookie
public ASN1OctetString getCookie()
Retrieves an updated state cookie for the synchronization session, if available. It will always be non-nullfor a type ofContentSyncInfoType.NEW_COOKIE, and may or may not benullfor other types.- Returns:
- An updated state cookie for the synchronization session, or
nullif none is available.
-
refreshDone
public boolean refreshDone()
Indicates whether the refresh phase of the synchronization operation has completed. This is only applicable for theContentSyncInfoType.REFRESH_DELETEandContentSyncInfoType.REFRESH_PRESENTtypes.- Returns:
trueif the refresh phase of the synchronization operation has completed, orfalseif not or if it is not applicable for this message type.
-
getEntryUUIDs
public java.util.List<java.util.UUID> getEntryUUIDs()
Retrieves a list of the entryUUID values for the entries referenced in this message. This is only applicable for theContentSyncInfoType.SYNC_ID_SETtype.- Returns:
- A list of the entryUUID values for the entries referenced in this
message, or
nullif it is not applicable for this message type.
-
refreshDeletes
public boolean refreshDeletes()
Indicates whether the provided set of UUIDs represent entries that have been removed. This is only applicable for theContentSyncInfoType.SYNC_ID_SETtype.- Returns:
trueif the associated set of entryUUIDs represent entries that have been deleted, orfalseif they represent entries that remain unchanged or if it is not applicable for this message type.
-
getIntermediateResponseName
public java.lang.String getIntermediateResponseName()
Retrieves the user-friendly name for the intermediate response, if available. If no user-friendly name has been defined, but a response OID is available, then that will be returned. If neither a user-friendly name nor a response OID are available, thennullwill be returned.- Overrides:
getIntermediateResponseNamein classIntermediateResponse- Returns:
- The user-friendly name for this intermediate response, the
response OID if a user-friendly name is not available but a
response OID is, or
nullif neither a user-friendly name nor a response OID are available.
-
valueToString
public java.lang.String valueToString()
Retrieves a human-readable string representation for the contents of the value for this intermediate response, if appropriate. If one is provided, then it should be a relatively compact single-line representation of the most important elements of the value.- Overrides:
valueToStringin classIntermediateResponse- Returns:
- A human-readable string representation for the contents of the
value for this intermediate response, or
nullif there is no value or no string representation is available.
-
toString
public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this intermediate response to the provided buffer.- Specified by:
toStringin interfaceLDAPResponse- Overrides:
toStringin classIntermediateResponse- Parameters:
buffer- The buffer to which the string representation should be appended.
-
-