com.silverpeas.profile.web
Class UserProfileEntity

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.UserDetail
      extended by com.silverpeas.profile.web.UserProfileEntity
All Implemented Interfaces:
Exposable, Serializable, Comparable<UserDetail>
Direct Known Subclasses:
UserProfileExtendedEntity

public class UserProfileEntity
extends UserDetail
implements Exposable

The profile of a user that is exposable in the WEB. It is a web entity representing the profile of a user that can be serialized into a given media type (JSON, XML). It is a decorator that decorates a UserDetail object with additional properties concerning its exposition in the WEB.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.stratelia.webactiv.beans.admin.UserDetail
CURRENT_REQUESTER_KEY
 
Constructor Summary
protected UserProfileEntity()
           
protected UserProfileEntity(UserDetail user)
           
 
Method Summary
 boolean equals(Object other)
           
static UserProfileEntity fromUser(UserDetail user)
          Decorates the specified user details with the required WEB exposition features.
static UserProfileEntity[] fromUsers(List<? extends UserDetail> users, URI usersUri)
          Decorates the specified user details with the required WEB exposition features.
 UserAccessLevel getAccessLevel()
          Get user's access level
 String getAvatar()
           
 URI getContactsURI()
           
 String getDomainId()
          Get user's domain id
 String getDomainName()
           
 String geteMail()
          Get user's email
 String getFirstName()
          Get user's first name
 String getFullName()
          Gets the full name of the user.
 String getId()
          Get user id as stored in database
 String getLanguage()
          Gets the language used by the user.
 String getLastName()
          Get user's last name
 String getLogin()
          Get user's login
 String getSpecificId()
          Get specific user id
 String getStatus()
           
 String getTchatPage()
          Gets the URL of the tchat WEB page opened to discuss with this user.
 URI getURI()
          Gets the URI at which this resource is published and can be accessed.
 String getWebPage()
          Gets the URL of the WEB page in which is presented the profile of this user.
 int hashCode()
           
 boolean isAnonymous()
          Is the user is the anonymous one?
 boolean isConnected()
          Is this user connected to Silverpeas?
 boolean isDeactivatedState()
          This method is the only one able to indicate the user deactivated state.
 boolean isDeletedState()
          This method is the only one able to indicate the user deletion state.
 void setAccessLevel(UserAccessLevel accessLevel)
          Set user access level
 void setDeactivatedState(boolean deactivatedState)
           
 void setDeletedState(boolean deletedState)
           
 void setDomainId(String sDomainId)
          Set user domain id
 void seteMail(String seMail)
          Set user's email
 void setFirstName(String sFirstName)
          Set user first name
 void setId(String id)
          Set user identifier
 void setLastName(String sLastName)
          Set user last name
 void setLogin(String sLogin)
          Set user login
 void setSpecificId(String sSpecificId)
          Set specific user id
 void setStatus(String newStatus)
           
 UserDetail toUserDetail()
           
 UserProfileEntity withAsUri(URI userUri)
           
 
Methods inherited from class com.stratelia.webactiv.beans.admin.UserDetail
compareTo, getAll, getAllInDomain, getAnonymousUser, getAnonymousUserId, getAvatarFileName, getById, getCreationDate, getCurrentRequester, getDisplayedName, getDomain, getDurationOfCurrentSession, getExpirationDate, getLastLoginCredentialUpdateDate, getLastLoginDate, getLoginAnswer, getLoginQuestion, getNbSuccessfulLoginAttempts, getNotifManualReceiverLimit, getOrganisationController, getSaveDate, getSmallAvatar, getState, getStateSaveDate, getTosAcceptanceDate, getUserManualNotificationUserReceiverLimitValue, getUserPreferences, getVersion, isAccessAdmin, isAccessDomainManager, isAccessGuest, isAccessPdcManager, isAccessSpaceManager, isAccessUnknown, isAccessUser, isActivatedState, isActivatedStateFor, isAnonymousUser, isAnonymousUserExist, isAvatarPersonnalized, isBackOfficeVisible, isBlockedState, isDomainAdminRestricted, isDomainRestricted, isExpiredState, isFullyDefined, isInRelationWithOrInvitedBy, isUserManualNotificationUserReceiverLimit, isValidState, setCreationDate, setExpirationDate, setLastLoginCredentialUpdateDate, setLastLoginDate, setLoginAnswer, setLoginQuestion, setNbSuccessfulLoginAttempts, setNotifManualReceiverLimit, setSaveDate, setState, setStateSaveDate, setTosAcceptanceDate, setUserManualNotificationUserReceiverLimit, setVersion, traceUser
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserProfileEntity

protected UserProfileEntity(UserDetail user)

UserProfileEntity

protected UserProfileEntity()
Method Detail

fromUser

public static UserProfileEntity fromUser(UserDetail user)
Decorates the specified user details with the required WEB exposition features.

Parameters:
user - the user details to decorate.
Returns:
a web entity representing the profile of a user.

fromUsers

public static UserProfileEntity[] fromUsers(List<? extends UserDetail> users,
                                            URI usersUri)
Decorates the specified user details with the required WEB exposition features.

Parameters:
users - a list of details on some users.
usersUri - the URI at which the specified users are defined.
Returns:
a list of web entities representing the profile of the specified users.

getId

public String getId()
Description copied from class: UserDetail
Get user id as stored in database

Overrides:
getId in class UserDetail
Returns:

getAccessLevel

public UserAccessLevel getAccessLevel()
Description copied from class: UserDetail
Get user's access level

Overrides:
getAccessLevel in class UserDetail
Returns:

getDomainId

public String getDomainId()
Description copied from class: UserDetail
Get user's domain id

Overrides:
getDomainId in class UserDetail
Returns:
user's domain id

getFirstName

public String getFirstName()
Description copied from class: UserDetail
Get user's first name

Overrides:
getFirstName in class UserDetail
Returns:
user's first name

getLastName

public String getLastName()
Description copied from class: UserDetail
Get user's last name

Overrides:
getLastName in class UserDetail
Returns:
user's last name

geteMail

public String geteMail()
Description copied from class: UserDetail
Get user's email

Overrides:
geteMail in class UserDetail
Returns:

isDeletedState

public boolean isDeletedState()
Description copied from class: UserDetail
This method is the only one able to indicate the user deletion state. Please do not use UserDetail.getState() to retrieve user deletion information.

Overrides:
isDeletedState in class UserDetail
Returns:

isDeactivatedState

public boolean isDeactivatedState()
Description copied from class: UserDetail
This method is the only one able to indicate the user deactivated state. Please do not use UserDetail.getState() to retrieve user deactivated information.

Overrides:
isDeactivatedState in class UserDetail
Returns:

getLanguage

public String getLanguage()
Gets the language used by the user.

Returns:
the code of the language used by the user.

setAccessLevel

public void setAccessLevel(UserAccessLevel accessLevel)
Description copied from class: UserDetail
Set user access level

Overrides:
setAccessLevel in class UserDetail

setDomainId

public void setDomainId(String sDomainId)
Description copied from class: UserDetail
Set user domain id

Overrides:
setDomainId in class UserDetail

setFirstName

public void setFirstName(String sFirstName)
Description copied from class: UserDetail
Set user first name

Overrides:
setFirstName in class UserDetail
Parameters:
sFirstName - user first name

setLastName

public void setLastName(String sLastName)
Description copied from class: UserDetail
Set user last name

Overrides:
setLastName in class UserDetail
Parameters:
sLastName - user last name

seteMail

public void seteMail(String seMail)
Description copied from class: UserDetail
Set user's email

Overrides:
seteMail in class UserDetail

setDeletedState

public void setDeletedState(boolean deletedState)

setDeactivatedState

public void setDeactivatedState(boolean deactivatedState)

getAvatar

public String getAvatar()
Overrides:
getAvatar in class UserDetail

getWebPage

public String getWebPage()
Gets the URL of the WEB page in which is presented the profile of this user.

Returns:
the URL of the user profile WEB page.

getTchatPage

public String getTchatPage()
Gets the URL of the tchat WEB page opened to discuss with this user.

Returns:
the URL of the user tchat page.

getFullName

public String getFullName()
Gets the full name of the user. The full name is made up of its firstname and of its lastname.

Returns:
the user fullname.

isConnected

public boolean isConnected()
Is this user connected to Silverpeas?

Overrides:
isConnected in class UserDetail
Returns:
true if the user is connected, false otherwise.

getSpecificId

public String getSpecificId()
Description copied from class: UserDetail
Get specific user id

Overrides:
getSpecificId in class UserDetail
Returns:

setSpecificId

public void setSpecificId(String sSpecificId)
Description copied from class: UserDetail
Set specific user id

Overrides:
setSpecificId in class UserDetail

getLogin

public String getLogin()
Description copied from class: UserDetail
Get user's login

Overrides:
getLogin in class UserDetail
Returns:
user's login

setLogin

public void setLogin(String sLogin)
Description copied from class: UserDetail
Set user login

Overrides:
setLogin in class UserDetail
Parameters:
sLogin - the login to set

getStatus

public String getStatus()
Overrides:
getStatus in class UserDetail

setStatus

public void setStatus(String newStatus)

getDomainName

public String getDomainName()

isAnonymous

public boolean isAnonymous()
Description copied from class: UserDetail
Is the user is the anonymous one?

Overrides:
isAnonymous in class UserDetail
Returns:
true if he's the anonymous user.

withAsUri

public UserProfileEntity withAsUri(URI userUri)

toUserDetail

public UserDetail toUserDetail()

setId

public void setId(String id)
Description copied from class: UserDetail
Set user identifier

Overrides:
setId in class UserDetail
Parameters:
id - the user identifier to set

equals

public boolean equals(Object other)
Overrides:
equals in class UserDetail

hashCode

public int hashCode()
Overrides:
hashCode in class UserDetail

getURI

public URI getURI()
Description copied from interface: Exposable
Gets the URI at which this resource is published and can be accessed.

Specified by:
getURI in interface Exposable
Returns:
the web resource URI.

getContactsURI

public URI getContactsURI()


Copyright © 2016 Silverpeas. All Rights Reserved.