Class OverrideSearchLimitsRequestControl
java.lang.Object
com.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.unboundidds.controls.OverrideSearchLimitsRequestControl
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class OverrideSearchLimitsRequestControl
extends Control
This class provides an implementation of a control that may be included in a
search request to override certain default limits that would normally be in
place for the operation. The override behavior is specified using one or
more name-value pairs, with property names being case sensitive.
The control has an OID of 1.3.6.1.4.1.30221.2.5.56, a criticality of either
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 control has an OID of 1.3.6.1.4.1.30221.2.5.56, a criticality of either
true or false, and a value with the provided encoding:
that contains a mapping of one or
more case-sensitive property-value pairs. Property names will be treated in
a case-sensitive manner.
the following encoding:
OverrideSearchLimitsRequestValue ::= SEQUENCE OF SEQUENCE {
propertyName OCTET STRING,
propertyValue OCTET STRING }
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.30221.2.5.56) for the override search limits request control. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this override search limits request control that is decoded from the provided generic control.OverrideSearchLimitsRequestControl(String propertyName, String propertyValue) Creates a new instance of this override search limits request control with the specified property name and value.OverrideSearchLimitsRequestControl(Map<String, String> properties, boolean isCritical) Creates a new instance of this override search limits request control with the provided set of properties. -
Method Summary
Modifier and TypeMethodDescriptiondecodeJSONControl(JSONObject controlObject, boolean strict) Attempts to decode the provided object as a JSON representation of an override search limits request control.Retrieves the user-friendly name for this control, if available.Retrieves a map of the properties included in this request control.getProperty(String propertyName) Retrieves the value of the specified property.getPropertyAsBoolean(String propertyName, Boolean defaultValue) Retrieves the value of the specified property as aBoolean.getPropertyAsInteger(String propertyName, Integer defaultValue) Retrieves the value of the specified property as anInteger.getPropertyAsLong(String propertyName, Long defaultValue) Retrieves the value of the specified property as aLong.Retrieves a representation of this override search limits request control as a JSON object.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, toString, writeTo
-
Field Details
-
OVERRIDE_SEARCH_LIMITS_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.56) for the override search limits request control.- See Also:
-
-
Constructor Details
-
OverrideSearchLimitsRequestControl
public OverrideSearchLimitsRequestControl(@NotNull String propertyName, @NotNull String propertyValue) Creates a new instance of this override search limits request control with the specified property name and value. It will not be critical.- Parameters:
propertyName- The name of the property to set. It must not benullor empty.propertyValue- The value for the specified property. It must not benullor empty.
-
OverrideSearchLimitsRequestControl
public OverrideSearchLimitsRequestControl(@NotNull Map<String, String> properties, boolean isCritical) Creates a new instance of this override search limits request control with the provided set of properties.- Parameters:
properties- The map of properties to set in this control. It must not benullor empty, and none of the keys or values inside it may benullor empty.isCritical- Indicates whether the control should be considered critical.
-
OverrideSearchLimitsRequestControl
Creates a new instance of this override search limits request control that is decoded from the provided generic control.- Parameters:
control- The generic control to decode as an override search limits request control. It must not benull.- Throws:
LDAPException- If the provided control cannot be decoded as an override search limits request control.
-
-
Method Details
-
getProperties
Retrieves a map of the properties included in this request control.- Returns:
- A map of the properties included in this request control.
-
getProperty
Retrieves the value of the specified property.- Parameters:
propertyName- The name of the property for which to retrieve the value. It must not benullor empty, and it will be treated in a case-sensitive manner.- Returns:
- The value of the requested property, or
nullif the property is not set in the control.
-
getPropertyAsBoolean
@Nullable public Boolean getPropertyAsBoolean(@NotNull String propertyName, @Nullable Boolean defaultValue) Retrieves the value of the specified property as aBoolean.- Parameters:
propertyName- The name of the property for which to retrieve the value. It must not benullor empty, and it will be treated in a case-sensitive manner.defaultValue- The default value that will be used if the requested property is not set or if its value cannot be parsed as aBoolean. It may benullif the default value should benull.- Returns:
- The Boolean value of the requested property, or the provided
default value if the property is not set or if its value cannot be
parsed as a
Boolean.
-
getPropertyAsInteger
@Nullable public Integer getPropertyAsInteger(@NotNull String propertyName, @Nullable Integer defaultValue) Retrieves the value of the specified property as anInteger.- Parameters:
propertyName- The name of the property for which to retrieve the value. It must not benullor empty, and it will be treated in a case-sensitive manner.defaultValue- The default value that will be used if the requested property is not set or if its value cannot be parsed as anInteger. It may benullif the default value should benull.- Returns:
- The integer value of the requested property, or the provided
default value if the property is not set or if its value cannot be
parsed as an
Integer.
-
getPropertyAsLong
Retrieves the value of the specified property as aLong.- Parameters:
propertyName- The name of the property for which to retrieve the value. It must not benullor empty, and it will be treated in a case-sensitive manner.defaultValue- The default value that will be used if the requested property is not set or if its value cannot be parsed as anLong. It may benullif the default value should benull.- Returns:
- The long value of the requested property, or the provided default
value if the property is not set or if its value cannot be parsed
as a
Long.
-
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.
-
toJSONControl
Retrieves a representation of this override search limits request control as a JSON object. The JSON object uses the following fields:-
oid-- A mandatory string field whose value is the object identifier for this control. For the override search limits request control, the OID is "1.3.6.1.4.1.30221.2.5.56". -
control-name-- An optional string field whose value is a human-readable name for this control. This field is only intended for descriptive purposes, and when decoding a control, theoidfield should be used to identify the type of control. -
criticality-- A mandatory Boolean field used to indicate whether this control is considered critical. -
value-base64-- An optional string field whose value is a base64-encoded representation of the raw value for this override search limits request control. Exactly one of thevalue-base64andvalue-jsonfields must be present. -
value-json-- An optional JSON object field whose value is a user-friendly representation of the value for this override search limits request control. Exactly one of thevalue-base64andvalue-jsonfields must be present, and if thevalue-jsonfield is used, then it will use the following fields:-
properties-- A mandatory array field whose values are JSON objects with the properties to use for this control. Each of these JSON objects uses the following fields:-
name-- A mandatory string field whose value is the property name. -
value-- A mandatory string field whose value is the property value.
-
-
- Overrides:
toJSONControlin classControl- Returns:
- A JSON object that contains a representation of this control.
-
-
decodeJSONControl
@NotNull public static OverrideSearchLimitsRequestControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException Attempts to decode the provided object as a JSON representation of an override search limits request control.- Parameters:
controlObject- The JSON object to be decoded. It must not benull.strict- Indicates whether to use strict mode when decoding the provided JSON object. If this istrue, then this method will throw an exception if the provided JSON object contains any unrecognized fields. If this isfalse, then unrecognized fields will be ignored.- Returns:
- The override search limits request control that was decoded from the provided JSON object.
- Throws:
LDAPException- If the provided JSON object cannot be parsed as a valid override search limits request control.
-
toString
Appends a string representation of this LDAP control to the provided buffer.
-