Class SetSubtreeAccessibilityExtendedRequest
java.lang.Object
com.unboundid.ldap.sdk.LDAPRequest
com.unboundid.ldap.sdk.ExtendedRequest
com.unboundid.ldap.sdk.unboundidds.extensions.SetSubtreeAccessibilityExtendedRequest
- All Implemented Interfaces:
ProtocolOp,ReadOnlyLDAPRequest,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class SetSubtreeAccessibilityExtendedRequest
extends ExtendedRequest
This class provides an implementation of an extended request that may be used
to set the accessibility of one or more subtrees in the Ping Identity,
UnboundID, or Nokia/Alcatel-Lucent 8661 Directory Server. It may be used to
indicate that a specified set of entries and all their subordinates should be
invisible or read-only, or to restore it to full accessibility.
The OID for this request is 1.3.6.1.4.1.30221.2.6.19, and the value must have the encoding specified below. Note that the initial specification for this extended request only allowed for the specification of a single subtree, whereas it is now possible to affect the accessibility of multiple subtrees in a single request. In order to preserve compatibility with the original encoding, if there is more than one target subtree, then the first subtree must be specified as the first element in the value sequence and the remaining subtrees must be specified in the additionalSubtreeBaseDNs element.
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.
The OID for this request is 1.3.6.1.4.1.30221.2.6.19, and the value must have the encoding specified below. Note that the initial specification for this extended request only allowed for the specification of a single subtree, whereas it is now possible to affect the accessibility of multiple subtrees in a single request. In order to preserve compatibility with the original encoding, if there is more than one target subtree, then the first subtree must be specified as the first element in the value sequence and the remaining subtrees must be specified in the additionalSubtreeBaseDNs element.
SetSubtreeAccessibilityRequestValue ::= SEQUENCE {
subtreeBaseDN LDAPDN,
subtreeAccessibility ENUMERATED {
accessible (0),
read-only-bind-allowed (1),
read-only-bind-denied (2),
hidden (3),
to-be-deleted (4),
... },
bypassUserDN [0] LDAPDN OPTIONAL,
additionalSubtreeBaseDNs [1] SEQUENCE OF LDAPDN OPTIONAL,
... }
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.30221.2.6.19) for the set subtree accessibility extended request.Fields inherited from class com.unboundid.ldap.sdk.ExtendedRequest
TYPE_EXTENDED_REQUEST_OID, TYPE_EXTENDED_REQUEST_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionSetSubtreeAccessibilityExtendedRequest(ExtendedRequest extendedRequest) Creates a new set subtree accessibility extended request from the provided generic extended request. -
Method Summary
Modifier and TypeMethodDescriptioncreateSetAccessibleRequest(String subtreeBaseDN, Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtree accessible.createSetAccessibleRequest(Collection<String> subtreeBaseDNs, Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtrees accessible.createSetHiddenRequest(String subtreeBaseDN, String bypassUserDN, Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtree hidden.createSetHiddenRequest(Collection<String> subtreeBaseDNs, String bypassUserDN, Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtrees hidden.createSetReadOnlyRequest(String subtreeBaseDN, boolean allowBind, String bypassUserDN, Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtree read-only.createSetReadOnlyRequest(Collection<String> subtreeBaseDNs, boolean allowBind, String bypassUserDN, Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtrees read-only.createSetToBeDeletedRequest(String subtreeBaseDN, String bypassUserDN, Control... controls) Creates a new set subtree accessibility extended request that will place the specified subtree in a to-be-deleted state.createSetToBeDeletedRequest(Collection<String> subtreeBaseDNs, String bypassUserDN, Control... controls) Creates a new set subtree accessibility extended request that will place the specified subtrees in a to-be-deleted state.Creates a new instance of this LDAP request that may be modified without impacting this request.Creates a new instance of this LDAP request that may be modified without impacting this request.Retrieves the accessibility state to apply to the target subtrees.Retrieves the DN of the user that will be allowed to bypass the restrictions imposed on the target subtrees for all other users.Retrieves the user-friendly name for the extended request, if available.Retrieves the base DN for the target subtree.Retrieves the base DNs for all target subtrees.voidtoString(StringBuilder buffer) Appends a string representation of this request to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.ExtendedRequest
encodeProtocolOp, getLastMessageID, getOID, getOperationType, getProtocolOpType, getValue, hasValue, process, responseReceived, toCode, writeToMethods inherited from class com.unboundid.ldap.sdk.LDAPRequest
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getReferralConnectorInternal, getReferralDepth, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setReferralDepth, setResponseTimeoutMillis, toString
-
Field Details
-
SET_SUBTREE_ACCESSIBILITY_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.6.19) for the set subtree accessibility extended request.- See Also:
-
-
Constructor Details
-
SetSubtreeAccessibilityExtendedRequest
public SetSubtreeAccessibilityExtendedRequest(@NotNull ExtendedRequest extendedRequest) throws LDAPException Creates a new set subtree accessibility extended request from the provided generic extended request.- Parameters:
extendedRequest- The generic extended request to use to create this set subtree accessibility extended request.- Throws:
LDAPException- If a problem occurs while decoding the request.
-
-
Method Details
-
createSetAccessibleRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetAccessibleRequest(@NotNull String subtreeBaseDN, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtree accessible.- Parameters:
subtreeBaseDN- The base DN for the subtree to make accessible. It must not benull.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
createSetAccessibleRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetAccessibleRequest(@NotNull Collection<String> subtreeBaseDNs, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtrees accessible.- Parameters:
subtreeBaseDNs- The base DNs for the subtrees to make accessible. It must not benullor empty. If multiple base DNs are specified, then all must reside below the same backend base DN.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
createSetReadOnlyRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetReadOnlyRequest(@NotNull String subtreeBaseDN, boolean allowBind, @Nullable String bypassUserDN, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtree read-only.- Parameters:
subtreeBaseDN- The base DN for the subtree to make read-only. It must not benull.allowBind- Indicates whether users within the specified subtree will be allowed to bind.bypassUserDN- The DN of a user that will be allowed to perform write (add, delete, modify, and modify DN) operations in the specified subtree. It may benullif no bypass user is needed.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
createSetReadOnlyRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetReadOnlyRequest(@NotNull Collection<String> subtreeBaseDNs, boolean allowBind, @Nullable String bypassUserDN, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtrees read-only.- Parameters:
subtreeBaseDNs- The base DNs for the subtrees to make read-only. It must not benullor empty. If multiple base DNs are specified, then all must reside below the same backend base DN.allowBind- Indicates whether users within the specified subtrees will be allowed to bind.bypassUserDN- The DN of a user that will be allowed to perform write (add, delete, modify, and modify DN) operations in the specified subtrees. It may benullif no bypass user is needed.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
createSetHiddenRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetHiddenRequest(@NotNull String subtreeBaseDN, @Nullable String bypassUserDN, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtree hidden.- Parameters:
subtreeBaseDN- The base DN for the subtree to make hidden. It must not benull.bypassUserDN- The DN of a user that will be allowed to perform write (add, delete, modify, and modify DN) operations in the specified subtree. It may benullif no bypass user is needed.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
createSetHiddenRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetHiddenRequest(@NotNull Collection<String> subtreeBaseDNs, @Nullable String bypassUserDN, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will make the specified subtrees hidden.- Parameters:
subtreeBaseDNs- The base DNs for the subtrees to make hidden. It must not benullor empty. If multiple base DNs are specified, then all must reside below the same backend base DN.bypassUserDN- The DN of a user that will be allowed to perform write (add, delete, modify, and modify DN) operations in the specified subtrees. It may benullif no bypass user is needed.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
createSetToBeDeletedRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetToBeDeletedRequest(@NotNull String subtreeBaseDN, @NotNull String bypassUserDN, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will place the specified subtree in a to-be-deleted state. In this state, the subtree will exhibit the same characteristics as a hidden subtree, but with the added restriction that the accessibility state cannot be changed, and the restriction will only be removed when the base entry of the target subtree has been deleted.- Parameters:
subtreeBaseDN- The base DN for the subtree to mark as to-be-deleted. It must not benull.bypassUserDN- The DN of a user that will be allowed to perform write (add, delete, modify, and modify DN) operations in the specified subtree. It must not benull.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
createSetToBeDeletedRequest
@NotNull public static SetSubtreeAccessibilityExtendedRequest createSetToBeDeletedRequest(@NotNull Collection<String> subtreeBaseDNs, @NotNull String bypassUserDN, @Nullable Control... controls) Creates a new set subtree accessibility extended request that will place the specified subtrees in a to-be-deleted state. In this state, the subtrees will exhibit the same characteristics as hidden subtrees, but with the added restriction that the accessibility state cannot be changed, and the restriction will only be removed when the base entry of the target subtree has been deleted.- Parameters:
subtreeBaseDNs- The base DNs for the subtrees to make hidden. It must not benullor empty. If multiple base DNs are specified, then all must reside below the same backend base DN.bypassUserDN- The DN of a user that will be allowed to perform write (add, delete, modify, and modify DN) operations in the specified subtrees. It must not benull.controls- The set of controls to include in the request. It may benullor empty if no controls are needed.- Returns:
- The set subtree accessibility extended request that was created.
-
getSubtreeBaseDN
Retrieves the base DN for the target subtree. Note that if multiple base DNs are defined, this will only retrieve the first. ThegetSubtreeBaseDNs()method should be used to get the complete set of target subtree base DNs.- Returns:
- The base DN for the target subtree.
-
getSubtreeBaseDNs
Retrieves the base DNs for all target subtrees.- Returns:
- The base DNs for all target subtrees.
-
getAccessibilityState
Retrieves the accessibility state to apply to the target subtrees.- Returns:
- The accessibility state to apply to the target subtrees.
-
getBypassUserDN
Retrieves the DN of the user that will be allowed to bypass the restrictions imposed on the target subtrees for all other users.- Returns:
- The DN of the user that will be allowed to bypass the restrictions
imposed on the target subtrees for all other users, or
nullif there are no restrictions to be imposed on the target subtrees or if no bypass user is defined for those subtrees.
-
duplicate
Creates a new instance of this LDAP request that may be modified without impacting this request.. Subclasses should override this method to return a duplicate of the appropriate type.- Specified by:
duplicatein interfaceReadOnlyLDAPRequest- Overrides:
duplicatein classExtendedRequest- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
duplicate
Creates a new instance of this LDAP request that may be modified without impacting this request. The provided controls will be used for the new request instead of duplicating the controls from this request.. Subclasses should override this method to return a duplicate of the appropriate type.- Specified by:
duplicatein interfaceReadOnlyLDAPRequest- Overrides:
duplicatein classExtendedRequest- Parameters:
controls- The set of controls to include in the duplicate request.- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
getExtendedRequestName
Retrieves the user-friendly name for the extended request, if available. If no user-friendly name has been defined, then the OID will be returned.- Overrides:
getExtendedRequestNamein classExtendedRequest- Returns:
- The user-friendly name for this extended request, or the OID if no user-friendly name is available.
-
toString
Appends a string representation of this request to the provided buffer.- Specified by:
toStringin interfaceProtocolOp- Specified by:
toStringin interfaceReadOnlyLDAPRequest- Overrides:
toStringin classExtendedRequest- Parameters:
buffer- The buffer to which to append a string representation of this request.
-