|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.safehaus.triplesec.guardian.Roles
public class Roles
Represnets an immutable set of Roles.
| Constructor Summary | |
|---|---|
Roles(java.lang.String applicationName,
Role[] roles)
Creates a new instance. |
|
| Method Summary | |
|---|---|
Roles |
addAll(Roles roles)
Creates a new set of Roles which contains all elements of
both this set and the specified set (OR operation). |
java.lang.Object |
clone()
|
boolean |
contains(Role role)
Returns true if and only if this set contains the specified role. |
boolean |
contains(java.lang.String roleName)
Returns true if and only if this set contains the Role
with the specified roleName. |
boolean |
containsAll(Roles roles)
Returns true if and only if this set contains all elements of the specified roles. |
boolean |
equals(java.lang.Object that)
|
Role |
get(java.lang.String roleName)
Returns the Role with the specified roleName. |
java.lang.String |
getApplicationName()
Returns the name of the application this roles belong to |
Roles |
getDependentRoles(Permission perm)
|
Roles |
getDependentRoles(java.lang.String permName)
|
int |
hashCode()
|
boolean |
isEmpty()
Returns true if this set is empty. |
java.util.Iterator |
iterator()
Returns an Iterator that iterates all Roles this set contains. |
Roles |
removeAll(Roles roles)
Creates a new set of Roles which contains elements of
this set excluding what exists in the specified set (NAND operation). |
Roles |
retainAll(Roles roles)
Creates a new set of Roles which contains elements which
exists in both this set and the specified set (AND operation). |
int |
size()
Returns the number of elements this set contains. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Roles(java.lang.String applicationName,
Role[] roles)
applicationName - the name of the application this roles belong toroles - the array of Roles that will belong to this role set| Method Detail |
|---|
public java.lang.String getApplicationName()
public boolean contains(Role role)
role - the role to find
public boolean contains(java.lang.String roleName)
Role
with the specified roleName.
roleName - the name of the role to find
public boolean containsAll(Roles roles)
roles - another set of roles
public Role get(java.lang.String roleName)
Role with the specified roleName.
roleName - the name of the role to find
public boolean isEmpty()
public int size()
public java.util.Iterator iterator()
Iterator that iterates all Roles this set contains.
Iterator that iterates all Roles this set containspublic Roles addAll(Roles roles)
Roles which contains all elements of
both this set and the specified set (OR operation). This operation never
modifies this set.
roles - a set of roles to add
public Roles removeAll(Roles roles)
Roles which contains elements of
this set excluding what exists in the specified set (NAND operation).
This operation never modifies this set.
roles - a set of roles to remove
public Roles retainAll(Roles roles)
Roles which contains elements which
exists in both this set and the specified set (AND operation). This
operation never modifies this set.
roles - a set of roles to retain.
public Roles getDependentRoles(java.lang.String permName)
public Roles getDependentRoles(Permission perm)
public java.lang.Object clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object that)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||