|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moremotion.security.User
public class User
Represent a user. A User has a user name, a password, a full name, an email, an account enabled/disabled flag, attributes and roles.
Constructor Summary | |
---|---|
User()
Creates a new user. |
|
User(java.lang.String name,
java.lang.String password,
java.lang.String email,
java.lang.String fullname,
boolean accDsbld)
Creates a new user. |
Method Summary | |
---|---|
void |
addRole(Role role)
Adds a new role to this user. |
boolean |
authenticate(java.lang.String password)
Authenticates the specified password agains the password of this user and returns true if they match. |
int |
compareTo(java.lang.Object obj)
Compares this user to other. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of the specified user attribute. |
java.util.Properties |
getAttributes()
Returns the attribute of this user. |
java.lang.String[] |
getCheckPointNames()
Returns the names of the checkpoints that this user has. |
java.lang.String |
getEmail()
Returns the email address of this user. |
java.lang.String |
getFullname()
Returns the full name of this user. |
java.lang.String |
getId()
Returns the database record identity of this user. |
long |
getLastReferredTime()
Returns the last referred time. |
long |
getLModified()
Returns the last modification time. |
java.lang.String |
getName()
Returns the name of this user. |
java.lang.String |
getPassword()
Returns the encrypted password of this user. |
Role[] |
getRoles()
Returns roles of this user. |
long |
getSignInTime()
Returns the sign in time. |
boolean |
hasCheckPoint(java.lang.String checkPoint)
Checks the authority of user against a check point. |
boolean |
isAccountDisabled()
Returns true if this user is disabled. |
void |
removeAttribute(java.lang.String name)
Removes the specified attribute from this user. |
void |
removeRole(Role role)
Removes a role from this user. |
void |
setAccountDisabled(boolean value)
Sets the user account as enabled or disabled. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets a user attribute to this user. |
void |
setBroker(SecurityBroker broker)
Sets the security broker to this object . |
void |
setEmail(java.lang.String email)
Sets the email address of this user. |
void |
setFullname(java.lang.String fullname)
Sets the full name of this user. |
void |
setId(java.lang.String value)
Sets the database record identity of this user. |
void |
setLastReferredTime(long value)
Sets the last referred time. |
void |
setLModified(long value)
Sets the modification time. |
void |
setName(java.lang.String username)
Sets the user name of this user. |
void |
setPassword(java.lang.String password)
Encrypts the specified password and stores in this user. |
void |
setSignInTime(long value)
Sets the sign in time. |
java.lang.String |
toString()
Returns string representation of this user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public User()
public User(java.lang.String name, java.lang.String password, java.lang.String email, java.lang.String fullname, boolean accDsbld)
name
- User name.password
- Encrypted Password.email
- Email.fullname
- Full name.accDsbld
- Account enabled/disabled flag. True for enabled, false for disabled.Method Detail |
---|
public void setBroker(SecurityBroker broker)
public long getLModified()
public void setLModified(long value)
public long getSignInTime()
public void setSignInTime(long value)
public long getLastReferredTime()
public void setLastReferredTime(long value)
public java.util.Properties getAttributes()
public void setAttribute(java.lang.String name, java.lang.String value)
public java.lang.String getAttribute(java.lang.String name)
public void removeAttribute(java.lang.String name)
public boolean authenticate(java.lang.String password)
true
if they match.
public Role[] getRoles()
public boolean isAccountDisabled()
true
if this user is disabled.
public void setAccountDisabled(boolean value)
public void addRole(Role role)
public void removeRole(Role role)
public java.lang.String getName()
public java.lang.String getEmail()
public void setName(java.lang.String username)
public void setEmail(java.lang.String email)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getFullname()
public void setFullname(java.lang.String fullname)
public java.lang.String getId()
public void setId(java.lang.String value)
Note that: This method is used only by Security Brokers after retrieving the user info from database.
public boolean hasCheckPoint(java.lang.String checkPoint)
checkPoint
- CheckPoint.
public java.lang.String[] getCheckPointNames()
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |