org.musicontroller.security
Interface IUser

All Superinterfaces:
java.io.Serializable, org.acegisecurity.userdetails.UserDetails
All Known Implementing Classes:
User

public interface IUser
extends org.acegisecurity.userdetails.UserDetails

A User is a user of a certain program. A User can be assigned Role-objects, which contain Authorities to perform certain tasks.

Version:
$Id: IUser.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $
Author:
Arjan Verstoep

Method Summary
 void addRole(Role role)
          Adds a Role to the set of Roles of this User.
 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.
 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 username)
          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.
 
Methods inherited from interface org.acegisecurity.userdetails.UserDetails
getAuthorities, getUsername, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled
 

Method Detail

getId

long getId()
The unique identifier that can be used to distinguish different Users from eachother.

Returns:
The unique Id that is connected with this User, or -1 if the User has not been persisted yet.

setId

void setId(long id)
Sets the identifier of the User.

Parameters:
id - an integer.

getExpiryDate

java.util.Date getExpiryDate()
Returns:
The Date after which this User is no longer permitted to logon.

setExpiryDate

void setExpiryDate(java.util.Date expiryDate)
Sets the expirydate of this User. After this date, the User will no longer be able to logon.

Parameters:
expiryDate -

getLoginname

java.lang.String getLoginname()
Returns:
The loginname of this User.

setLoginname

void setLoginname(java.lang.String loginname)
Sets the loginname for this User.

Parameters:
loginname - The loginname. It is advisable to use only lowercase letters in the loginname.

getName

java.lang.String getName()
Returns:
The real name of this User.

setName

void setName(java.lang.String username)
Set the real name of this User.

Parameters:
username - The name.

getRoles

java.util.Set<Role> getRoles()
Returns:
All Role-objects assigned to this User.

setRoles

void setRoles(java.util.Set<Role> roles)
Set the Roles which this User is assigned to.

Parameters:
roles - The Roles.

getRolesList

java.util.List<Role> getRolesList()
Convenience method to get the roles in List form.

Returns:
All Role-objects assigned to this User.

setRolesList

void setRolesList(java.util.List<Role> roles)
Convenience method to set the roles in List form.

Parameters:
roles - The Roles.

addRole

void addRole(Role role)
Adds a Role to the set of Roles of this User.

Parameters:
role - The Role to add

setUnencryptedPassword

void setUnencryptedPassword(java.lang.String unencryptedpass)
Sets the password for a User. This will encrypt the given password and fill the encrypted password with the encrypted version of the supplied password.

Parameters:
unencryptedpass - The unencryted password.

getPassword

java.lang.String getPassword()
Gets the encrypted version of this Users password.

Specified by:
getPassword in interface org.acegisecurity.userdetails.UserDetails

setPassword

void setPassword(java.lang.String encryptedPassword)
Sets the encrypted version of this Users password.

Parameters:
encryptedPassword - The encrypted password.


Copyright © 2010 A.J.V.. All Rights Reserved.