|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas.security.realm.principals.User
public class User
This class define the User class which represent a user by its name, password, etc.
Field Summary | |
---|---|
protected static String |
SEPARATOR
Separator of the groups/roles |
Constructor Summary | |
---|---|
User()
Constructor |
|
User(String name,
String password)
Constructor with a given login / password |
Method Summary | |
---|---|
void |
addGroup(String group)
Add the specified group to this user |
void |
addRole(String role)
Add a role to this user |
String[] |
getArrayGroups()
Get the groups |
String[] |
getArrayRoles()
Get the roles |
ArrayList |
getCombinedRoles()
Get the combined roles of this user |
String |
getGroups()
Get the groups |
HashPassword |
getHashPassword()
Set the hashed password of this user |
String |
getName()
Get the name of this user |
String |
getPassword()
Get the password of this user |
String |
getRoles()
Get the roles |
void |
removeGroup(String group)
Remove a group from this user |
void |
removeRole(String role)
Remove a role from this user |
void |
setCombinedRoles(ArrayList combinedRoles)
Set the combined roles of this user |
void |
setGroups(String groups)
Set the groups of the user |
protected void |
setHashPassword(HashPassword hashPassword)
Set the hashed password of this user |
void |
setName(String name)
Set the name of this user |
void |
setPassword(String password)
Set the password of this user |
void |
setRoles(String roles)
Set the roles of the user |
String |
toString()
Use the XML representation of this object |
String |
toXML()
String representation of the user |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Principal |
---|
equals, hashCode |
Field Detail |
---|
protected static final String SEPARATOR
Constructor Detail |
---|
public User()
public User(String name, String password)
name
- the given namepassword
- the given passwordMethod Detail |
---|
public void setName(String name)
JUser
setName
in interface JUser
name
- Name of the userpublic String getName()
JUser
getName
in interface Principal
getName
in interface JUser
getName
in interface UserMBean
public String getPassword()
JUser
getPassword
in interface JUser
getPassword
in interface UserMBean
public void setPassword(String password)
JUser
setPassword
in interface JUser
setPassword
in interface UserMBean
password
- password of the userprotected void setHashPassword(HashPassword hashPassword)
hashPassword
- hashed password of this userpublic HashPassword getHashPassword()
JUser
getHashPassword
in interface JUser
public void setGroups(String groups)
JUser
setGroups
in interface JUser
groups
- the comma separated list of the groups of the userpublic String getGroups()
JUser
getGroups
in interface JUser
public String[] getArrayGroups()
JUser
getArrayGroups
in interface JUser
getArrayGroups
in interface UserMBean
public void setRoles(String roles)
JUser
setRoles
in interface JUser
roles
- the comma separated list of the roles of the userpublic void addGroup(String group)
JUser
addGroup
in interface JUser
addGroup
in interface UserMBean
group
- the group to addpublic void addRole(String role)
JUser
addRole
in interface JUser
addRole
in interface UserMBean
role
- the given rolepublic void removeGroup(String group)
JUser
removeGroup
in interface JUser
removeGroup
in interface UserMBean
group
- the given grouppublic void removeRole(String role)
JUser
removeRole
in interface JUser
removeRole
in interface UserMBean
role
- the given rolepublic String getRoles()
JUser
getRoles
in interface JUser
public void setCombinedRoles(ArrayList combinedRoles)
JUser
setCombinedRoles
in interface JUser
combinedRoles
- combined of the userpublic ArrayList getCombinedRoles()
JUser
getCombinedRoles
in interface JUser
public String[] getArrayRoles()
JUser
getArrayRoles
in interface JUser
getArrayRoles
in interface UserMBean
public String toXML()
JUser
toXML
in interface JUser
public String toString()
toString
in interface Principal
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |