|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.security.internal.realm.principal.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()
UserMBean
getName
in interface Principal
getName
in interface UserMBean
getName
in interface JUser
public String getPassword()
UserMBean
getPassword
in interface UserMBean
getPassword
in interface JUser
public void setPassword(String password)
UserMBean
setPassword
in interface UserMBean
setPassword
in interface JUser
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()
UserMBean
getArrayGroups
in interface UserMBean
getArrayGroups
in interface JUser
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)
UserMBean
addGroup
in interface UserMBean
addGroup
in interface JUser
group
- the group to addpublic void addRole(String role)
UserMBean
addRole
in interface UserMBean
addRole
in interface JUser
role
- the given rolepublic void removeGroup(String group)
UserMBean
removeGroup
in interface UserMBean
removeGroup
in interface JUser
group
- the given grouppublic void removeRole(String role)
UserMBean
removeRole
in interface UserMBean
removeRole
in interface JUser
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()
UserMBean
getArrayRoles
in interface UserMBean
getArrayRoles
in interface JUser
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 |