|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.util.security.SecuritySet
org.apache.turbine.util.security.PermissionSet
This class represents a set of Permissions. It makes it easy to build a UI that would allow someone to add a group of Permissions to a Role. It enforces that only Permission objects are allowed in the set and only relevant methods are available.
Field Summary |
Fields inherited from class org.apache.turbine.util.security.SecuritySet |
idMap, nameMap |
Constructor Summary | |
PermissionSet()
Constructs an empty PermissionSet |
|
PermissionSet(java.util.Collection permissions)
Constructs a new PermissionSet with specified contents. |
Method Summary | |
boolean |
add(java.util.Collection permissions)
Adds the Permissions in a Collection to this PermissionSet. |
boolean |
add(Permission permission)
Adds a Permission to this PermissionSet. |
boolean |
add(PermissionSet permissionSet)
Adds the Permissions in another PermissionSet to this PermissionSet. |
boolean |
contains(Permission permission)
Checks whether this PermissionSet contains a Permission. |
Permission |
getPermission(java.lang.String permissionName)
Deprecated. Use getPermissionByName instead. |
Permission |
getPermissionById(int permissionId)
Returns a Permission with the given id, if it is contained in this PermissionSet. |
Permission |
getPermissionByName(java.lang.String permissionName)
Returns a Permission with the given name, if it is contained in this PermissionSet. |
Permission[] |
getPermissionsArray()
Returns an Array of Permissions in this PermissionSet. |
boolean |
remove(Permission permission)
Removes a Permission from this PermissionSet. |
java.lang.String |
toString()
Print out a PermissionSet as a String |
Methods inherited from class org.apache.turbine.util.security.SecuritySet |
clear, contains, containsId, containsName, elements, getIds, getNames, getSet, iterator, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PermissionSet()
public PermissionSet(java.util.Collection permissions)
permissions
- A collection of permissions to be contained in the set.Method Detail |
public boolean add(Permission permission)
permission
- A Permission.
public boolean add(java.util.Collection permissions)
permissions
- A Collection of Permissions.
public boolean add(PermissionSet permissionSet)
permissionSet
- A PermissionSet.
public boolean remove(Permission permission)
permission
- A Permission.
public boolean contains(Permission permission)
permission
- A Permission.
public Permission getPermission(java.lang.String permissionName)
permissionName
- Name of Permission.
public Permission getPermissionByName(java.lang.String permissionName)
permissionName
- Name of Permission.
public Permission getPermissionById(int permissionId)
permissionId
- Id of the Permission.
public Permission[] getPermissionsArray()
public java.lang.String toString()
toString
in class SecuritySet
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |