|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.unboundidds.controls.AccountUsableResponseControl
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AccountUsableResponseControl
NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.This class provides an implementation of the account usable response control, which may be returned with search result entries to provide information about the usability of the associated user accounts.
accountIsActive
-- Indicates that the account is active and may
include the length of time in seconds until the password expires.accountIsInactive
-- Indicates that the account has been locked
or deactivated.mustChangePassword
-- Indicates that the user must change his
or her password before being allowed to perform any other
operations.passwordIsExpired
-- Indicates that the user's password has
expired.remainingGraceLogins
-- Indicates the number of grace logins
remaining for the user.secondsUntilUnlock
-- Indicates the length of time in seconds
until the account will be automatically unlocked.AccountUsableRequestControl
documentation for an example
demonstrating the use of the account usable request and response controls.
ACCOUNT_USABLE_RESPONSE ::= CHOICE { isUsable [0] INTEGER, -- Seconds until password expiration -- isNotUsable [1] MORE_INFO } MORE_INFO ::= SEQUENCE { accountIsInactive [0] BOOLEAN DEFAULT FALSE, mustChangePassword [1] BOOLEAN DEFAULT FALSE, passwordIsExpired [2] BOOLEAN DEFAULT FALSE, remainingGraceLogins [3] INTEGER OPTIONAL, secondsUntilUnlock [4] INTEGER OPTIONAL }
Field Summary | |
---|---|
static java.lang.String |
ACCOUNT_USABLE_RESPONSE_OID
The OID (1.3.6.1.4.1.42.2.27.9.5.8) for the account usable response control. |
Constructor Summary | |
---|---|
AccountUsableResponseControl(boolean isInactive,
boolean mustChangePassword,
boolean passwordIsExpired,
int remainingGraceLogins,
int secondsUntilUnlock)
Creates a new account usable response control which indicates that the account is not usable. |
|
AccountUsableResponseControl(int secondsUntilExpiration)
Creates a new account usable response control which indicates that the account is usable. |
|
AccountUsableResponseControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new account usable response control with the provided information. |
Method Summary | |
---|---|
AccountUsableResponseControl |
decodeControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new instance of this decodeable control from the provided information. |
static AccountUsableResponseControl |
get(SearchResultEntry entry)
Extracts an account usable response control from the provided search result entry. |
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available. |
int |
getRemainingGraceLogins()
Retrieves the number of remaining grace logins for the user. |
int |
getSecondsUntilExpiration()
Retrieves the number of seconds until the user's password expires. |
int |
getSecondsUntilUnlock()
Retrieves the length of time in seconds until the user's account is automatically unlocked. |
java.util.List<java.lang.String> |
getUnusableReasons()
Retrieves the list of reasons that this account may be unusable. |
boolean |
isInactive()
Indicates whether the user account has been inactivated by a server administrator. |
boolean |
isUsable()
Indicates whether the associated user account is usable. |
boolean |
mustChangePassword()
Indicates whether the user must change his or her password before being allowed to perform any other operations. |
boolean |
passwordIsExpired()
Indicates whether the user's password is expired. |
void |
toString(java.lang.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, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, toString, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ACCOUNT_USABLE_RESPONSE_OID
Constructor Detail |
---|
public AccountUsableResponseControl(int secondsUntilExpiration)
secondsUntilExpiration
- The length of time in seconds until the
user's password expires, or -1 if password
expiration is not enabled for the user.public AccountUsableResponseControl(boolean isInactive, boolean mustChangePassword, boolean passwordIsExpired, int remainingGraceLogins, int secondsUntilUnlock)
isInactive
- Indicates whether the user account has been
inactivated.mustChangePassword
- Indicates whether the user is required to
change his/her password before any other
operations will be allowed.passwordIsExpired
- Indicates whether the user's password has
expired.remainingGraceLogins
- The number of remaining grace logins for the
user.secondsUntilUnlock
- The length of time in seconds until the
user's account will be automatically
unlocked.public AccountUsableResponseControl(java.lang.String oid, boolean isCritical, ASN1OctetString value) throws LDAPException
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.
LDAPException
- If the provided control cannot be decoded as an
account usable response control.Method Detail |
---|
public AccountUsableResponseControl decodeControl(java.lang.String oid, boolean isCritical, ASN1OctetString value) throws LDAPException
decodeControl
in interface DecodeableControl
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.
LDAPException
- If the provided information cannot be decoded as a
valid instance of this decodeable control.public static AccountUsableResponseControl get(SearchResultEntry entry) throws LDAPException
entry
- The search result entry from which to retrieve the account
usable response control.
null
if the entry did not contain
an account usable response control.
LDAPException
- If a problem is encountered while attempting to
decode the account usable response control
contained in the provided result.public boolean isUsable()
true
if the user account is usable, or false
if
not.public java.util.List<java.lang.String> getUnusableReasons()
public int getSecondsUntilExpiration()
public boolean isInactive()
true
if the user account has been inactivated by a server
administrator, or false
if not.public boolean mustChangePassword()
true
if the user must change his or her password before
being allowed to perform any other operations, or false
if
not.public boolean passwordIsExpired()
true
if the user's password is expired, or false
if not.public int getRemainingGraceLogins()
public int getSecondsUntilUnlock()
public java.lang.String getControlName()
getControlName
in class Control
public void toString(java.lang.StringBuilder buffer)
toString
in class Control
buffer
- The buffer to which to append the string representation of
this buffer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |