|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.Control
org.opends.server.controls.AccountUsableResponseControl
public class AccountUsableResponseControl
This class implements the account usable response control. This is a
Sun-defined control with OID 1.3.6.1.4.1.42.2.27.9.5.8. The value of this
control is composed according to the following BNF:
ACCOUNT_USABLE_RESPONSE ::= CHOICE { is_available [0] INTEGER, -- Seconds before expiration -- is_not_available [1] MORE_INFO } MORE_INFO ::= SEQUENCE { inactive [0] BOOLEAN DEFAULT FALSE, reset [1] BOOLEAN DEFAULT FALSE, expired [2] BOOLEAN DEFAULT_FALSE, remaining_grace [3] INTEGER OPTIONAL, seconds_before_unlock [4] INTEGER OPTIONAL }
Field Summary | |
---|---|
static byte |
TYPE_EXPIRED
The BER type to use for the MORE_INFO element that indicates that the user's password is expired. |
static byte |
TYPE_INACTIVE
The BER type to use for the MORE_INFO element that indicates that the account has been inactivated. |
static byte |
TYPE_MORE_INFO
The BER type to use for the MORE_INFO sequence when the account is not available. |
static byte |
TYPE_REMAINING_GRACE_LOGINS
The BER type to use for the MORE_INFO element that provides the number of remaining grace logins. |
static byte |
TYPE_RESET
The BER type to use for the MORE_INFO element that indicates that the password has been administratively reset. |
static byte |
TYPE_SECONDS_BEFORE_EXPIRATION
The BER type to use for the seconds before expiration when the account is available. |
static byte |
TYPE_SECONDS_BEFORE_UNLOCK
The BER type to use for the MORE_INFO element that indicates that the password has been administratively reset. |
Constructor Summary | |
---|---|
AccountUsableResponseControl(boolean isInactive,
boolean isReset,
boolean isExpired,
int remainingGraceLogins,
boolean isLocked,
int secondsBeforeUnlock)
Creates a new account usability response control that may be used to indicate that the account is not available and provide information about the underlying reason. |
|
AccountUsableResponseControl(int secondsBeforeExpiration)
Creates a new account usability response control that may be used to indicate that the account is available and provide the number of seconds until expiration. |
|
AccountUsableResponseControl(java.lang.String oid,
boolean isCritical,
boolean isInactive,
boolean isReset,
boolean isExpired,
int remainingGraceLogins,
boolean isLocked,
int secondsBeforeUnlock)
Creates a new account usability response control that may be used to indicate that the account is not available and provide information about the underlying reason. |
|
AccountUsableResponseControl(java.lang.String oid,
boolean isCritical,
int secondsBeforeExpiration)
Creates a new account usability response control that may be used to indicate that the account is available and provide the number of seconds until expiration. |
Method Summary | |
---|---|
static AccountUsableResponseControl |
decodeControl(Control control)
Creates a new account usable response control from the contents of the provided control. |
int |
getRemainingGraceLogins()
Retrieves the number of remaining grace logins for the user. |
int |
getSecondsBeforeExpiration()
Retrieves the length of time in seconds before the user's password expires. |
int |
getSecondsBeforeUnlock()
Retrieves the length of time in seconds before the user's account is automatically unlocked. |
boolean |
isExpired()
Indicates whether the user's password is expired. |
boolean |
isInactive()
Indicates whether the user's account has been inactivated by an administrator. |
boolean |
isLocked()
Indicates whether the user's account is locked for some reason. |
boolean |
isReset()
Indicates whether the user's password has been administratively reset and the user must change that password before any other operations will be allowed. |
boolean |
isUsable()
Indicates whether the associated user account is available for use. |
java.lang.String |
toString()
Retrieves a string representation of this password policy response control. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this password policy response control to the provided buffer. |
Methods inherited from class org.opends.server.types.Control |
---|
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte TYPE_SECONDS_BEFORE_EXPIRATION
public static final byte TYPE_MORE_INFO
public static final byte TYPE_INACTIVE
public static final byte TYPE_RESET
public static final byte TYPE_EXPIRED
public static final byte TYPE_REMAINING_GRACE_LOGINS
public static final byte TYPE_SECONDS_BEFORE_UNLOCK
Constructor Detail |
---|
public AccountUsableResponseControl(int secondsBeforeExpiration)
secondsBeforeExpiration
- The length of time in seconds until the
user's password expires, or -1 if the
user's password will not expire or the
expiration time is unknown.public AccountUsableResponseControl(java.lang.String oid, boolean isCritical, int secondsBeforeExpiration)
oid
- The OID for this account usability
response control.isCritical
- Indicates whether this control should be
marked critical.secondsBeforeExpiration
- The length of time in seconds until the
user's password expires, or -1 if the
user's password will not expire or the
expiration time is unknown.public AccountUsableResponseControl(boolean isInactive, boolean isReset, boolean isExpired, int remainingGraceLogins, boolean isLocked, int secondsBeforeUnlock)
isInactive
- Indicates whether the user's account has been
inactivated by an administrator.isReset
- Indicates whether the user's password has
been reset by an administrator.isExpired
- Indicates whether the user's password is
expired.remainingGraceLogins
- The number of grace logins remaining. A
value of zero indicates that there are none
remaining. A value of -1 indicates that
grace login functionality is not enabled.isLocked
- Indicates whether the user's account is
currently locked out.secondsBeforeUnlock
- The length of time in seconds until the
account is unlocked. A value of -1 indicates
that the account will not be automatically
unlocked and must be reset by an
administrator.public AccountUsableResponseControl(java.lang.String oid, boolean isCritical, boolean isInactive, boolean isReset, boolean isExpired, int remainingGraceLogins, boolean isLocked, int secondsBeforeUnlock)
oid
- The OID for this account usability response
control.isCritical
- Indicates whether this control should be
marked critical.isInactive
- Indicates whether the user's account has been
inactivated by an administrator.isReset
- Indicates whether the user's password has
been reset by an administrator.isExpired
- Indicates whether the user's password is
expired.remainingGraceLogins
- The number of grace logins remaining. A
value of zero indicates that there are none
remaining. A value of -1 indicates that
grace login functionality is not enabled.isLocked
- Indicates whether the user's account is
currently locked out.secondsBeforeUnlock
- The length of time in seconds until the
account is unlocked. A value of -1 indicates
that the account will not be automatically
unlocked and must be reset by an
administrator.Method Detail |
---|
public static AccountUsableResponseControl decodeControl(Control control) throws LDAPException
control
- The generic control containing the information to use to
create this account usable response control.
LDAPException
- If this control cannot be decoded as a valid
account usable response control.public boolean isUsable()
true
if the associated user account is available, or
false
if not.public int getSecondsBeforeExpiration()
public boolean isInactive()
true
if the user's account has been inactivated by
an administrator, or false
if not.public boolean isReset()
true
if the user's password has been administratively
reset, or false
if not.public boolean isExpired()
true
if the user's password is expired, or
false
if not.public int getRemainingGraceLogins()
public boolean isLocked()
true
if the user's account is locked, or
false
if it is not.public int getSecondsBeforeUnlock()
public java.lang.String toString()
toString
in class Control
public void toString(java.lang.StringBuilder buffer)
toString
in class Control
buffer
- The buffer to which the information should be appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |