com.elasticpath.domain.cmuser
Interface CmUser

All Superinterfaces:
Entity, EpDomain, Persistence, java.io.Serializable, org.acegisecurity.userdetails.UserDetails
All Known Implementing Classes:
CmUserImpl

public interface CmUser
extends Entity, org.acegisecurity.userdetails.UserDetails

CmUser represents a person with an account in the system for accessing the Commerce Manager or web services.


Method Summary
 void addUserRole(UserRole userRole)
          Adds an UserRole to the list of userRoles.
 java.lang.String getClearTextPassword()
          Gets the clear-text password (only available at the creation time).
 java.lang.String getConfirmClearTextPassword()
          Gets the clear-text confirm password (only available at the creation time).
 java.util.Date getCreationDate()
          Gets this cmUser's creationDate.
 java.lang.String getEmail()
          Gets the email address of this CmUser.
 java.lang.String getFirstName()
          Gets the CmUser's first name.
 java.util.Date getLastLoginDate()
          Gets this cmUser's last login date.
 java.lang.String getLastName()
          Gets the CmUser's last name.
 java.lang.String getPassword()
          Gets the encrypted password.
 java.lang.String getUserName()
          Gets the user name for this CmUser.
 java.util.Set getUserRoles()
          Gets the UserRoles associated with this CmUser.
 boolean hasPermission(java.lang.String authority)
          Return a boolean that indicates whether this CmUser has the permission with the given authority value.
 boolean hasUserRole(long userRoleID)
          Return a boolean that indicates whether this CmUser has the userRole with the given userRoleID.
 boolean hasUserRole(java.lang.String userRoleName)
          Return a boolean that indicates whether this CmUser has the userRole with the given name.
 boolean isCmAccess()
          True if this CmUser has access to Commerce Manager functionality.
 boolean isWsAccess()
          True if this CmUser has access to Web Services.
 void removeUserRole(UserRole userRole)
          Removes an UserRole from the list of userRoles.
 java.lang.String resetPassword()
          Reset the CmUser's password.
 void setClearTextPassword(java.lang.String clearTextPassword)
          Sets the clear-text password.
 void setCmAccess(boolean cmAccess)
          Sets whether this CmUser has access to Commerce Manager functionality.
 void setConfirmClearTextPassword(java.lang.String confirmClearTextPassword)
          Sets the confirm clear-text password.
 void setCreationDate(java.util.Date creationDate)
          Sets this cmUser's creationDate.
 void setEmail(java.lang.String email)
          Sets the email address of this CmUser.
 void setFirstName(java.lang.String firstName)
          Sets the CmUser's first name.
 void setLastLoginDate(java.util.Date lastLoginDate)
          Sets this cmUser's last login date.
 void setLastName(java.lang.String lastName)
          Sets the CmUser's last name.
 void setPassword(java.lang.String password)
          Sets the encrypted password.
 void setUserName(java.lang.String userName)
          Sets the user name for this CmUser.
 void setUserRoles(java.util.Set userRoles)
          Sets the UserRoles associated with this CmUser.
 void setWsAccess(boolean wsAccess)
          Sets whether this CmUser has access to Web Services.
 
Methods inherited from interface com.elasticpath.domain.Entity
getGuid, setGuid
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 
Methods inherited from interface org.acegisecurity.userdetails.UserDetails
getAuthorities, getUsername, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled
 

Method Detail

addUserRole

void addUserRole(UserRole userRole)
Adds an UserRole to the list of userRoles.

Parameters:
userRole - the userRole to add.

getClearTextPassword

java.lang.String getClearTextPassword()
Gets the clear-text password (only available at the creation time).

Returns:
the clear-text password.

getConfirmClearTextPassword

java.lang.String getConfirmClearTextPassword()
Gets the clear-text confirm password (only available at the creation time).

Returns:
the clear-text confirm password.

getCreationDate

java.util.Date getCreationDate()
Gets this cmUser's creationDate.

Returns:
cmUser's creation date.

getEmail

java.lang.String getEmail()
Gets the email address of this CmUser.

Returns:
the email address.

getFirstName

java.lang.String getFirstName()
Gets the CmUser's first name.

Returns:
the first name.

getLastLoginDate

java.util.Date getLastLoginDate()
Gets this cmUser's last login date.

Returns:
cmUser's last login date.

getLastName

java.lang.String getLastName()
Gets the CmUser's last name.

Returns:
the last name.

getPassword

java.lang.String getPassword()
Gets the encrypted password.

Specified by:
getPassword in interface org.acegisecurity.userdetails.UserDetails
Returns:
the encrypted password.

getUserName

java.lang.String getUserName()
Gets the user name for this CmUser.

Returns:
the user name.

getUserRoles

java.util.Set getUserRoles()
Gets the UserRoles associated with this CmUser.

Returns:
the set of userRoles.

hasPermission

boolean hasPermission(java.lang.String authority)
Return a boolean that indicates whether this CmUser has the permission with the given authority value.

Parameters:
authority - - authority value.
Returns:
true if cmUser has the permission with the given authority value; otherwise, false.

hasUserRole

boolean hasUserRole(long userRoleID)
Return a boolean that indicates whether this CmUser has the userRole with the given userRoleID.

Parameters:
userRoleID - - userRole ID.
Returns:
true if cmUser belongs to userRole with the given userRoleID; otherwise, false.

hasUserRole

boolean hasUserRole(java.lang.String userRoleName)
Return a boolean that indicates whether this CmUser has the userRole with the given name.

Parameters:
userRoleName - - userRole name.
Returns:
true if cmUser belongs to userRole with the given userRole name; otherwise, false.

isCmAccess

boolean isCmAccess()
True if this CmUser has access to Commerce Manager functionality.

Returns:
true if this cmUser has access to Commerce Manager functionality.

isWsAccess

boolean isWsAccess()
True if this CmUser has access to Web Services.

Returns:
true if this cmUser has access to Web Services.

removeUserRole

void removeUserRole(UserRole userRole)
Removes an UserRole from the list of userRoles.

Parameters:
userRole - the userRole to remove.

resetPassword

java.lang.String resetPassword()
Reset the CmUser's password.

Returns:
the reseted password

setClearTextPassword

void setClearTextPassword(java.lang.String clearTextPassword)
Sets the clear-text password. The password will be encrypted using a secure hash like MD5 or SHA1 and saved as a password.

Parameters:
clearTextPassword - the clear-text password.

setCmAccess

void setCmAccess(boolean cmAccess)
Sets whether this CmUser has access to Commerce Manager functionality.

Parameters:
cmAccess - Set to true for commercial addresses.

setConfirmClearTextPassword

void setConfirmClearTextPassword(java.lang.String confirmClearTextPassword)
Sets the confirm clear-text password. This is to compare with the ClearTextPassword to ensure they are the same.

Parameters:
confirmClearTextPassword - the user confirmClearTextPassword.

setCreationDate

void setCreationDate(java.util.Date creationDate)
Sets this cmUser's creationDate.

Parameters:
creationDate - cmUser's creationDate.

setEmail

void setEmail(java.lang.String email)
Sets the email address of this CmUser.

Parameters:
email - the new email address.

setFirstName

void setFirstName(java.lang.String firstName)
Sets the CmUser's first name.

Parameters:
firstName - the new first name.

setLastLoginDate

void setLastLoginDate(java.util.Date lastLoginDate)
Sets this cmUser's last login date.

Parameters:
lastLoginDate - cmUser's last login date.

setLastName

void setLastName(java.lang.String lastName)
Sets the CmUser's last name.

Parameters:
lastName - the new last name.

setPassword

void setPassword(java.lang.String password)
Sets the encrypted password. By default, the clear-text user input password will be encrypted using the SHA1 secure hash algorithm

Parameters:
password - the encrypted password.

setUserName

void setUserName(java.lang.String userName)
Sets the user name for this CmUser.

Parameters:
userName - the new user name.

setUserRoles

void setUserRoles(java.util.Set userRoles)
Sets the UserRoles associated with this CmUser.

Parameters:
userRoles - the new set of userRoles.

setWsAccess

void setWsAccess(boolean wsAccess)
Sets whether this CmUser has access to Web Services.

Parameters:
wsAccess - Set to true if has access to Web Services.