|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.musicontroller.security.User
public class User
Implements a User
| Constructor Summary | |
|---|---|
User()
Creates a new non-expired, non-locked, non-disabled User-object with an empty loginname and an empty username. |
|
| Method Summary | |
|---|---|
void |
addRole(Role role)
Adds a Role to the set of Roles of this User. |
boolean |
equals(java.lang.Object o)
|
org.acegisecurity.GrantedAuthority[] |
getAuthorities()
|
java.util.Date |
getExpiryDate()
|
long |
getId()
The unique identifier that can be used to distinguish different Users from eachother. |
java.lang.String |
getLoginname()
|
java.lang.String |
getName()
|
java.lang.String |
getPassword()
Gets the encrypted version of this Users password. |
java.util.Set<Role> |
getRoles()
|
java.util.List<Role> |
getRolesList()
Convenience method to get the roles in List form. |
java.lang.String |
getUsername()
|
int |
hashCode()
|
boolean |
hasRole(java.lang.String roledescription)
Returns whether or not this User has a certain role. |
boolean |
isAccountNonExpired()
|
boolean |
isAccountNonLocked()
|
boolean |
isAdmin()
|
boolean |
isCredentialsNonExpired()
|
boolean |
isEnabled()
|
void |
setAccountNonLocked(boolean nonLocked)
|
void |
setCredentialsNonExired(boolean nonExpired)
|
void |
setDisabledMessage(java.lang.String message)
When the disabledmessage is set, the User is automatically disabled, and cannot logon. |
void |
setExpiryDate(java.util.Date expiryDate)
Sets the expirydate of this User. |
void |
setId(long id)
Sets the identifier of the User. |
void |
setLoginname(java.lang.String loginname)
Sets the loginname for this User. |
void |
setName(java.lang.String name)
Set the real name of this User. |
void |
setPassword(java.lang.String encryptedPassword)
Sets the encrypted version of this Users password. |
void |
setRoles(java.util.Set<Role> roles)
Set the Roles which this User is assigned to. |
void |
setRolesList(java.util.List<Role> roles)
Convenience method to set the roles in List form. |
void |
setUnencryptedPassword(java.lang.String unencryptedpass)
Sets the password for a User. |
java.lang.String |
toString()
A short description of the user, fit for human consumption. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public User()
UserDao,
IUser,
Encrypter,
Role,
Authority| Method Detail |
|---|
public void setId(long id)
IUser
setId in interface IUserid - an integer.public long getId()
IUser
getId in interface IUserpublic boolean isAccountNonExpired()
isAccountNonExpired in interface org.acegisecurity.userdetails.UserDetailspublic void setExpiryDate(java.util.Date expiryDate)
IUser
setExpiryDate in interface IUserpublic java.util.Date getExpiryDate()
getExpiryDate in interface IUserpublic boolean isAccountNonLocked()
isAccountNonLocked in interface org.acegisecurity.userdetails.UserDetailspublic void setAccountNonLocked(boolean nonLocked)
public org.acegisecurity.GrantedAuthority[] getAuthorities()
getAuthorities in interface org.acegisecurity.userdetails.UserDetailspublic boolean isAdmin()
public boolean hasRole(java.lang.String roledescription)
roledescription - The description of the role, such as ROLE_USER
public void setRoles(java.util.Set<Role> roles)
IUser
setRoles in interface IUserroles - The Roles.public java.util.Set<Role> getRoles()
getRoles in interface IUserpublic void addRole(Role role)
IUser
addRole in interface IUserrole - The Role to addpublic boolean isCredentialsNonExpired()
isCredentialsNonExpired in interface org.acegisecurity.userdetails.UserDetailspublic void setCredentialsNonExired(boolean nonExpired)
public boolean isEnabled()
isEnabled in interface org.acegisecurity.userdetails.UserDetailspublic java.lang.String getPassword()
IUser
getPassword in interface org.acegisecurity.userdetails.UserDetailsgetPassword in interface IUserpublic void setPassword(java.lang.String encryptedPassword)
IUser
setPassword in interface IUserencryptedPassword - The encrypted password.public java.lang.String getUsername()
getUsername in interface org.acegisecurity.userdetails.UserDetailspublic java.lang.String getLoginname()
getLoginname in interface IUserpublic void setLoginname(java.lang.String loginname)
IUser
setLoginname in interface IUserloginname - The loginname. It is advisable to use only lowercase letters in the loginname.public java.lang.String getName()
getName in interface IUserpublic void setName(java.lang.String name)
IUser
setName in interface IUsername - The name.public void setDisabledMessage(java.lang.String message)
message - A message specifying why the user is disabled.public void setUnencryptedPassword(java.lang.String unencryptedpass)
IUser
setUnencryptedPassword in interface IUserunencryptedpass - The unencryted password.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.List<Role> getRolesList()
IUser
getRolesList in interface IUserpublic void setRolesList(java.util.List<Role> roles)
IUser
setRolesList in interface IUserroles - The Roles.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||