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()
           
 String getAvatar()
           
 URI getContactsURI()
           
 String getDomainId()
           
 String getDomainName()
           
 String geteMail()
           
 String getFirstName()
           
 String getFullName()
          Gets the full name of the user.
 String getId()
           
 String getLanguage()
          Gets the language used by the user.
 String getLastName()
           
 String getLogin()
           
 String getSpecificId()
           
 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()
           
 boolean isConnected()
          Is this user connected to Silverpeas?
 boolean isDeactivatedState()
           
 boolean isDeletedState()
           
 void setAccessLevel(UserAccessLevel accessLevel)
           
 void setDeactivatedState(boolean deactivatedState)
           
 void setDeletedState(boolean deletedState)
           
 void setDomainId(String sDomainId)
           
 void seteMail(String seMail)
           
 void setFirstName(String sFirstName)
           
 void setId(String id)
           
 void setLastName(String sLastName)
           
 void setLogin(String sLogin)
           
 void setSpecificId(String sSpecificId)
           
 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()
Overrides:
getId in class UserDetail

getAccessLevel

public UserAccessLevel getAccessLevel()
Overrides:
getAccessLevel in class UserDetail

getDomainId

public String getDomainId()
Overrides:
getDomainId in class UserDetail

getFirstName

public String getFirstName()
Overrides:
getFirstName in class UserDetail

getLastName

public String getLastName()
Overrides:
getLastName in class UserDetail

geteMail

public String geteMail()
Overrides:
geteMail in class UserDetail

isDeletedState

public boolean isDeletedState()
Overrides:
isDeletedState in class UserDetail

isDeactivatedState

public boolean isDeactivatedState()
Overrides:
isDeactivatedState in class UserDetail

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)
Overrides:
setAccessLevel in class UserDetail

setDomainId

public void setDomainId(String sDomainId)
Overrides:
setDomainId in class UserDetail

setFirstName

public void setFirstName(String sFirstName)
Overrides:
setFirstName in class UserDetail

setLastName

public void setLastName(String sLastName)
Overrides:
setLastName in class UserDetail

seteMail

public void seteMail(String seMail)
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()
Overrides:
getSpecificId in class UserDetail

setSpecificId

public void setSpecificId(String sSpecificId)
Overrides:
setSpecificId in class UserDetail

getLogin

public String getLogin()
Overrides:
getLogin in class UserDetail

setLogin

public void setLogin(String sLogin)
Overrides:
setLogin in class UserDetail

getStatus

public String getStatus()
Overrides:
getStatus in class UserDetail

setStatus

public void setStatus(String newStatus)

getDomainName

public String getDomainName()

isAnonymous

public boolean isAnonymous()
Overrides:
isAnonymous in class UserDetail

withAsUri

public UserProfileEntity withAsUri(URI userUri)

toUserDetail

public UserDetail toUserDetail()

setId

public void setId(String id)
Overrides:
setId in class UserDetail

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.