public final class AdministrativeLock extends Object implements Serializable
administrativeLock
LDAP attribute.
Its serialised form is the value of toString()
.Modifier and Type | Class and Description |
---|---|
static class |
AdministrativeLock.Type
An enum type representing the various possible types of
AdminstrativeLock value,
along with some data about them. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getComment() |
org.threeten.bp.LocalDate |
getDate() |
static AdministrativeLock |
getInstance(AdministrativeLock.Type type,
org.threeten.bp.LocalDate date,
String comment)
Static factory for
AdministrativeLock instances with dates. |
static AdministrativeLock |
getInstance(AdministrativeLock.Type type,
String comment)
Static factory for
AdministrativeLock instances without dates. |
AdministrativeLock.Type |
getType() |
int |
hashCode() |
String |
toString()
Converts this
AdministrativeLock value to a String representation suitable
for writing to the LDAP. |
static AdministrativeLock |
valueOf(String s)
Parses the string representation used in the LDAP into an
AdministrativeLock
instance. |
public static AdministrativeLock valueOf(String s) throws ParseException
AdministrativeLock
instance. If null
is passed then null
will be returned.s
- the string to be parsed, or null
AdministrativeLock
object representing the parsed string argument, or
null
ParseException
- if the string isn't a legal representationpublic String toString()
AdministrativeLock
value to a String
representation suitable
for writing to the LDAP.
The format for all of these values is "TypeValue:YYYY-MM-DD:Comment string
" where for
some Type
s the date is optional. The comment is optional but strongly encouraged.
If optional values are not present, the preceding colon(s) are omitted.public static AdministrativeLock getInstance(AdministrativeLock.Type type, String comment)
AdministrativeLock
instances without dates.type
- the Type
comment
- the optional commentAdministrativeLock
instance with the supplied field valuesNullPointerException
- if type
is null
IllegalArgumentException
- if a date is required for the specified type
public static AdministrativeLock getInstance(AdministrativeLock.Type type, org.threeten.bp.LocalDate date, String comment)
AdministrativeLock
instances with dates.type
- the Type
date
- the datecomment
- the optional commentAdministrativeLock
instance with the supplied field valuesNullPointerException
- if type
is null
IllegalArgumentException
- if the date is required for the specified type
but
was null
public AdministrativeLock.Type getType()
public org.threeten.bp.LocalDate getDate()
public String getComment()
Copyright © 2018. All rights reserved.