Lightweight, JS-facing view of a user profile: id, username, display name, href and photo hash. Produced from a Profile entity by toBean/populateBean, and extended by ExtProfileBean for a fuller view. Reached from templates and JS controllers to render user info such as avatars and links, and to look up a profile's memberships and property map.

Extends: EntityBean

Implements: Relational


Properties

PropertyReturnsDescription
entityNameStringIdentifier used by the generic EntityBean API to refer to this profile, which for a profile is its username.
hrefStringURL of this profile's public page.
nameStringDisplay name for this profile, ideally the profile's nick name but falling back to its username if it has none.
photoHashStringHash used to build the URL of this profile's photo, accessible at "/_hashes/files/" + photoHash, or null if the profile has no photo.
userIdlongNumeric database id of the profile this bean represents.
userNameStringUsername 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.

ParameterDescription
userIdthe 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.

ParameterDescription
userNamethe 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.

ParameterDescription
hrefthe 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.

ParameterDescription
namethe 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.

ParameterDescription
photoHashthe profile's photo hash

allMemberships(OrgData orgData)

Returns: MembershipList

Finds all group memberships for this user, optionally restricted to a single organisation.

ParameterDescription
orgDataoptional, 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.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.