public class Role extends Object implements Principal
Role instances, you
should try to call Application.getRole(String) method.| Constructor and Description |
|---|
Role()
Default constructor.
|
Role(Application application,
String name)
Constructor.
|
Role(Application application,
String name,
String description)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static Role |
get(Application application,
String name)
Finds an existing role or creates a new one if needed.
|
static Role |
get(Application application,
String name,
String description)
Finds an existing role or creates a new one if needed.
|
Application |
getApplication()
Returns the parent application.
|
List<Role> |
getChildRoles()
Returns the modifiable list of child roles.
|
String |
getDescription()
Returns the description.
|
String |
getName()
Returns the name.
|
int |
hashCode() |
void |
setApplication(Application application)
Sets the parent application.
|
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() |
public Role()
Application.getCurrent() method if available or is null.public Role(Application application, String name)
application - The parent application or null.name - The name.public Role(Application application, String name, String description)
application - The parent application or null.name - The name.description - The description.public static Role get(Application application, String name)
application - The parent application.name - The role name to find or create.public static Role get(Application application, String name, String description)
application - The parent application.name - The role name to find or create.description - The role description if one needs to be created.public boolean equals(Object o)
public Application getApplication()
public List<Role> getChildRoles()
public String getDescription()
public String getName()
public int hashCode()
public void setApplication(Application application)
application - The parent application.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.Copyright © 2005–2025. All rights reserved.