Admin-facing view of a profile: extends ProfileBean with fields visible only to staff, such as email, phone, birth date, notes and visit history. Built from a Profile via the toBeanExt / toBeanExtWithFullname factory methods for use in admin templates and controllers; its save method writes edited fields back to the underlying profile.
Extends: ProfileBean
Properties
| Property | Returns | Description |
|---|---|---|
| birthDate | Date | Date of birth recorded against the profile, or null if not set. Carries no time component. |
String | Email address of the profile, visible to staff. | |
| firstName | String | First name of the profile. |
| language | String | Language code (locale) preferred by the profile, or null if not set. |
| lastContacted | Date | Timestamp the profile was last contacted, or null if it has not been contacted. |
| lastVisit | Date | Timestamp of the profile's last visit to the site, or null if it has never visited. |
| nickName | String | Nickname used as the profile's display name in place of its full name, or null if none is set. |
| notes | String | Free-text admin notes recorded against this profile, or null if none have been entered. |
| phone | String | Phone number recorded against the profile, or null if none is set. |
| surName | String | Surname (family name) of the profile. |
Inherited from ProfileBean
Properties
| Property | Returns | Description |
|---|---|---|
| entityName | String | Identifier used by the generic EntityBean API to refer to this profile, which for a profile is its username. |
| href | String | URL of this profile's public page. |
| name | String | Display name for this profile, ideally the profile's nick name but falling back to its username if it has none. |
| photoHash | String | Hash used to build the URL of this profile's photo, accessible at "/_hashes/files/" + photoHash, or null if the profile has no photo. |
| userId | long | Numeric database id of the profile this bean represents. |
| userName | String | Username of the profile this bean represents. |
Methods
getEntityName() · formattedName() · getUserId() · setUserId(long userId) · getUserName() · setUserName(String userName) · getHref() · setHref(String href) · getName() · setName(String name) · getPhotoHash() · setPhotoHash(String photoHash) · allMemberships(OrgData orgData) · allMemberships() · primaryMembership() · primaryMemberships() · entityObject() · allProps() · rowId()
getEntityName()
Returns: String
Identifier used by the generic EntityBean API to refer to this profile, which for a profile is its username.
formattedName()
Returns: String
Display name for this profile: the profile's first and last name if either is set, falling back to its nick name, and finally to this bean's name property.
getUserId()
Returns: long
Numeric database id of the profile this bean represents.
setUserId(long userId)
Returns: void
Sets the numeric database id of the profile this bean represents.
| Parameter | Description |
|---|---|
userId | the profile's database id |
getUserName()
Returns: String
Username of the profile this bean represents.
setUserName(String userName)
Returns: void
Sets the username of the profile this bean represents.
| Parameter | Description |
|---|---|
userName | the profile's username |
getHref()
Returns: String
URL of this profile's public page.
setHref(String href)
Returns: void
Sets the URL of this profile's public page.
| Parameter | Description |
|---|---|
href | the profile's public page URL |
getName()
Returns: String
Display name for this profile, ideally the profile's nick name but falling back to its username if it has none.
setName(String name)
Returns: void
Sets the display name for this profile.
| Parameter | Description |
|---|---|
name | the profile's display name |
getPhotoHash()
Returns: String
Hash used to build the URL of this profile's photo, accessible at "/_hashes/files/" + photoHash, or null if the profile has no photo.
setPhotoHash(String photoHash)
Returns: void
Sets the hash used to build the URL of this profile's photo.
| Parameter | Description |
|---|---|
photoHash | the profile's photo hash |
allMemberships(OrgData orgData)
Returns: MembershipList
Finds all group memberships for this user, optionally restricted to a single organisation.
| Parameter | Description |
|---|---|
orgData | optional, restricts the returned memberships to this organisation |
allMemberships()
Returns: MembershipList
Finds all group memberships for this user, across all organisations.
primaryMembership()
Returns: MembershipBean
This user's primary group membership, resolved against the current organisation. Loaded on first call and cached for reuse.
primaryMemberships()
Returns: List<MembershipBean>
All of this user's memberships whose group is flagged as primary, within the current root folder's organisation if one is available, otherwise within the organisation this bean was constructed with. Loaded on first call and cached for reuse.
entityObject()
Returns: BaseEntity
Returns the domain object underlying this bean.
allProps()
Returns: Map<String,Object>
All non-empty scalar properties of the underlying profile (first name, surname, name, birth date, created date, email, language, last contacted, last visit, nick name, phone) plus its custom field values, each formatted for display and keyed by property name. Loaded on first call and cached for reuse.
rowId()
Returns: Long
Numeric database id of the profile this bean represents, used as the row identifier for Relational-based lookups.
Methods
getNotes() · setNotes(String notes) · getEmail() · setEmail(String email) · getFirstName() · setFirstName(String firstName) · getSurName() · setSurName(String surName) · getPhone() · setPhone(String phone) · getNickName() · setNickName(String nickName) · getBirthDate() · setBirthDate(Date birthDate) · getLastVisit() · setLastVisit(Date lastVisit) · getLastContacted() · setLastContacted(Date lastContacted) · getLanguage() · setLanguage(String language) · save()
getNotes()
Returns: String
Free-text admin notes recorded against this profile, or null if none have been entered.
setNotes(String notes)
Returns: void
Sets the free-text admin notes for this profile.
| Parameter | Description |
|---|---|
notes | the admin notes to record |
getEmail()
Returns: String
Email address of the profile, visible to staff.
setEmail(String email)
Returns: void
Sets the email address of the profile.
| Parameter | Description |
|---|---|
email | the profile's email address |
getFirstName()
Returns: String
First name of the profile.
setFirstName(String firstName)
Returns: void
Sets the first name of the profile.
| Parameter | Description |
|---|---|
firstName | the profile's first name |
getSurName()
Returns: String
Surname (family name) of the profile.
setSurName(String surName)
Returns: void
Sets the surname (family name) of the profile.
| Parameter | Description |
|---|---|
surName | the profile's surname |
getPhone()
Returns: String
Phone number recorded against the profile, or null if none is set.
setPhone(String phone)
Returns: void
Sets the phone number for the profile.
| Parameter | Description |
|---|---|
phone | the profile's phone number |
getNickName()
Returns: String
Nickname used as the profile's display name in place of its full name, or null if none is set.
setNickName(String nickName)
Returns: void
Sets the nickname used as the profile's display name.
| Parameter | Description |
|---|---|
nickName | the profile's nickname |
getBirthDate()
Returns: Date
Date of birth recorded against the profile, or null if not set. Carries no time component.
setBirthDate(Date birthDate)
Returns: void
Sets the profile's date of birth.
| Parameter | Description |
|---|---|
birthDate | the profile's date of birth |
getLastVisit()
Returns: Date
Timestamp of the profile's last visit to the site, or null if it has never visited.
setLastVisit(Date lastVisit)
Returns: void
Sets the timestamp of the profile's last visit.
| Parameter | Description |
|---|---|
lastVisit | the last visit timestamp |
getLastContacted()
Returns: Date
Timestamp the profile was last contacted, or null if it has not been contacted.
setLastContacted(Date lastContacted)
Returns: void
Sets the timestamp the profile was last contacted.
| Parameter | Description |
|---|---|
lastContacted | the last contacted timestamp |
getLanguage()
Returns: String
Language code (locale) preferred by the profile, or null if not set.
setLanguage(String language)
Returns: void
Sets the language code (locale) preferred by the profile.
| Parameter | Description |
|---|---|
language | the profile's preferred language code |
save()
Returns: void
Saves any of nickName, firstName, surName, email, phone, notes, birthDate, lastVisit, lastContacted and language that differ from the underlying Profile, persisting the change via GroupManager. Does nothing if none of these fields have changed.