Class MoveSubtreeProperties
- java.lang.Object
-
- com.unboundid.ldap.sdk.unboundidds.MoveSubtreeProperties
-
@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class MoveSubtreeProperties extends java.lang.Object
This class defines a number of properties that can be used when attempting to move a subtree from one Ping Identity Directory Server instance to another Ping Identity Directory Server instance using restricted subtree accessibility.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
-
-
Constructor Summary
Constructors Constructor Description MoveSubtreeProperties(DN baseDN)
Creates a new set of properties that can be used when moving the specified subtree from one server to another.MoveSubtreeProperties(MoveSubtreeProperties properties)
Creates a new set of properties that is a copy of the provided properties object.MoveSubtreeProperties(java.lang.String baseDN)
Creates a new set of properties that can be used when moving the specified subtree from one server to another.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DN
getBaseDN()
Retrieves the base DN of the subtree to move.int
getMaximumAllowedSubtreeSize()
Retrieves the maximum number of entries that the target subtree may contain for it to be moved from one server to another.MoveSubtreeListener
getMoveSubtreeListener()
Retrieves the listener that may be invoked during the course of moving entries from the source server to the target server, if any.OperationPurposeRequestControl
getOperationPurposeRequestControl()
Retrieves an operation purpose request control that should be included in all requests sent to the source and target servers, if any.void
setBaseDN(DN baseDN)
Specifies the base DN of the subtree to move.void
setBaseDN(java.lang.String baseDN)
Specifies the base DN of the subtree to move.void
setMaximumAllowedSubtreeSize(int sizeLimit)
Specifies the maximum number of entries that the target subtree may contain for it to be moved from one server to another.void
setMoveSubtreeListener(MoveSubtreeListener listener)
Specifies a listener that may be invoked during the course of moving entries from the source server to the target server.void
setOperationPurposeRequestControl(OperationPurposeRequestControl control)
Specifies an operation purpose request control that should be included in all requests sent to the source and target servers.void
setSuppressReferentialIntegrityUpdates(boolean suppressUpdates)
Specifies whether to suppress referential integrity updates when removing entries from the source server.void
setUseToBeDeletedAccessibilityState(boolean useToBeDeletedState)
Specifies whether to use theSubtreeAccessibilityState.TO_BE_DELETED
subtree accessibility state (as opposed to theHIDDEN
state) for the target subtree on the source server before beginning to remove entries from it.boolean
suppressReferentialIntegrityUpdates()
Indicates whether to suppress referential integrity updates when removing entries from the source server.java.lang.String
toString()
Retrieves a string representation of the properties.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of the properties to the provided buffer.boolean
useToBeDeletedAccessibilityState()
Indicates whether to use theSubtreeAccessibilityState.TO_BE_DELETED
subtree accessibility state (as opposed to theHIDDEN
state) for the target subtree on the source server before beginning to remove entries from it.
-
-
-
Constructor Detail
-
MoveSubtreeProperties
public MoveSubtreeProperties(@NotNull java.lang.String baseDN) throws LDAPException
Creates a new set of properties that can be used when moving the specified subtree from one server to another.- Parameters:
baseDN
- The base DN for the subtree to be moved. It must not benull
, and it must represent a valid DN with one or more RDN components.- Throws:
LDAPException
- If the provided string cannot be parsed as a valid DN.
-
MoveSubtreeProperties
public MoveSubtreeProperties(@NotNull DN baseDN)
Creates a new set of properties that can be used when moving the specified subtree from one server to another.- Parameters:
baseDN
- The base DN for the subtree to be moved. It must not benull
, and it must have one or more RDN components.
-
MoveSubtreeProperties
public MoveSubtreeProperties(@NotNull MoveSubtreeProperties properties)
Creates a new set of properties that is a copy of the provided properties object.- Parameters:
properties
- The properties object to use to create the new properties.
-
-
Method Detail
-
getBaseDN
@NotNull public DN getBaseDN()
Retrieves the base DN of the subtree to move.- Returns:
- The base DN of the subtree to move.
-
setBaseDN
public void setBaseDN(@NotNull java.lang.String baseDN) throws LDAPException
Specifies the base DN of the subtree to move.- Parameters:
baseDN
- The base DN for the subtree to be moved. It must not benull
, and it must represent a valid DN with one or more RDN components.- Throws:
LDAPException
- If the provided string cannot be parsed as a valid DN.
-
setBaseDN
public void setBaseDN(@NotNull DN baseDN)
Specifies the base DN of the subtree to move.- Parameters:
baseDN
- The base DN for the subtree to be moved. It must not benull
, and it must have one or more RDN components.
-
getMaximumAllowedSubtreeSize
public int getMaximumAllowedSubtreeSize()
Retrieves the maximum number of entries that the target subtree may contain for it to be moved from one server to another.- Returns:
- The maximum number of entries that the target subtree may contain for it to be moved from one server to another, or zero if no client-side size limit should be enforced (although the server may still impose its own size limit).
-
setMaximumAllowedSubtreeSize
public void setMaximumAllowedSubtreeSize(int sizeLimit)
Specifies the maximum number of entries that the target subtree may contain for it to be moved from one server to another. If the subtree contains more than the maximum number of entries, then the attempt to move it will be aborted before any changes are applied to the data in either server.- Parameters:
sizeLimit
- The maximum number of entries tht the target subtree may contain for it to be moved from one server to another. A value that is less than or equal to zero indicates that no client-side size limit should be imposed. Note that the server may also impose a size limit, and the smaller of the client-side and server-side limits will be in effect.
-
useToBeDeletedAccessibilityState
public boolean useToBeDeletedAccessibilityState()
Indicates whether to use theSubtreeAccessibilityState.TO_BE_DELETED
subtree accessibility state (as opposed to theHIDDEN
state) for the target subtree on the source server before beginning to remove entries from it.- Returns:
true
if theTO_BE_DELETED
subtree accessibility state should be used, orfalse
if theHIDDEN
state should be used.
-
setUseToBeDeletedAccessibilityState
public void setUseToBeDeletedAccessibilityState(boolean useToBeDeletedState)
Specifies whether to use theSubtreeAccessibilityState.TO_BE_DELETED
subtree accessibility state (as opposed to theHIDDEN
state) for the target subtree on the source server before beginning to remove entries from it. Both theTO_BE_DELETED
andHIDDEN
subtree accessibility states will completely hide the target subtree from all clients expect those authenticated as a designated bypass-user account, but the key differences between these states include:-
In some cases, the server may be able to process delete requests for
entries in
TO_BE_DELETED
subtrees than for entries in subtrees with other accessibility states, including theHIDDEN
state. -
Support for the
TO_BE_DELETED
subtree accessibility state was added to the Directory Server more recently than support for theHIDDEN
state. Older Directory Server instances may not support theTO_BE_DELETED
state. -
A
HIDDEN
subtree can be updated to give it a different accessibility state, but once a subtree has been placed in aTO_BE_DELETED
accessibility state, its state cannot be manually updated. -
The
TO_BE_DELETED
accessibility state will automatically be removed from a subtree once all entries have been removed from that subtree, while theHIDDEN
state needs to be manually removed if it is no longer desired.
- Parameters:
useToBeDeletedState
- Indicates whether to use theTO_BE_DELETED
subtree accessibility state instead of theHIDDEN
state for the target subtree on the source server before beginning to remove entries from it.
-
In some cases, the server may be able to process delete requests for
entries in
-
suppressReferentialIntegrityUpdates
public boolean suppressReferentialIntegrityUpdates()
Indicates whether to suppress referential integrity updates when removing entries from the source server.- Returns:
true
if referential integrity updates should be suppressed when removing entries from the source server, orfalse
if not.
-
setSuppressReferentialIntegrityUpdates
public void setSuppressReferentialIntegrityUpdates(boolean suppressUpdates)
Specifies whether to suppress referential integrity updates when removing entries from the source server. By default, if the referential integrity plugin is enabled, then removing a user entry will automatically remove references to it from other entries, including things like static group membership. However, when moving entries from one server to another, and especially in cases where the associated references are in other entries that are also being moved, it may be desirable to suppress those referential integrity updates.- Parameters:
suppressUpdates
- Indicates whether to suppress referential integrity updates when removing entries from the source server.
-
getOperationPurposeRequestControl
@Nullable public OperationPurposeRequestControl getOperationPurposeRequestControl()
Retrieves an operation purpose request control that should be included in all requests sent to the source and target servers, if any.- Returns:
- An operation purpose request control that should be included in
all requests sent ot the source and target servers, or
null
if no operation purpose request control should be used.
-
setOperationPurposeRequestControl
public void setOperationPurposeRequestControl(@Nullable OperationPurposeRequestControl control)
Specifies an operation purpose request control that should be included in all requests sent to the source and target servers.- Parameters:
control
- An operation purpose request control that should be included in all requests sent to the source and target servers. It may benull
if no operation purpose request control should be used.
-
getMoveSubtreeListener
@Nullable public MoveSubtreeListener getMoveSubtreeListener()
Retrieves the listener that may be invoked during the course of moving entries from the source server to the target server, if any.- Returns:
- The listener that may be invoked during the course of moving
entries from the source server to the target server, or
null
if no move subtree listener has been configured.
-
setMoveSubtreeListener
public void setMoveSubtreeListener(@Nullable MoveSubtreeListener listener)
Specifies a listener that may be invoked during the course of moving entries from the source server to the target server. The listener will be invoked before and after adding an entry to the target server, and it will be invoked before and after removing an entry from the source server.- Parameters:
listener
- A listener that may be invoked during the course of moving entries from the source server to the target server. It may benull
if no listener is needed.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of the properties.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the proprties.
-
-