public class AccessControlContextProxy extends Object implements AccessControlContext
SYSTEM_DOMAIN, SYSTEM_RESOURCE_CLASS
Constructor and Description |
---|
AccessControlContextProxy() |
Modifier and Type | Method and Description |
---|---|
void |
assertGlobalResourcePermission(String resourceClassName,
ResourcePermission resourcePermission)
Checks if the current session resource has the specified global resource permission on
the specified resource class in the session resource's domain.
|
void |
assertGlobalResourcePermission(String resourceClassName,
ResourcePermission resourcePermission,
String domainName)
Checks if the current session resource has the specified global resource permission on
the specified resource class in the specified domain.
|
void |
assertPostCreateResourcePermission(String resourceClassName,
ResourcePermission resourcePermission)
Checks if the current session resource would receive the specified permission on an object of
the specified class in the session resource's domain, if were to create such an object.
|
void |
assertPostCreateResourcePermission(String resourceClassName,
ResourcePermission resourcePermission,
String domainName)
Checks if the current session resource would receive the specified permission on an object of
the specified class in the specified domain, if were to create such an object.
|
void |
assertResourcePermission(Resource accessedResource,
ResourcePermission resourcePermission)
Checks if the current session resource has the specified resource permission to
the specified accessed resource.
|
void |
assertResourcePermission(Resource accessorResource,
Resource accessedResource,
ResourcePermission resourcePermission)
Checks if the specified accessor resource has the specified resource permission
to the specified accessed resource.
|
void |
authenticate(Resource resource,
String password)
Authenticates this security session.
|
Resource |
createAuthenticatableResource(String resourceClassName,
String password)
Creates a new authenticatable resource in the same domain as the session resource.
|
Resource |
createAuthenticatableResource(String resourceClassName,
String domainName,
String password)
Creates a new authenticatable resource within the specified domain.
|
void |
createDomain(String domainName)
Creates a new domain (at the root level of the domain hierarchy).
|
void |
createDomain(String domainName,
String parentDomainName)
Creates a new domain under the specified parent domain.
|
Resource |
createResource(String resourceClassName)
Creates a new resource class in the same domain as this session resource.
|
Resource |
createResource(String resourceClassName,
String domainName)
Creates a new resource class within the specified domain.
|
void |
createResourceClass(String resourceClassName,
boolean authenticatable,
boolean unuthenticatedCreateAllowed)
Creates a new resource class.
|
void |
createResourcePermission(String resourceClassName,
String permissionName)
Creates a new resource permission that may be applied to objects of the specified resource class.
|
Set<Resource> |
getAccessorResourcesByResourcePermission(Resource accessedResource,
String resourceClassName,
ResourcePermission resourcePermission)
Returns a set of resources that have the specified permission to the specified accessed resource.
|
Resource |
getAuthenticatedResource()
Returns the resource that is currently authenticated in this session.
|
Set<String> |
getDomainDescendants(String domainName)
Returns the domains which are descendants of the specified domain.
|
String |
getDomainNameByResource(Resource resource)
Returns the domain to which the specified resource belongs.
|
Set<DomainCreatePermission> |
getEffectiveDomainCreatePermissions(Resource accessorResource)
Gets all effective domain create permissions the specified accessor resource has, both directly
and inherited (from other resources).
|
Set<DomainPermission> |
getEffectiveDomainPermissions(Resource accessorResource,
String domainName)
Gets all effective domain permissions the accessor resource has to the specified domain.
|
Map<String,Set<DomainPermission>> |
getEffectiveDomainPermissionsMap(Resource accessorResource)
Gets all effective domain permissions the accessor resource has to any domain, mapped by domain name.
|
Set<ResourcePermission> |
getEffectiveGlobalResourcePermissions(Resource accessorResource,
String resourceClassName)
Gets the effective global resource permissions the specified accessor resource has to the resources of
the specified resource class in the current session resource's domain.
|
Set<ResourcePermission> |
getEffectiveGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
String domainName)
Gets the effective global resource permissions the specified accessor resource has to the resources of
the specified resource class in the specified domain.
|
Map<String,Map<String,Set<ResourcePermission>>> |
getEffectiveGlobalResourcePermissionsMap(Resource accessorResource)
Gets all effective global resource permissions the specified accessor resource has to the resources of
the any resource class in any domain, mapped by domain name and resource class name.
|
Set<ResourceCreatePermission> |
getEffectiveResourceCreatePermissions(Resource accessorResource,
String resourceClassName)
Gets all effective resource create permissions the accessor resource has to the specified
resource class in the the current session resource's domain (which effectively define
the resource permissions the accessor resource will receive directly, if it created
a resource of the specified resource class in the current session resource's domain).
|
Set<ResourceCreatePermission> |
getEffectiveResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
String domainName)
Gets all effective resource create permissions the accessor resource has to the specified
resource class in the specified domain (which effectively define the resource permissions
the accessor resource will receive directly, if it created a resource of the specified
resource class in the specified domain).
|
Map<String,Map<String,Set<ResourceCreatePermission>>> |
getEffectiveResourceCreatePermissionsMap(Resource accessorResource)
Gets all effective resource create permissions the accessor resource has to any resource class in
any domain, mapped by domain name and resource class name.
|
Set<ResourcePermission> |
getEffectiveResourcePermissions(Resource accessorResource,
Resource accessedResource)
Gets the effective resource permissions that the specified accessor resource has to the
specified accessed resource both directly and inherited, but does not take into
account any global resource permissions.
|
ResourceClassInfo |
getResourceClassInfo(String resourceClassName)
Returns information about the specified resource class.
|
ResourceClassInfo |
getResourceClassInfoByResource(Resource resource)
Returns information about the resource class to which the specified resource belongs.
|
List<String> |
getResourceClassNames()
Returns the list of names of all resource classes defined in the system
|
List<String> |
getResourcePermissionNames(String resourceClassName)
Returns the list of all resource permission names defined for the specified resource class name
|
Set<Resource> |
getResourcesByResourcePermission(Resource accessorResource,
String resourceClassName,
ResourcePermission resourcePermission)
Returns a set of resources (of the specified resource class) on which
the specified accessor resource has the specified permission, regardless of domain.
|
Set<Resource> |
getResourcesByResourcePermission(Resource accessorResource,
String resourceClassName,
ResourcePermission resourcePermission,
String domainName)
Returns a set of resources (of the specified resource class) on which
the specified accessor resource has the specified permission, within the
specified domain or within any descendant domains.
|
Set<Resource> |
getResourcesByResourcePermission(String resourceClassName,
ResourcePermission resourcePermission)
Returns a set of resources (of the specified resource class) on which
the current session resource has the specified permission.
|
Set<Resource> |
getResourcesByResourcePermission(String resourceClassName,
ResourcePermission resourcePermission,
String domainName)
Returns a set of resources (of the specified resource class) on which
the current session resource has the specified permission, within the specified domain
or within any descendant domains.
|
Resource |
getSessionResource()
Returns the session resource, that is, the resource whose security credentials are
associated with this session.
|
void |
impersonate(Resource resource)
Switches the security credentials of this session to those of the specified resource.
|
void |
setAuthenticatedResourcePassword(String newPassword)
Sets the password of the currently authenticated resource
Note that this method uses the credentials of the originally authenticated resource,
and not those of any currently impersonated resource.
|
void |
setDomainCreatePermissions(Resource accessorResource,
Set<DomainCreatePermission> domainCreatePermissions)
Sets the domain permissions the specified accessor resource will receive if it created a domain.
|
void |
setDomainPermissions(Resource accessorResource,
String domainName,
Set<DomainPermission> domainPermissions)
Sets the direct domain permissions the specified accessor resource has on the specified domain.
|
void |
setGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
Set<ResourcePermission> resourcePermissions)
Sets the global resource permissions a resource has on any resource of the specified
resource class in the current session resource's domain.
|
void |
setGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
Set<ResourcePermission> resourcePermissions,
String domainName)
Sets the global resource permissions a resource has on any resource of the specified
resource class in the specified domain.
|
void |
setResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
Set<ResourceCreatePermission> resourceCreatePermissions)
Sets the resource permissions the specified accessor resource will receive directly, if it
created a resource of the specified resource class in the current session resource's domain.
|
void |
setResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
Set<ResourceCreatePermission> resourceCreatePermissions,
String domainName)
Sets the resource permissions the specified accessor resource will receive directly, if it
created a resource of the specified resource class in the specified domain.
|
void |
setResourcePassword(Resource resource,
AuthenticationProvider authenticationProvider,
String newPassword)
Sets the password of the specified authenticatable resource (= a resource of a resource class
that has been defined with the
isAuthenticatable flag set) by means of an alternate
specified authentication provider to this session. |
void |
setResourcePassword(Resource resource,
String newPassword)
Sets the password of the specified authenticatable resource (= a resource of a resource class
that has been defined with the
isAuthenticatable flag set). |
void |
setResourcePermissions(Resource accessorResource,
Resource accessedResource,
Set<ResourcePermission> resourcePermissions)
Sets the specified resource permissions that the specified accessor resource has to the
specified accessed resource directly, that is not via inheritance or globally.
|
void |
unauthenticate()
Logs out of this session, to be specific, disassociates any security credentials from this session.
|
void |
unimpersonate()
Unimpersonates the currently impersonated resource.
|
public void authenticate(Resource resource, String password) throws AccessControlException
AccessControlContext
authenticate
) will fail.authenticate
in interface AccessControlContext
resource
- the resource to be authenticatedpassword
- the password associated with the resourceAccessControlException
- if an error occurspublic void unauthenticate() throws AccessControlException
AccessControlContext
unauthenticate
in interface AccessControlContext
AccessControlException
- if no resource is currently authenticated, or if an error occurspublic void impersonate(Resource resource) throws AccessControlException
AccessControlContext
impersonate
in interface AccessControlContext
resource
- the resource to be impersonatedAccessControlException
- if an error occurspublic void unimpersonate() throws AccessControlException
AccessControlContext
unimpersonate
in interface AccessControlContext
AccessControlException
- if an error occurspublic void setAuthenticatedResourcePassword(String newPassword) throws AccessControlException
AccessControlContext
setAuthenticatedResourcePassword
in interface AccessControlContext
newPassword
- a new password for the currently authenticated resourceAccessControlException
- if an error occurspublic void setResourcePassword(Resource resource, String newPassword) throws AccessControlException
AccessControlContext
isAuthenticatable
flag set).
One of the following has to be true for this method to succeed:
setResourcePassword
in interface AccessControlContext
resource
- the resource for which the password should be changed. The resource for which the password is
to be changed must be the current auth resource, or the current auth resource must have SUPER-USER permissions
to the domain containing the resource whose password is to be changed or must have RESET-PASSWORD
permissions to the resource whose password is to be changed, otherwise an exception is thrown.newPassword
- the new password for the resourceAccessControlException
- if an error occurspublic void assertPostCreateResourcePermission(String resourceClassName, ResourcePermission resourcePermission) throws AccessControlException
AccessControlContext
assertPostCreateResourcePermission
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedAccessControlException
- if the session resource would not receive the
specified permission after creating a resource of the specified class in the current session domain,
or if an error occurspublic void assertPostCreateResourcePermission(String resourceClassName, ResourcePermission resourcePermission, String domainName) throws AccessControlException
AccessControlContext
assertPostCreateResourcePermission
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkeddomainName
- the domain in which the permission should be checkedAccessControlException
- if the session resource would not receive the
specified permission after creating a resource of the specified class in the specified domain,
or if an error occurspublic void assertGlobalResourcePermission(String resourceClassName, ResourcePermission resourcePermission) throws AccessControlException
AccessControlContext
assertGlobalResourcePermission
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedAccessControlException
- if the session resource does not have the
specified global permission, or if an error occurspublic void assertGlobalResourcePermission(String resourceClassName, ResourcePermission resourcePermission, String domainName) throws AccessControlException
AccessControlContext
assertGlobalResourcePermission
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkeddomainName
- the domain in which the permission should be checkedAccessControlException
- if the session resource does not have the
specified global permission, or if an error occurspublic void assertResourcePermission(Resource accessedResource, ResourcePermission resourcePermission) throws AccessControlException
AccessControlContext
assertResourcePermission
in interface AccessControlContext
accessedResource
- the resource on which access is being checkedresourcePermission
- the permission to be checkedAccessControlException
- if the session resource does not have the
specified permission, or if an error occurspublic void assertResourcePermission(Resource accessorResource, Resource accessedResource, ResourcePermission resourcePermission) throws AccessControlException
AccessControlContext
assertResourcePermission
in interface AccessControlContext
accessorResource
- the resource requesting the accessaccessedResource
- the resource on which access is being requestedresourcePermission
- the permission to be checkedAccessControlException
- if the accessor resource does not have the
specified permission, or if an error occurspublic String getDomainNameByResource(Resource resource) throws AccessControlException
AccessControlContext
getDomainNameByResource
in interface AccessControlContext
resource
- the resource for which to retrieve the domain nameAccessControlException
- if an error occurspublic Set<String> getDomainDescendants(String domainName) throws AccessControlException
AccessControlContext
getDomainDescendants
in interface AccessControlContext
domainName
- a domain name for which to retrieve the descendantsAccessControlException
- if an error occurspublic ResourceClassInfo getResourceClassInfo(String resourceClassName) throws AccessControlException
AccessControlContext
getResourceClassInfo
in interface AccessControlContext
resourceClassName
- a string resource class name about which to retrieve informationAccessControlException
- if an error occurspublic ResourceClassInfo getResourceClassInfoByResource(Resource resource) throws AccessControlException
AccessControlContext
getResourceClassInfoByResource
in interface AccessControlContext
resource
- a resource about whose resource class to retrieve informationAccessControlException
- if an error occurspublic Set<Resource> getResourcesByResourcePermission(String resourceClassName, ResourcePermission resourcePermission) throws AccessControlException
AccessControlContext
getResourcesByResourcePermission
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to checkAccessControlException
- if an error occurspublic Set<Resource> getResourcesByResourcePermission(Resource accessorResource, String resourceClassName, ResourcePermission resourcePermission) throws AccessControlException
AccessControlContext
getResourcesByResourcePermission
in interface AccessControlContext
accessorResource
- the resource relative to which the set of accessible resources is computedresourceClassName
- a string resource class nameresourcePermission
- the permission to checkAccessControlException
- if an error occurspublic Set<Resource> getResourcesByResourcePermission(String resourceClassName, ResourcePermission resourcePermission, String domainName) throws AccessControlException
AccessControlContext
getResourcesByResourcePermission
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to checkdomainName
- a domain nameAccessControlException
- if an error occurspublic Set<Resource> getResourcesByResourcePermission(Resource accessorResource, String resourceClassName, ResourcePermission resourcePermission, String domainName) throws AccessControlException
AccessControlContext
getResourcesByResourcePermission
in interface AccessControlContext
accessorResource
- the resource relative to which the set of accessible resources is computedresourceClassName
- a string resource class nameresourcePermission
- the permission to checkdomainName
- a domain nameAccessControlException
- if an error occurspublic Set<Resource> getAccessorResourcesByResourcePermission(Resource accessedResource, String resourceClassName, ResourcePermission resourcePermission) throws AccessControlException
AccessControlContext
AccessControlContext.getResourcesByResourcePermission(java.lang.String, com.acciente.oacc.ResourcePermission)
method, but
unlike getResourcesByResourcePermission
it only takes into account direct permissions.
In other words, this method ignores accessors that can reach the specified accessed resource
via inherited permissions, global permissions and SUPER-USER privileges.getAccessorResourcesByResourcePermission
in interface AccessControlContext
accessedResource
- the resource relative to which accessor resources are soughtresourceClassName
- a string resource class nameresourcePermission
- the permission to checkAccessControlException
- if an error occurspublic Resource getAuthenticatedResource() throws AccessControlException
AccessControlContext
getAuthenticatedResource
in interface AccessControlContext
AccessControlException
- if no resource is authenticatedpublic Resource getSessionResource() throws AccessControlException
AccessControlContext
impersonated
.getSessionResource
in interface AccessControlContext
AccessControlException
- if no resource is authenticatedpublic void setResourcePassword(Resource resource, AuthenticationProvider authenticationProvider, String newPassword) throws AccessControlException
AccessControlContext
isAuthenticatable
flag set) by means of an alternate
specified authentication provider to this session.
Note that this method requires this session to be unauthenticated.
This method is provided to allow for certain use cases, like a "forgotten password" reset,
when a resource representing a "user" can not authenticate to this session.
The specified alternate authentication provider provides a callback via the
isAuthenticated
method that allows this session
to temporarily authenticate, for purposes of resetting the specified resource's password.setResourcePassword
in interface AccessControlContext
resource
- the resource for which the password should be changed.authenticationProvider
- a callback that allows OACC to hook into the alternate authentication mechanism
used to clear the password reset.newPassword
- the new password for the resourceAccessControlException
- if an error occurspublic void createResourceClass(String resourceClassName, boolean authenticatable, boolean unuthenticatedCreateAllowed) throws AccessControlException
AccessControlContext
createResourceClass
in interface AccessControlContext
resourceClassName
- a string resource class nameauthenticatable
- indicates if resources of this resource class are authenticatable.
Typically only resource classes that represent users will be marked as authenticatable.unuthenticatedCreateAllowed
- if true, a resource of this resource class may be created from an
unauthenticated session, otherwise the session must be authenticated
to create resources of this class.AccessControlException
- if an error occurspublic void createResourcePermission(String resourceClassName, String permissionName) throws AccessControlException
AccessControlContext
createResourcePermission
in interface AccessControlContext
resourceClassName
- a string resource class namepermissionName
- the string representing the name of this permission.
Samples of typical permission names:
CREATE, READ, WRITE, UPDATE, VIEW, POST, EDIT, etc.AccessControlException
- if an error occurspublic void createDomain(String domainName) throws AccessControlException
AccessControlContext
createDomain
in interface AccessControlContext
domainName
- a string domain nameAccessControlException
- if an error occurspublic void createDomain(String domainName, String parentDomainName) throws AccessControlException
AccessControlContext
createDomain
in interface AccessControlContext
domainName
- a string domain nameparentDomainName
- the domain name of the parent domainAccessControlException
- if an error occurspublic Resource createResource(String resourceClassName) throws AccessControlException
AccessControlContext
createResource
in interface AccessControlContext
resourceClassName
- a string resource class nameAccessControlException
- if an error occurspublic Resource createResource(String resourceClassName, String domainName) throws AccessControlException
AccessControlContext
createResource
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- a string domain nameAccessControlException
- if an error occurspublic Resource createAuthenticatableResource(String resourceClassName, String password) throws AccessControlException
AccessControlContext
createAuthenticatableResource
in interface AccessControlContext
resourceClassName
- a string resource class namepassword
- a string password with at least 6 characters and no leading or trailing spacesAccessControlException
- if an error occurspublic Resource createAuthenticatableResource(String resourceClassName, String domainName, String password) throws AccessControlException
AccessControlContext
createAuthenticatableResource
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- a string domain namepassword
- a string password with at least 6 characters and no leading or trailing spacesAccessControlException
- if an error occurspublic void setDomainCreatePermissions(Resource accessorResource, Set<DomainCreatePermission> domainCreatePermissions) throws AccessControlException
AccessControlContext
setDomainCreatePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be granteddomainCreatePermissions
- the permissions to be granted to the specified domainAccessControlException
- if an error occurspublic Set<DomainCreatePermission> getEffectiveDomainCreatePermissions(Resource accessorResource) throws AccessControlException
AccessControlContext
getEffectiveDomainCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedAccessControlException
- if an error occurspublic void setDomainPermissions(Resource accessorResource, String domainName, Set<DomainPermission> domainPermissions) throws AccessControlException
AccessControlContext
setDomainPermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be granteddomainName
- a string domain namedomainPermissions
- the permissions to be granted on the specified domainAccessControlException
- if an error occurspublic Set<DomainPermission> getEffectiveDomainPermissions(Resource accessorResource, String domainName) throws AccessControlException
AccessControlContext
getEffectiveDomainPermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returneddomainName
- a string domain nameAccessControlException
- if an error occurspublic Map<String,Set<DomainPermission>> getEffectiveDomainPermissionsMap(Resource accessorResource) throws AccessControlException
AccessControlContext
getEffectiveDomainPermissionsMap
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedAccessControlException
- if an error occurspublic void setResourceCreatePermissions(Resource accessorResource, String resourceClassName, Set<ResourceCreatePermission> resourceCreatePermissions, String domainName) throws AccessControlException
AccessControlContext
setResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be grantedresourceClassName
- a string resource class nameresourceCreatePermissions
- a set of resource create permissions to be granteddomainName
- a string representing a valid domain nameAccessControlException
- if an error occurspublic Set<ResourceCreatePermission> getEffectiveResourceCreatePermissions(Resource accessorResource, String resourceClassName, String domainName) throws AccessControlException
AccessControlContext
getEffectiveResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedresourceClassName
- a string resource class namedomainName
- a string representing a valid domain nameAccessControlException
- if an error occurspublic void setResourceCreatePermissions(Resource accessorResource, String resourceClassName, Set<ResourceCreatePermission> resourceCreatePermissions) throws AccessControlException
AccessControlContext
setResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be grantedresourceClassName
- a string resource class nameresourceCreatePermissions
- a set of resource create permissions to be grantedAccessControlException
- if an error occurspublic Set<ResourceCreatePermission> getEffectiveResourceCreatePermissions(Resource accessorResource, String resourceClassName) throws AccessControlException
AccessControlContext
getEffectiveResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedresourceClassName
- a string resource class nameAccessControlException
- if an error occurspublic Map<String,Map<String,Set<ResourceCreatePermission>>> getEffectiveResourceCreatePermissionsMap(Resource accessorResource) throws AccessControlException
AccessControlContext
getEffectiveResourceCreatePermissionsMap
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedAccessControlException
- if an error occurspublic void setResourcePermissions(Resource accessorResource, Resource accessedResource, Set<ResourcePermission> resourcePermissions) throws AccessControlException
AccessControlContext
setResourcePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be grantedaccessedResource
- the resource on which the privilege is grantedresourcePermissions
- a set of resource permissions to be grantedAccessControlException
- if an error occurspublic Set<ResourcePermission> getEffectiveResourcePermissions(Resource accessorResource, Resource accessedResource) throws AccessControlException
AccessControlContext
getEffectiveResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedaccessedResource
- the resource on which the privilege is grantedAccessControlException
- if an error occurspublic void setGlobalResourcePermissions(Resource accessorResource, String resourceClassName, Set<ResourcePermission> resourcePermissions, String domainName) throws AccessControlException
AccessControlContext
setGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be grantedresourceClassName
- a string resource class nameresourcePermissions
- the set of resource permissions to be granted globally to
the specified resource class and domaindomainName
- a string domain nameAccessControlException
- if an error occurspublic Set<ResourcePermission> getEffectiveGlobalResourcePermissions(Resource accessorResource, String resourceClassName, String domainName) throws AccessControlException
AccessControlContext
getEffectiveGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedresourceClassName
- a string resource class namedomainName
- a string domain nameAccessControlException
- if an error occurspublic void setGlobalResourcePermissions(Resource accessorResource, String resourceClassName, Set<ResourcePermission> resourcePermissions) throws AccessControlException
AccessControlContext
setGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be grantedresourceClassName
- a string resource class nameresourcePermissions
- the set of resource permissions to be granted globally to the
specified resource class and session resource's domainAccessControlException
- if an error occurspublic Set<ResourcePermission> getEffectiveGlobalResourcePermissions(Resource accessorResource, String resourceClassName) throws AccessControlException
AccessControlContext
getEffectiveGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedresourceClassName
- a string resource class nameAccessControlException
- if an error occurspublic Map<String,Map<String,Set<ResourcePermission>>> getEffectiveGlobalResourcePermissionsMap(Resource accessorResource) throws AccessControlException
AccessControlContext
getEffectiveGlobalResourcePermissionsMap
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedAccessControlException
- if an error occurspublic List<String> getResourceClassNames() throws AccessControlException
AccessControlContext
getResourceClassNames
in interface AccessControlContext
AccessControlException
- if an error occurspublic List<String> getResourcePermissionNames(String resourceClassName) throws AccessControlException
AccessControlContext
getResourcePermissionNames
in interface AccessControlContext
resourceClassName
- the resource class name for which the permissions should be retrievedAccessControlException
- if an error occursCopyright © 2014 Acciente, LLC. All rights reserved.