|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.security.Role
public class Role
Application specific role. Common examples are "administrator", "user",
"anonymous", "supervisor". Note that for reusability purpose, it is
recommended that those role don't reflect an actual organization, but more
the functional requirements of your application.
Also, two roles are not considered equals if they have the same the name and
child roles, they need to be the same Java object. If you need to reuse the
same role, you should call Application.getRole(String)
method
instead.
Field Summary | |
---|---|
static Role |
ALL
Unmodifiable role that covers all existing roles. |
Constructor Summary | |
---|---|
Role()
Default constructor. |
|
Role(String name)
Constructor. |
|
Role(String name,
String description)
Constructor. |
Method Summary | |
---|---|
List<Role> |
getChildRoles()
Returns the modifiable list of child roles. |
String |
getDescription()
Returns the description. |
String |
getName()
Returns the name. |
void |
setChildRoles(List<Role> childRoles)
Sets the modifiable list of child roles. |
void |
setDescription(String description)
Sets the description. |
void |
setName(String name)
Sets the name. |
String |
toString()
|
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 |
---|
public static final Role ALL
Constructor Detail |
---|
public Role()
public Role(String name)
name
- The name.public Role(String name, String description)
name
- The name.description
- The description.Method Detail |
---|
public List<Role> getChildRoles()
public String getDescription()
public String getName()
getName
in interface Principal
public void setChildRoles(List<Role> childRoles)
childRoles
- A list of child roles.public void setDescription(String description)
description
- The description.public void setName(String name)
name
- The name.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 |