public class DynamicAccessControlListImpl extends Object implements DynamicAccessControlList
Constructor and Description |
---|
DynamicAccessControlListImpl(Map<? extends Group,? extends RoleSet> roleSets,
Map<? extends Role,? extends PermissionSet> permissionSets)
Constructs a new AccessControlList.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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(String permission)
Checks if the user is assigned a specific Permission in the global Group.
|
boolean |
hasPermission(String permission,
Group group)
Checks if the user is assigned a specific Permission in the Group.
|
boolean |
hasPermission(String permissionName,
GroupSet groupset)
Checks if the user is assigned a specific Permission in any of the given
Groups
|
boolean |
hasPermission(String permission,
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
|
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(String role)
Checks if the user is assigned a specific Role .
|
boolean |
hasRole(String rolename,
GroupSet groupset)
Checks if the user is assigned a specific Role in any of the given Groups
|
boolean |
hasRole(String role,
String group)
Checks if the user is assigned a specific Role in the Group.
|
public DynamicAccessControlListImpl(Map<? extends Group,? extends RoleSet> roleSets, Map<? extends Role,? extends PermissionSet> permissionSets)
roleSets
- a hashtable containing RoleSet objects keyed with Group
objectspermissionSets
- a hashtable containing PermissionSet objects keyed with Roles
objectspublic RoleSet getRoles(Group group)
getRoles
in interface DynamicAccessControlList
group
- the Grouppublic RoleSet getRoles()
getRoles
in interface DynamicAccessControlList
public PermissionSet getPermissions(Group group)
getPermissions
in interface DynamicAccessControlList
group
- the Grouppublic PermissionSet getPermissions()
getPermissions
in interface DynamicAccessControlList
public boolean hasRole(Role role, Group group)
hasRole
in interface DynamicAccessControlList
role
- the Rolegroup
- the Grouptrue
if the user is assigned the Role in the Group.public boolean hasRole(Role role, GroupSet groupset)
hasRole
in interface DynamicAccessControlList
role
- the Rolegroupset
- a Groupsettrue
if the user is assigned the Role in any of the
given Groups.public boolean hasRole(String role, String group)
hasRole
in interface DynamicAccessControlList
role
- the Rolegroup
- the Grouptrue
if the user is assigned the Role in the Group.public boolean hasRole(String rolename, GroupSet groupset)
hasRole
in interface DynamicAccessControlList
rolename
- the name of the Rolegroupset
- a Groupsettrue
if the user is assigned the Role in any of the
given Groups.public boolean hasRole(Role role)
hasRole
in interface DynamicAccessControlList
role
- the Roletrue
if the user is assigned the Role in the global
Group.public boolean hasRole(String role)
hasRole
in interface DynamicAccessControlList
role
- the Roletrue
if the user is assigned the Role .public boolean hasPermission(Permission permission, Group group)
hasPermission
in interface DynamicAccessControlList
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the
Group.public boolean hasPermission(Permission permission, GroupSet groupset)
hasPermission
in interface DynamicAccessControlList
permission
- the Permissiongroupset
- a Groupsettrue
if the user is assigned the Permission in any
of the given Groups.public boolean hasPermission(String permission, String group)
hasPermission
in interface DynamicAccessControlList
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the
Group.public boolean hasPermission(String permission, Group group)
hasPermission
in interface DynamicAccessControlList
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the
Group.public boolean hasPermission(String permissionName, GroupSet groupset)
hasPermission
in interface DynamicAccessControlList
permissionName
- the name of the Permissiongroupset
- a Groupsettrue
if the user is assigned the Permission in any
of the given Groups.public boolean hasPermission(Permission permission)
hasPermission
in interface DynamicAccessControlList
permission
- the Permissiontrue
if the user is assigned the Permission .public boolean hasPermission(String permission)
hasPermission
in interface DynamicAccessControlList
permission
- the Permissiontrue
if the user is assigned the Permission in the
global Group.Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.