|
||||||||||
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 IUser
id
- an integer.public long getId()
IUser
getId
in interface IUser
public boolean isAccountNonExpired()
isAccountNonExpired
in interface org.acegisecurity.userdetails.UserDetails
public void setExpiryDate(java.util.Date expiryDate)
IUser
setExpiryDate
in interface IUser
public java.util.Date getExpiryDate()
getExpiryDate
in interface IUser
public boolean isAccountNonLocked()
isAccountNonLocked
in interface org.acegisecurity.userdetails.UserDetails
public void setAccountNonLocked(boolean nonLocked)
public org.acegisecurity.GrantedAuthority[] getAuthorities()
getAuthorities
in interface org.acegisecurity.userdetails.UserDetails
public 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 IUser
roles
- The Roles.public java.util.Set<Role> getRoles()
getRoles
in interface IUser
public void addRole(Role role)
IUser
addRole
in interface IUser
role
- The Role to addpublic boolean isCredentialsNonExpired()
isCredentialsNonExpired
in interface org.acegisecurity.userdetails.UserDetails
public void setCredentialsNonExired(boolean nonExpired)
public boolean isEnabled()
isEnabled
in interface org.acegisecurity.userdetails.UserDetails
public java.lang.String getPassword()
IUser
getPassword
in interface org.acegisecurity.userdetails.UserDetails
getPassword
in interface IUser
public void setPassword(java.lang.String encryptedPassword)
IUser
setPassword
in interface IUser
encryptedPassword
- The encrypted password.public java.lang.String getUsername()
getUsername
in interface org.acegisecurity.userdetails.UserDetails
public java.lang.String getLoginname()
getLoginname
in interface IUser
public void setLoginname(java.lang.String loginname)
IUser
setLoginname
in interface IUser
loginname
- The loginname. It is advisable to use only lowercase letters in the loginname.public java.lang.String getName()
getName
in interface IUser
public void setName(java.lang.String name)
IUser
setName
in interface IUser
name
- 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 IUser
unencryptedpass
- The unencryted password.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.List<Role> getRolesList()
IUser
getRolesList
in interface IUser
public void setRolesList(java.util.List<Role> roles)
IUser
setRolesList
in interface IUser
roles
- The Roles.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |