public class PersonRecord extends Object implements Cloneable, Comparable<PersonRecord>, Serializable
RoleRecord
. Where properties are of type
FlaggableString
[] any values with the flag set will have attribute option
x-alternate set in the LDAP.Modifier and Type | Class and Description |
---|---|
static class |
PersonRecord.Gender
Genders
|
static class |
PersonRecord.Type
Types of record, corresponding to LDAP objectClasses
|
Constructor and Description |
---|
PersonRecord() |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
int |
compareTo(PersonRecord pr)
Defines a sort order based on username, falling back to the first surname and forename
values, and then the first common name.
|
boolean |
equals(Object o) |
Map<String,String> |
getAccessControls()
Gets an immutable view of the map of access controls, which may be empty but will never
be
null . |
Map<String,String> |
getAccessControlsCopy()
Gets a copy of the map of access controls, which may be empty but will never
be
null . |
Set<String> |
getAccountState()
Gets an immutable view of the account state values, which may be empty but
will never be
null . |
AdministrativeLock |
getAdministrativeLock() |
String |
getAlternateUsername() |
Set<String> |
getAutogenAdditions()
Gets an immutable view of the set of additions to autogenerated things,
which may be empty but will never be
null . |
Set<String> |
getAutogenExclusions()
Gets an immutable view of the set of exclusions from autogenerated things,
which may be empty but will never be
null . |
List<FlaggableString> |
getCommonName()
Gets an immutable view of the list of common names, which may be empty but
will never be
null . |
List<String> |
getCommonNameVisible()
Gets only those values of the common name that are not hidden by being
flagged x-alternate, in a freshly-created List.
|
String |
getDescription() |
String |
getDesignation() |
String |
getDisplayName() |
String |
getEmployeeType() |
org.threeten.bp.LocalDate |
getEndDate() |
String |
getExternalDisplayName() |
Set<String> |
getExternalMail()
Gets an immutable view of the set of external mail addresses, which may
be empty but will never be
null . |
String |
getExternalPhone() |
List<String> |
getExtraMailAliases()
Gets an immutable view of the list of extra mail aliases, which may be empty but
will never be
null . |
String |
getFaxNumber() |
List<FlaggableString> |
getForename()
Gets an immutable view of the list of forenames, which may be empty but
will never be
null . |
String |
getForenameVisible()
Gets only the value of forename that is not hidden by being
flagged x-alternate.
|
PersonRecord.Gender |
getGender()
Gets the value of the
gender attribute. |
Integer |
getHpcPosixGid() |
String |
getHpcPosixHome() |
List<FlaggableString> |
getInitials()
Gets an immutable view of the list of initial values, which may be empty but
will never be
null . |
String |
getInitialsVisible()
Gets only the value of initials that is not hidden by being
flagged x-alternate.
|
List<FlaggableString> |
getKnownAs()
Gets an immutable view of the list of knownAs values, which may be empty but
will never be
null . |
String |
getKnownAsVisible()
Gets only the value of knownAs that is not hidden by being
flagged x-alternate.
|
String |
getLabeledURI() |
org.threeten.bp.LocalDate |
getLeftDate() |
String |
getLibraryCardNumber() |
String |
getLocation() |
String |
getMail() |
Set<String> |
getMailAll()
Gets an immutable view of the set of all routed email addresses, which
may be empty but will never be
null . |
Set<String> |
getMailRouting() |
String |
getManagerUsername()
Gets the username of the manager.
|
List<FlaggableString> |
getMiddleInitials()
Gets an immutable view of the list of middle initial values, which may be empty but
will never be
null . |
String |
getMiddleInitialsVisible()
Gets only the value of middle initials that is not hidden by being
flagged x-alternate.
|
String |
getMobileNumber() |
String |
getOrganisation() |
String |
getOu() |
int |
getOwnCloudQuota()
Gets the value of the
ownCloudQuota attribute in megabytes. |
List<String> |
getPayrollNo()
Gets an immutable view of the list of payroll numbers, which may be empty but
will never be
null . |
Integer |
getPersonId() |
List<String> |
getPersonLinks()
Gets an immutable view of the list of personLinks, which may be empty but
will never be
null . |
String |
getPhoneNumber() |
String |
getPosixGecos() |
Integer |
getPosixGid() |
String |
getPosixHome() |
String |
getPosixShell() |
Integer |
getPosixUid() |
PersonRecord.Type |
getRecordType()
Gets a single-valued record type.
|
Set<PersonRecord.Type> |
getRecordTypes()
Gets an immutable view of the set of record types, which may be empty but
will never be
null . |
RoleRecord |
getRole(int index)
Gets a reference to the specified role held within the object.
|
List<RoleRecord> |
getRoles()
Gets an immutable view of the list of roles, which may be empty but
will never be
null . |
String |
getRoomNumber() |
String |
getShortOu() |
String |
getSupportOuOverride() |
List<FlaggableString> |
getSurname()
Gets an immutable view of the list of surnames, which may be empty but
will never be
null . |
String |
getSurnameVisible()
Gets only the value of surname that is not hidden by being
flagged x-alternate.
|
String |
getTitle() |
String |
getUsername() |
int |
hashCode() |
boolean |
isAccountNotIssued()
Gets the value of the
accountNotIssued attribute. |
boolean |
isApplicant() |
boolean |
isBathPerson() |
boolean |
isExDirectory() |
boolean |
isExternalPerson() |
boolean |
isNonPerson() |
void |
setAccessControls(Map<String,String> accessControls)
Sets the map of access control key-value pairs.
|
void |
setAccountNotIssued(boolean accountNotIssued) |
void |
setAccountState(Set<String> accountState)
Sets the account state.
|
void |
setAdministrativeLock(AdministrativeLock administrativeLock) |
void |
setAlternateUsername(String alternateUsername) |
void |
setAutogenAdditions(Set<String> autogenAdditions)
Sets the set of additions to autogenerated things.
|
void |
setAutogenExclusions(Set<String> autogenExclusions)
Sets the set of exclusions from autogenerated things.
|
void |
setCommonName(List<FlaggableString> commonName)
Sets the list of common names.
|
void |
setDescription(String description) |
void |
setDesignation(String designation) |
void |
setDisplayName(String displayName) |
void |
setEmployeeType(String employeeType) |
void |
setEndDate(org.threeten.bp.LocalDate endDate) |
void |
setExDirectory(boolean exDirectory) |
void |
setExternalDisplayName(String externalDisplayName) |
void |
setExternalMail(Set<String> externalMail)
Sets the set of external email addresses.
|
void |
setExternalPhone(String externalPhone) |
void |
setExtraMailAliases(List<String> extraMailAliases)
Sets the list of extra mail aliases.
|
void |
setFaxNumber(String faxNumber) |
void |
setForename(List<FlaggableString> forename)
Sets the list of forenames.
|
void |
setGender(PersonRecord.Gender gender) |
void |
setHpcPosixGid(Integer posixGid) |
void |
setHpcPosixHome(String posixHome) |
void |
setInitials(List<FlaggableString> initials)
Sets the list of initial values.
|
void |
setKnownAs(List<FlaggableString> knownAs)
Sets the list of knownAs values.
|
void |
setLabeledURI(String labeledURI) |
void |
setLeftDate(org.threeten.bp.LocalDate leftDate) |
void |
setLibraryCardNumber(String libraryCardNumber) |
void |
setLocation(String location) |
void |
setMail(String mail) |
void |
setMailAll(Collection<String> mailAll)
Sets the list of all routed email addresses.
|
void |
setMailRouting(Set<String> mailRouting) |
void |
setManagerUsername(String managerUsername)
Sets the username of the manager.
|
void |
setMiddleInitials(List<FlaggableString> middleInitials)
Sets the list of middle initial values.
|
void |
setMobileNumber(String mobileNumber) |
void |
setOrganisation(String organisation) |
void |
setOu(String ou) |
void |
setOwnCloudQuota(int ownCloudQuota)
Sets the value of the
ownCloudQuota attribute, in megabytes. |
void |
setPayrollNo(List<String> payrollNo)
Sets the list of payroll numbers.
|
void |
setPersonId(Integer personId) |
void |
setPersonLinks(List<String> personLinks)
Sets the list of personLinks.
|
void |
setPhoneNumber(String phoneNumber) |
void |
setPosixGecos(String posixGecos) |
void |
setPosixGid(Integer posixGid) |
void |
setPosixHome(String posixHome) |
void |
setPosixShell(String posixShell) |
void |
setPosixUid(Integer posixUid) |
void |
setRecordType(PersonRecord.Type recordType)
Sets a single record type, replacing all existing values.
|
void |
setRecordTypes(Set<PersonRecord.Type> recordTypes)
Sets the set of record types.
|
void |
setRole(int index,
RoleRecord role)
Sets the specified role held within the object.
|
void |
setRoles(List<RoleRecord> roles)
Sets the list of role.
|
void |
setRoomNumber(String roomNumber) |
void |
setShortOu(String shortOu) |
void |
setSupportOuOverride(String supportOuOverride) |
void |
setSurname(List<FlaggableString> surname)
Sets the list of surnames.
|
void |
setTitle(String title) |
void |
setUsername(String username) |
String |
toString() |
public PersonRecord.Type getRecordType()
null
if none is setpublic Set<PersonRecord.Type> getRecordTypes()
null
.public void setRecordType(PersonRecord.Type recordType)
recordType
- The record type to setpublic void setRecordTypes(Set<PersonRecord.Type> recordTypes)
recordTypes
- A set of record types, or null
public boolean isBathPerson()
true
if the record has BATH_PERSON type (it may have others too)public boolean isExternalPerson()
true
if the record has EXTERNAL_PERSON type (it may have others too)public boolean isApplicant()
true
if the record has APPLICANT type (it may have others too)public boolean isNonPerson()
true
if the record has NON_PERSON_ACCOUNT type (it may have others too)public String getUsername()
public void setUsername(String username)
public String getAlternateUsername()
public void setAlternateUsername(String alternateUsername)
public Integer getPersonId()
public void setPersonId(Integer personId)
public List<FlaggableString> getCommonName()
null
.public List<String> getCommonNameVisible()
public void setCommonName(List<FlaggableString> commonName)
commonName
- A list of common names, or null
public String getDisplayName()
public void setDisplayName(String displayName)
public String getExternalDisplayName()
public void setExternalDisplayName(String externalDisplayName)
public List<FlaggableString> getKnownAs()
null
.public String getKnownAsVisible()
null
public void setKnownAs(List<FlaggableString> knownAs)
knownAs
- A list of knownAs values, or null
public List<FlaggableString> getForename()
null
.public String getForenameVisible()
null
public void setForename(List<FlaggableString> forename)
forename
- A list of forenames, or null
public List<FlaggableString> getSurname()
null
.public String getSurnameVisible()
null
public void setSurname(List<FlaggableString> surname)
surname
- A list of surnames, or null
public List<FlaggableString> getMiddleInitials()
null
.public String getMiddleInitialsVisible()
null
public void setMiddleInitials(List<FlaggableString> middleInitials)
middleInitials
- A list of middle initial values, or null
public List<FlaggableString> getInitials()
null
.public String getInitialsVisible()
null
public void setInitials(List<FlaggableString> initials)
initials
- A list of initial values, or null
public String getDesignation()
public void setDesignation(String designation)
public PersonRecord.Gender getGender()
gender
attribute.
Note that this attribute is only visible to privileged system accounts, and therefore
this property will be null
when read by other users or by unauthenticated access.
gender
attribute, or null
if the
LdapService
was not able to read the valuepublic void setGender(PersonRecord.Gender gender)
public String getMail()
public void setMail(String mail)
public List<String> getExtraMailAliases()
null
. Values do not include '@bath.ac.uk' but may
optionally have a date appended with a colon, e.g. "J.Smith:1997-03-15".public void setExtraMailAliases(List<String> extraMailAliases)
extraMailAliases
- A list of extra mail aliases, or null
public Set<String> getExternalMail()
null
.public void setExternalMail(Set<String> externalMail)
externalMail
- A set of email addresses, or null
public Set<String> getMailAll()
null
.public void setMailAll(Collection<String> mailAll)
mailAll
- A collection of email addresses, or null
public String getEmployeeType()
public void setEmployeeType(String employeeType)
public String getOrganisation()
public void setOrganisation(String organisation)
public String getLocation()
public void setLocation(String location)
public String getOu()
public void setOu(String ou)
public String getShortOu()
public void setShortOu(String shortOu)
public String getDescription()
public void setDescription(String description)
public String getTitle()
public void setTitle(String title)
public String getPhoneNumber()
public void setPhoneNumber(String phoneNumber)
public String getFaxNumber()
public void setFaxNumber(String faxNumber)
public String getMobileNumber()
public void setMobileNumber(String mobileNumber)
public String getExternalPhone()
public void setExternalPhone(String externalPhone)
public String getRoomNumber()
public void setRoomNumber(String roomNumber)
public List<String> getPersonLinks()
null
. Format is (<Username>,<Phone>,<Description>)
.public void setPersonLinks(List<String> personLinks)
List
object provided. Format is (<Username>,<Phone>,<Description>)
.personLinks
- a list of personLink strings, or null
public boolean isExDirectory()
public void setExDirectory(boolean exDirectory)
public Set<String> getAccountState()
null
.public void setAccountState(Set<String> accountState)
accountState
- A set of account state values, or null
public Map<String,String> getAccessControls()
null
.public Map<String,String> getAccessControlsCopy()
null
.public void setAccessControls(Map<String,String> accessControls)
accessControls
- A Map of access controls, or null
to clearpublic Set<String> getAutogenAdditions()
null
.public void setAutogenAdditions(Set<String> autogenAdditions)
autogenAdditions
- A set of additions to autogenerated things, or null
public Set<String> getAutogenExclusions()
null
.public void setAutogenExclusions(Set<String> autogenExclusions)
autogenExclusions
- A set of exclusions from autogenerated things, or null
public AdministrativeLock getAdministrativeLock()
public void setAdministrativeLock(AdministrativeLock administrativeLock)
public Integer getPosixUid()
public void setPosixUid(Integer posixUid)
public Integer getPosixGid()
public void setPosixGid(Integer posixGid)
public String getPosixHome()
public void setPosixHome(String posixHome)
public String getPosixShell()
public void setPosixShell(String posixShell)
public String getPosixGecos()
public void setPosixGecos(String posixGecos)
public Integer getHpcPosixGid()
public void setHpcPosixGid(Integer posixGid)
public String getHpcPosixHome()
public void setHpcPosixHome(String posixHome)
public String getLabeledURI()
public void setLabeledURI(String labeledURI)
public List<String> getPayrollNo()
null
.public void setPayrollNo(List<String> payrollNo)
payrollNo
- A list of payroll numbers, or null
public String getLibraryCardNumber()
public void setLibraryCardNumber(String libraryCardNumber)
public String getSupportOuOverride()
public void setSupportOuOverride(String supportOuOverride)
public org.threeten.bp.LocalDate getLeftDate()
public void setLeftDate(org.threeten.bp.LocalDate leftDate)
public org.threeten.bp.LocalDate getEndDate()
public void setEndDate(org.threeten.bp.LocalDate endDate)
public boolean isAccountNotIssued()
accountNotIssued
attribute.
Note that this attribute is only visible to privileged system accounts, and therefore
this property will be false
when read by other users or by unauthenticated access.
accountNotIssued
attribute, or false
if the
LdapService
was not able to read the valuepublic void setAccountNotIssued(boolean accountNotIssued)
public int getOwnCloudQuota()
ownCloudQuota
attribute in megabytes.
Note that this attribute is only visible to privileged system accounts, and therefore this
property will be zero when read by other users or by unauthenticated access.accountNotIssued
attribute, or false
if the
LdapService
was not able to read the valuepublic void setOwnCloudQuota(int ownCloudQuota)
ownCloudQuota
attribute, in megabytes.ownCloudQuota
- the megabyte quota value to setIllegalArgumentException
- if the supplied value is negativepublic String getManagerUsername()
null
public void setManagerUsername(String managerUsername)
managerUsername
- the manager username to set, or null
public List<RoleRecord> getRoles()
null
. The roles themselves are not
immutable - just the List containing them.public void setRoles(List<RoleRecord> roles)
roles
- A list of role, or null
public RoleRecord getRole(int index)
index
- The index of the role to get (starting with 0)IndexOutOfBoundsException
- if the index is out of boundspublic void setRole(int index, RoleRecord role)
index
- The index of the role to setrole
- The role to set, or null
to remove the specified roleIndexOutOfBoundsException
- if the index is out of boundspublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public int compareTo(PersonRecord pr)
compareTo
in interface Comparable<PersonRecord>
pr
- The PersonRecord to compare to this oneCopyright © 2018. All rights reserved.