Class GetUserResourceLimitsResponseControl
java.lang.Object
com.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.unboundidds.controls.GetUserResourceLimitsResponseControl
- All Implemented Interfaces:
DecodeableControl,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class GetUserResourceLimitsResponseControl
extends Control
implements DecodeableControl
This class provides a response control that may be included in the response
to a successful bind operation in order to provide information about custom
resource limits for the user, including size limit, time limit, idle time
limit, lookthrough limit, equivalent authorization user DN, and client
connection policy name.
The criticality for this control should be
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 criticality for this control should be
false. It must have a
value with the following encoding:
USER_RESOURCE_LIMITS_VALUE ::= SEQUENCE {
sizeLimit [0] INTEGER OPTIONAL,
timeLimitSeconds [1] INTEGER OPTIONAL,
idleTimeLimitSeconds [2] INTEGER OPTIONAL,
lookthroughLimit [3] INTEGER OPTIONAL,
equivalentAuthzUserDN [4] LDAPDN OPTIONAL,
clientConnectionPolicyName [5] OCTET STRING OPTIONAL,
groupDNs [6] SET OF OCTET STRING OPTIONAL,
privilegeNames [7] SET OF OCTET STRING OPTIONAL,
otherAttributes [8] PartialAttributeList OPTIONAL,
... }
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.30221.2.5.26) for the get user resource limits response control. -
Constructor Summary
ConstructorsConstructorDescriptionGetUserResourceLimitsResponseControl(Long sizeLimit, Long timeLimitSeconds, Long idleTimeLimitSeconds, Long lookthroughLimit, String equivalentAuthzUserDN, String clientConnectionPolicyName) Creates a new get user resource limits response control with the provided information.GetUserResourceLimitsResponseControl(Long sizeLimit, Long timeLimitSeconds, Long idleTimeLimitSeconds, Long lookthroughLimit, String equivalentAuthzUserDN, String clientConnectionPolicyName, List<String> groupDNs, List<String> privilegeNames, List<Attribute> otherAttributes) Creates a new get user resource limits response control with the provided information.GetUserResourceLimitsResponseControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new get user resource limits response control decoded from the given generic control contents. -
Method Summary
Modifier and TypeMethodDescriptiondecodeControl(String oid, boolean isCritical, ASN1OctetString value) Creates a new instance of this decodeable control from the provided information.decodeJSONControl(JSONObject controlObject, boolean strict) Attempts to decode the provided object as a JSON representation of a get user resource limits response control.get(BindResult result) Extracts a get user resource limits response control from the provided result.Retrieves the name of the client connection policy that has been assigned to the user, if available.Retrieves the user-friendly name for this control, if available.Retrieves the equivalent authorization user DN, for use in servers in an entry-balancing environment in which the user's entry does not exist.Retrieves the DNs of any groups in which the user is a member.Retrieves the custom idle time limit for the user in seconds, if available.Retrieves the custom lookthrough limit for the user, if available.getOtherAttribute(String name) Retrieves the "other" attribute with the specified name.Retrieves a list containing additional attributes from the user's entry.Retrieves the names of any privileges assigned to the user.Retrieves the custom size limit for the user, if available.Retrieves the custom time limit for the user in seconds, if available.Retrieves a representation of this get user resource limits response 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
-
GET_USER_RESOURCE_LIMITS_RESPONSE_OID
The OID (1.3.6.1.4.1.30221.2.5.26) for the get user resource limits response control.- See Also:
-
-
Constructor Details
-
GetUserResourceLimitsResponseControl
public GetUserResourceLimitsResponseControl(@Nullable Long sizeLimit, @Nullable Long timeLimitSeconds, @Nullable Long idleTimeLimitSeconds, @Nullable Long lookthroughLimit, @Nullable String equivalentAuthzUserDN, @Nullable String clientConnectionPolicyName) Creates a new get user resource limits response control with the provided information.- Parameters:
sizeLimit- The custom size limit for the user. It may be less than or equal to zero if no size limit should be enforced for the user. It may benullif there is no custom size limit or it is not to be included in the control.timeLimitSeconds- The custom time limit for the user, in seconds. It may be less than or equal to zero if no time limit should be enforced for the user. It may benullif there is no custom time limit or it is not to be included in the control.idleTimeLimitSeconds- The custom idle time limit for the user, in seconds. It may be less than or equal to zero if no idle time limit should be enforced for the user. It may benullif there is no custom idle time limit or it is not to be included in the control.lookthroughLimit- The custom lookthrough limit for the user. It may be less than or equal to zero if no lookthrough limit should be enforced for the user. It may benullif there is no custom lookthrough limit for the user or it is not to be included in the control.equivalentAuthzUserDN- The DN of a user with equivalent authorization rights for use in servers in an entry-balancing environment in which the user's entry does not exist. It may be an empty string if the equivalent authorization should be anonymous, ornullif there is no custom equivalent authorization user DN or it is not to be included in the control.clientConnectionPolicyName- The name of the client connection policy that has been assigned to the user, ornullif the client connection policy name is not to be included in the control.
-
GetUserResourceLimitsResponseControl
public GetUserResourceLimitsResponseControl(@Nullable Long sizeLimit, @Nullable Long timeLimitSeconds, @Nullable Long idleTimeLimitSeconds, @Nullable Long lookthroughLimit, @Nullable String equivalentAuthzUserDN, @Nullable String clientConnectionPolicyName, @Nullable List<String> groupDNs, @Nullable List<String> privilegeNames, @Nullable List<Attribute> otherAttributes) Creates a new get user resource limits response control with the provided information.- Parameters:
sizeLimit- The custom size limit for the user. It may be less than or equal to zero if no size limit should be enforced for the user. It may benullif there is no custom size limit or it is not to be included in the control.timeLimitSeconds- The custom time limit for the user, in seconds. It may be less than or equal to zero if no time limit should be enforced for the user. It may benullif there is no custom time limit or it is not to be included in the control.idleTimeLimitSeconds- The custom idle time limit for the user, in seconds. It may be less than or equal to zero if no idle time limit should be enforced for the user. It may benullif there is no custom idle time limit or it is not to be included in the control.lookthroughLimit- The custom lookthrough limit for the user. It may be less than or equal to zero if no lookthrough limit should be enforced for the user. It may benullif there is no custom lookthrough limit for the user or it is not to be included in the control.equivalentAuthzUserDN- The DN of a user with equivalent authorization rights for use in servers in an entry-balancing environment in which the user's entry does not exist. It may be an empty string if the equivalent authorization should be anonymous, ornullif there is no custom equivalent authorization user DN or it is not to be included in the control.clientConnectionPolicyName- The name of the client connection policy that has been assigned to the user, ornullif the client connection policy name is not to be included in the control.groupDNs- The DNs of the groups in which the user is a member. It may benullif group membership is not known, or empty if the user isn't a member of any groups.privilegeNames- The names of the privileges assigned to the user. It may benullif the privilege names are not known, or empty if the user doesn't have any privileges.otherAttributes- A set of additional attributes from the user's entry. It may benullor empty if no additional attributes are needed.
-
GetUserResourceLimitsResponseControl
public GetUserResourceLimitsResponseControl(@NotNull String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException Creates a new get user resource limits response control decoded from the given generic control contents.- Parameters:
oid- The OID for the control.isCritical- Indicates whether this control should be marked critical.value- The value for the control. It may benullif the control to decode does not have a value.- Throws:
LDAPException- If a problem occurs while attempting to decode the generic control as a get user resource limits response control.
-
-
Method Details
-
decodeControl
@NotNull public GetUserResourceLimitsResponseControl 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 GetUserResourceLimitsResponseControl get(@NotNull BindResult result) throws LDAPException Extracts a get user resource limits response control from the provided result.- Parameters:
result- The bind result from which to retrieve the get user resource limits response control.- Returns:
- The get user resource limits response control contained in the
provided result, or
nullif the result did not contain a get user resource limits response control. - Throws:
LDAPException- If a problem is encountered while attempting to decode the get user resource limits response control contained in the provided result.
-
getSizeLimit
Retrieves the custom size limit for the user, if available.- Returns:
- The custom size limit for the user, -1 if no size limit should be
enforced for the user, or
nullif no custom size limit was included in the control.
-
getTimeLimitSeconds
Retrieves the custom time limit for the user in seconds, if available.- Returns:
- The custom time limit for the user in seconds, -1 if no time limit
should be enforced for the user, or
nullif no custom time limit was included in the control.
-
getIdleTimeLimitSeconds
Retrieves the custom idle time limit for the user in seconds, if available.- Returns:
- The custom idle time limit for the user in seconds, -1 if no idle
time limit should be enforced for the user, or
nullif no custom idle time limit was included in the control.
-
getLookthroughLimit
Retrieves the custom lookthrough limit for the user, if available.- Returns:
- The custom lookthrough limit for the user, -1 if no lookthrough
limit should be enforced for the user, or
nullif no custom lookthrough limit was included in the control.
-
getEquivalentAuthzUserDN
Retrieves the equivalent authorization user DN, for use in servers in an entry-balancing environment in which the user's entry does not exist.- Returns:
- The equivalent authorization user DN for the user, an empty string
if the equivalent authorization is anonymous, or
nullif no equivalent authorization user DN was included in the control.
-
getClientConnectionPolicyName
Retrieves the name of the client connection policy that has been assigned to the user, if available.- Returns:
- The name of the client connection policy that has been assigned to
the user, or
nullif the client connection policy name was not included in the control.
-
getGroupDNs
Retrieves the DNs of any groups in which the user is a member.- Returns:
- The DNs of any groups in which the user is a member, an empty list
if the user is not a member of any groups, or
nullif the set of group DNs is not known.
-
getPrivilegeNames
Retrieves the names of any privileges assigned to the user.- Returns:
- The names of any privileges assigned to the user, an empty list if
the user is known to have no privileges, or
nullif the set of user privileges is not known.
-
getOtherAttributes
Retrieves a list containing additional attributes from the user's entry.- Returns:
- A list containing additional attributes from the user's entry, or an empty list if no additional attributes were provided.
-
getOtherAttribute
Retrieves the "other" attribute with the specified name.- Parameters:
name- The name of the "other" attribute to retrieve. It must not benull.- Returns:
- The "other" attribute with the specified name, or
nullif there is no such "other" attribute.
-
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 get user resource limits response 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 get user resource limits response control, the OID is "1.3.6.1.4.1.30221.2.5.26". -
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 get user resource limits response 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 get user resource limits response control. Exactly one of thevalue-base64andvalue-jsonfields must be present, and if thevalue-jsonfield is used, then it will use the following fields:-
size-limit-- An optional integer field whose value is the effective search size limit for the user. -
time-limit-seconds-- An optional integer field whose value is the effective search time limit (in seconds) for the user. -
idle-time-limit-seconds-- An optional integer field whose value is the effective idle time limit (in seconds) for the user. -
lookthrough-limit-- An optional integer field whose value is the maximum number of entries that the server may examine in the course of processing any single search operation for the user. -
equivalent-authorization-user-dn-- An optional string field whose value is the DN of a user entry that is meant to have roughly equivalent access control rights to the authenticated user. -
client-connection-policy-name-- An optional string field whose value is the name of the client connection policy that has been assigned to the client connection. -
group-dns-- An optional array field whose values are strings that represent the DNs of the groups in which the user is a member. -
privilege-names-- An optional array field whose values are strings that represent the names of the privileges assigned to the user. -
other attributes-- An optional array field whose values are JSON objects that represent additional attributes of note from the user's entry. Each of these JSON objects will include the following fields:-
name-- A string field whose value is the name of the additional attribute. -
values-- An array field whose values are strings that represent the values for the attribute.
-
-
- Overrides:
toJSONControlin classControl- Returns:
- A JSON object that contains a representation of this control.
-
-
decodeJSONControl
@NotNull public static GetUserResourceLimitsResponseControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException Attempts to decode the provided object as a JSON representation of a get user resource limits response 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 get user resource limits response control that was decoded from the provided JSON object.
- Throws:
LDAPException- If the provided JSON object cannot be parsed as a valid get user resource limits response control.
-
toString
Appends a string representation of this LDAP control to the provided buffer.
-