@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class ModifiablePasswordPolicyStateJSONBuilder extends java.lang.Object implements java.io.Serializable
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.
Constructor and Description |
---|
ModifiablePasswordPolicyStateJSONBuilder()
Creates a new builder instance with none of the fields set.
|
ModifiablePasswordPolicyStateJSONBuilder(ModifiablePasswordPolicyStateJSON state)
Creates a new builder instance with values set from the provided modifiable
password policy state object.
|
Modifier and Type | Method and Description |
---|---|
ModifiablePasswordPolicyStateJSON |
build()
Creates a
ModifiablePasswordPolicyStateJSON object from the
contents of this builder. |
ModifiablePasswordPolicyStateJSONBuilder |
clearAccountActivationTime()
Updates this builder so that any existing account activation time value
will be cleared in the user entry.
|
ModifiablePasswordPolicyStateJSONBuilder |
clearAccountExpirationTime()
Updates this builder so that any existing account expiration time value
will be cleared in the user entry.
|
ModifiablePasswordPolicyStateJSONBuilder |
clearPasswordChangedTime()
Updates this builder so that any existing password changed time value will
be cleared in the user entry.
|
ModifiablePasswordPolicyStateJSONBuilder |
clearPasswordExpirationWarnedTime()
Updates this builder so that any existing password expiration warned time
value will be cleared in the user entry.
|
java.lang.Long |
getAccountActivationTime()
Retrieves a timestamp that indicates the time the user's account became (or
will become) active.
|
java.lang.Long |
getAccountExpirationTime()
Retrieves a timestamp that indicates the time the user's account will (or
did) expire.
|
java.lang.Boolean |
getAccountIsDisabled()
Retrieves the value of a flag that indicates whether the user's account has
been administratively disabled.
|
java.lang.Boolean |
getAccountIsFailureLocked()
Retrieves the value of a flag that indicates whether the user account is
currently locked as a result of too many failed authentication attempts.
|
java.lang.Boolean |
getMustChangePassword()
Retrieves the value of a flag that indicates whether the user must change
their password before they will be allowed to perform any other operations
in the server.
|
java.lang.Long |
getPasswordChangedTime()
Retrieves a timestamp that indicates the time the user's password was last
changed.
|
java.lang.Long |
getPasswordExpirationWarnedTime()
Retrieves a timestamp that indicates the time the user was first warned
about an upcoming password expiration.
|
ModifiablePasswordPolicyStateJSONBuilder |
setAccountActivationTime(java.util.Date accountActivationTime)
Updates this builder with a new account activation time.
|
ModifiablePasswordPolicyStateJSONBuilder |
setAccountActivationTime(java.lang.Long accountActivationTime)
Updates this builder with a new account activation time.
|
ModifiablePasswordPolicyStateJSONBuilder |
setAccountExpirationTime(java.util.Date accountExpirationTime)
Updates this builder with a new account expiration time.
|
ModifiablePasswordPolicyStateJSONBuilder |
setAccountExpirationTime(java.lang.Long accountExpirationTime)
Updates this builder with a new account expiration time.
|
ModifiablePasswordPolicyStateJSONBuilder |
setAccountIsDisabled(java.lang.Boolean accountIsDisabled)
Updates this builder with a new value for the flag indicating whether the
user's account should be considered disabled.
|
ModifiablePasswordPolicyStateJSONBuilder |
setAccountIsFailureLocked(java.lang.Boolean accountIsFailureLocked)
Updates this builder with a new value for the flag indicating whether the
user's account should be considered locked as a result of too many failed
authentication attempts.
|
ModifiablePasswordPolicyStateJSONBuilder |
setMustChangePassword(java.lang.Boolean mustChangePassword)
Updates this builder with a new value for the flag indicating whether the
user must change their password before they will be allowed to perform
other operations in the server.
|
ModifiablePasswordPolicyStateJSONBuilder |
setPasswordChangedTime(java.util.Date passwordChangedTime)
Updates this builder with a new password changed time.
|
ModifiablePasswordPolicyStateJSONBuilder |
setPasswordChangedTime(java.lang.Long passwordChangedTime)
Updates this builder with a new password changed time.
|
ModifiablePasswordPolicyStateJSONBuilder |
setPasswordExpirationWarnedTime(java.util.Date passwordExpirationWarnedTime)
Updates this builder with a new password expiration warned time.
|
ModifiablePasswordPolicyStateJSONBuilder |
setPasswordExpirationWarnedTime(java.lang.Long passwordExpirationWarnedTime)
Updates this builder with a new password expiration warned time.
|
JSONObject |
toJSONObject()
Retrieves a JSON object with an encoded representation of the modifiable
password policy state created from this builder.
|
ModifyRequest |
toModifyRequest(java.lang.String userDN)
Creates a modify request that may be used to update the specified user with
the appropriate password policy state changes from this builder.
|
java.lang.String |
toString()
Retrieves a string representation of the password policy state information.
|
public ModifiablePasswordPolicyStateJSONBuilder()
public ModifiablePasswordPolicyStateJSONBuilder(@NotNull ModifiablePasswordPolicyStateJSON state)
state
- The modifiable password policy state object to use to set
the initial values for all of the fields.@Nullable public java.lang.Long getPasswordChangedTime()
System.currentTimeMillis
), a negative value if the field
was present with a JSON null value (indicating that the user
doesn't have a password changed time), or null
if the
field was not included in the JSON object.@NotNull public ModifiablePasswordPolicyStateJSONBuilder setPasswordChangedTime(@Nullable java.lang.Long passwordChangedTime)
passwordChangedTime
- The new password changed time value to use. It may be a
positive value representing the number of milliseconds since
the epoch (the same format used by
System.currentTimeMillis
) for the password changed
time, a negative value to indicate that any existing password
changed time value should be cleared, or null
if the
value should not be set in this builder (and therefore omitted
from any JSON object or
ModifiablePasswordPolicyStateJSON
that is created).@NotNull public ModifiablePasswordPolicyStateJSONBuilder setPasswordChangedTime(@Nullable java.util.Date passwordChangedTime)
passwordChangedTime
- The new password changed time value to use. It may be
null
if any existing password changed time value
should be cleared.@NotNull public ModifiablePasswordPolicyStateJSONBuilder clearPasswordChangedTime()
@Nullable public java.lang.Boolean getAccountIsDisabled()
Boolean.TRUE
if the account has been administratively
disabled, Boolean.FALSE
if the account has not been
administratively disabled, or null
if this flag was not
included in the password policy state JSON object.@NotNull public ModifiablePasswordPolicyStateJSONBuilder setAccountIsDisabled(@Nullable java.lang.Boolean accountIsDisabled)
accountIsDisabled
- The new account is disabled value to use. It may be
null
if the value should not be set in this builder
(and therefore omitted from any JSON object or
ModifiablePasswordPolicyStateJSON
that is created).@Nullable public java.lang.Long getAccountActivationTime()
System.currentTimeMillis
), a negative value if the field
was present with a JSON null value (indicating that the user
doesn't have an account activation time), or null
if the
field was not included in the JSON object.@NotNull public ModifiablePasswordPolicyStateJSONBuilder setAccountActivationTime(@Nullable java.lang.Long accountActivationTime)
accountActivationTime
- The new account activation time value to use. It may be a
positive value representing the number of milliseconds since
the epoch (the same format used by
System.currentTimeMillis
) for the account activation
time, a negative value to indicate that any existing account
activation time value should be cleared, or null
if
the value should not be set in this builder (and therefore
omitted from any JSON object or
ModifiablePasswordPolicyStateJSON
that is created).@NotNull public ModifiablePasswordPolicyStateJSONBuilder setAccountActivationTime(@Nullable java.util.Date accountActivationTime)
accountActivationTime
- The new account activation time value to use. It may be
null
if any existing account activation time value
should be cleared.@NotNull public ModifiablePasswordPolicyStateJSONBuilder clearAccountActivationTime()
@Nullable public java.lang.Long getAccountExpirationTime()
System.currentTimeMillis
), a negative value if the field
was present with a JSON null value (indicating that the user
doesn't have an account expiration time), or null
if the
field was not included in the JSON object.@NotNull public ModifiablePasswordPolicyStateJSONBuilder setAccountExpirationTime(@Nullable java.lang.Long accountExpirationTime)
accountExpirationTime
- The new account expiration time value to use. It may be a
positive value representing the number of milliseconds since
the epoch (the same format used by
System.currentTimeMillis
) for the account expiration
time, a negative value to indicate that any existing account
expiration time value should be cleared, or null
if
the value should not be set in this builder (and therefore
omitted from any JSON object or
ModifiablePasswordPolicyStateJSON
that is created).@NotNull public ModifiablePasswordPolicyStateJSONBuilder setAccountExpirationTime(@Nullable java.util.Date accountExpirationTime)
accountExpirationTime
- The new account expiration time value to use. It may be
null
if any existing account expiration time value
should be cleared.@NotNull public ModifiablePasswordPolicyStateJSONBuilder clearAccountExpirationTime()
@Nullable public java.lang.Boolean getAccountIsFailureLocked()
Boolean.TRUE
if the user account is locked as a result of
too many failed authentication attempts, Boolean.FALSE
if
the user account is not locked because of too many failed
authentication attempts, or null
if this flag was not
included in the password policy state JSON object.@NotNull public ModifiablePasswordPolicyStateJSONBuilder setAccountIsFailureLocked(@Nullable java.lang.Boolean accountIsFailureLocked)
Boolean.TRUE
if failure lockout is not enabled in the
server.accountIsFailureLocked
- The new account is failure-locked value to use. It may be
null
if the value should not be set in this builder
(and therefore omitted from any JSON object or
ModifiablePasswordPolicyStateJSON
that is created).@Nullable public java.lang.Long getPasswordExpirationWarnedTime()
System.currentTimeMillis
), a negative value
if the field was present with a JSON null value (indicating that
the user doesn't have an password expiration warned time), or
null
if the field was not included in the JSON object.@NotNull public ModifiablePasswordPolicyStateJSONBuilder setPasswordExpirationWarnedTime(@Nullable java.lang.Long passwordExpirationWarnedTime)
passwordExpirationWarnedTime
- The new password expiration warned time value to use. It may
be a positive value representing the number of milliseconds
since the epoch (the same format used by
System.currentTimeMillis
) for the password expiration
warned time, a negative value to indicate that any existing
password expiration warned time value should be cleared, or
null
if the value should not be set in this builder
(and therefore omitted from any JSON object or
ModifiablePasswordPolicyStateJSON
that is created).@NotNull public ModifiablePasswordPolicyStateJSONBuilder setPasswordExpirationWarnedTime(@Nullable java.util.Date passwordExpirationWarnedTime)
passwordExpirationWarnedTime
- The new password expiration warned time value to use. It may
be null
if any existing password expiration warned
time value should be cleared.@NotNull public ModifiablePasswordPolicyStateJSONBuilder clearPasswordExpirationWarnedTime()
@Nullable public java.lang.Boolean getMustChangePassword()
Boolean.TRUE
if the user must change their password before
they will be allowed to perform any other operations in the
server, Boolean.FALSE
if the user is not required to
change their password, or null
if this flag was not
included in the password policy state JSON object.@NotNull public ModifiablePasswordPolicyStateJSONBuilder setMustChangePassword(@Nullable java.lang.Boolean mustChangePassword)
mustChangePassword
- The new must change password value to use. It may be
null
if the value should not be set in this builder
(and therefore omitted from any JSON object or
ModifiablePasswordPolicyStateJSON
that is created).@NotNull public JSONObject toJSONObject()
@NotNull public ModifiablePasswordPolicyStateJSON build()
ModifiablePasswordPolicyStateJSON
object from the
contents of this builder.ModifiablePasswordPolicyStateJSON
object created from
the contents of this builder.@NotNull public ModifyRequest toModifyRequest(@NotNull java.lang.String userDN)
userDN
- The DN of the user whose password policy state should be
updated.