|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.util.security.TurbineAccessControlList
This is a control class that makes it easy to find out if a particular User has a given Permission. It also determines if a User has a a particular Role.
Field Summary |
Fields inherited from interface org.apache.turbine.util.security.AccessControlList |
SESSION_KEY |
Constructor Summary | |
TurbineAccessControlList(java.util.Map roleSets,
java.util.Map permissionSets)
Constructs a new AccessControlList. |
Method Summary | |
Group[] |
getAllGroups()
Returns all groups definded in the system. |
java.lang.String |
getName()
Returns the name of this ACL. |
PermissionSet |
getPermissions()
Retrieves a set of Permissions an user is assigned in the global Group. |
PermissionSet |
getPermissions(Group group)
Retrieves a set of Permissions an user is assigned in a Group. |
RoleSet |
getRoles()
Retrieves a set of Roles an user is assigned in the global Group. |
RoleSet |
getRoles(Group group)
Retrieves a set of Roles an user is assigned in a Group. |
boolean |
hasPermission(Permission permission)
Checks if the user is assigned a specific Permission in the global Group. |
boolean |
hasPermission(Permission permission,
Group group)
Checks if the user is assigned a specific Permission in the Group. |
boolean |
hasPermission(Permission permission,
GroupSet groupset)
Checks if the user is assigned a specific Permission in any of the given Groups |
boolean |
hasPermission(java.lang.String permission)
Checks if the user is assigned a specific Permission in the global Group. |
boolean |
hasPermission(java.lang.String permission,
Group group)
Checks if the user is assigned a specific Permission in the Group. |
boolean |
hasPermission(java.lang.String permissionName,
GroupSet groupset)
Checks if the user is assigned a specifie Permission in any of the given Groups |
boolean |
hasPermission(java.lang.String permission,
java.lang.String group)
Checks if the user is assigned a specific Permission in the Group. |
boolean |
hasRole(Role role)
Checks if the user is assigned a specific Role in the global Group. |
boolean |
hasRole(Role role,
Group group)
Checks if the user is assigned a specific Role in the Group. |
boolean |
hasRole(Role role,
GroupSet groupset)
Checks if the user is assigned a specific Role in any of the given Groups |
boolean |
hasRole(java.lang.String role)
Checks if the user is assigned a specific Role in the global Group. |
boolean |
hasRole(java.lang.String rolename,
GroupSet groupset)
Checks if the user is assigned a specifie Role in any of the given Groups |
boolean |
hasRole(java.lang.String role,
java.lang.String group)
Checks if the user is assigned a specific Role in the Group. |
void |
setName(java.lang.String name)
Sets the name of this ACL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TurbineAccessControlList(java.util.Map roleSets, java.util.Map permissionSets)
roleSets
- a hashtable containing RoleSet objects keyed with Group objectspermissionSets
- a hashtable containing PermissionSet objects keyed with Group objectsMethod Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The new ACL name.public RoleSet getRoles(Group group)
getRoles
in interface AccessControlList
group
- the Group
public RoleSet getRoles()
getRoles
in interface AccessControlList
public PermissionSet getPermissions(Group group)
getPermissions
in interface AccessControlList
group
- the Group
public PermissionSet getPermissions()
getPermissions
in interface AccessControlList
public boolean hasRole(Role role, Group group)
hasRole
in interface AccessControlList
role
- the Rolegroup
- the Group
true
if the user is assigned the Role in the Group.public boolean hasRole(Role role, GroupSet groupset)
hasRole
in interface AccessControlList
role
- the Rolegroupset
- a Groupset
true
if the user is assigned the Role in any of
the given Groups.public boolean hasRole(java.lang.String role, java.lang.String group)
hasRole
in interface AccessControlList
role
- the Rolegroup
- the Group
true
if the user is assigned the Role in the Group.public boolean hasRole(java.lang.String rolename, GroupSet groupset)
hasRole
in interface AccessControlList
rolename
- the name of the Rolegroupset
- a Groupset
true
if the user is assigned the Role in any of
the given Groups.public boolean hasRole(Role role)
hasRole
in interface AccessControlList
role
- the Role
true
if the user is assigned the Role in the global Group.public boolean hasRole(java.lang.String role)
hasRole
in interface AccessControlList
role
- the Role
true
if the user is assigned the Role in the global Group.public boolean hasPermission(Permission permission, Group group)
hasPermission
in interface AccessControlList
permission
- the Permissiongroup
- the Group
true
if the user is assigned the Permission in the Group.public boolean hasPermission(Permission permission, GroupSet groupset)
hasPermission
in interface AccessControlList
permission
- the Permissiongroupset
- a Groupset
true
if the user is assigned the Permission in any
of the given Groups.public boolean hasPermission(java.lang.String permission, java.lang.String group)
hasPermission
in interface AccessControlList
permission
- the Permissiongroup
- the Group
true
if the user is assigned the Permission in the Group.public boolean hasPermission(java.lang.String permission, Group group)
hasPermission
in interface AccessControlList
permission
- the Permissiongroup
- the Group
true
if the user is assigned the Permission in the Group.public boolean hasPermission(java.lang.String permissionName, GroupSet groupset)
hasPermission
in interface AccessControlList
permissionName
- the name of the Permissiongroupset
- a Groupset
true
if the user is assigned the Permission in any
of the given Groups.public boolean hasPermission(Permission permission)
hasPermission
in interface AccessControlList
permission
- the Permission
true
if the user is assigned the Permission in the global Group.public boolean hasPermission(java.lang.String permission)
hasPermission
in interface AccessControlList
permission
- the Permission
true
if the user is assigned the Permission in the global Group.public Group[] getAllGroups()
getAllGroups
in interface AccessControlList
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |