public class SQLAccessControlContext extends Object implements AccessControlContext, Serializable
SYSTEM_DOMAIN, SYSTEM_RESOURCE_CLASS
Modifier and Type | Method and Description |
---|---|
void |
assertDomainCreatePermissions(DomainCreatePermission domainCreatePermission,
DomainCreatePermission... domainCreatePermissions)
Checks if the session resource has the specified domain create permissions.
|
void |
assertDomainCreatePermissions(Resource accessorResource,
DomainCreatePermission domainCreatePermission,
DomainCreatePermission... domainCreatePermissions)
Checks if the specified accessor resource has the specified domain create permissions.
|
void |
assertDomainPermissions(Resource accessorResource,
String domainName,
DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the specified accessor resource has the specified domain permissions on
the specified domain.
|
void |
assertDomainPermissions(String domainName,
DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the session resource has the specified domain permissions on the specified domain.
|
void |
assertGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource has the specified global resource permissions on
the specified resource class in the session resource's domain.
|
void |
assertGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource has the specified global resource permissions on
the specified resource class in the specified domain.
|
void |
assertGlobalResourcePermissions(String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource has the specified global resource permissions on the specified
resource class in the session resource's domain.
|
void |
assertGlobalResourcePermissions(String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource has the specified global resource permissions on the specified
resource class in the specified domain.
|
void |
assertPostCreateDomainPermissions(DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the session resource would receive the specified domain permissions, if it were to create a domain.
|
void |
assertPostCreateDomainPermissions(Resource accessorResource,
DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the specified accessor resource would receive the specified domain permissions, if the accessor
were to create a domain.
|
void |
assertPostCreateResourcePermissions(Resource accessorResource,
String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource would receive the specified permissions on an object of
the specified class in the session resource's domain, if it were to create such an object.
|
void |
assertPostCreateResourcePermissions(Resource accessorResource,
String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource would receive the specified permissions on an object of
the specified class in the specified domain, if it were to create such an object.
|
void |
assertPostCreateResourcePermissions(String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource would receive the specified permissions on an object of
the specified class in the session resource's domain, if it were to create such an object.
|
void |
assertPostCreateResourcePermissions(String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource would receive the specified permissions on an object of
the specified class in the specified domain, if it were to create such an object.
|
void |
assertResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the specified accessor resource has the specified create permissions on an object of
the specified class in the session resource's domain.
|
void |
assertResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
String domainName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the specified accessor resource has the specified create permissions on an object of
the specified class in the specified domain.
|
void |
assertResourceCreatePermissions(String resourceClassName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the session resource has the specified create permissions on an object of the specified
resource class in the session resource's domain.
|
void |
assertResourceCreatePermissions(String resourceClassName,
String domainName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the session resource has the specified create permissions on an object of the specified
resource class in the specified domain.
|
void |
assertResourcePermissions(Resource accessedResource,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource has the specified resource permissions to the specified accessed resource.
|
void |
assertResourcePermissions(Resource accessorResource,
Resource accessedResource,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource has the specified resource permissions
to the specified accessed resource.
|
void |
authenticate(Resource resource)
Authenticates this security session against an
AuthenticationProvider without
specifying authentication credentials, if that AuthenticationProvider supports such an operation. |
void |
authenticate(Resource resource,
Credentials credentials)
Authenticates this security session.
|
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 of the specified resource class in the same domain as this session resource.
|
Resource |
createResource(String resourceClassName,
Credentials credentials)
Creates a new authenticatable resource of the specified resource class in the same domain as the session resource.
|
Resource |
createResource(String resourceClassName,
String domainName)
Creates a new resource of the specified resource class within the specified domain.
|
Resource |
createResource(String resourceClassName,
String domainName,
Credentials credentials)
Creates a new authenticatable resource of the specified resource class within the specified domain.
|
void |
createResourceClass(String resourceClassName,
boolean authenticatable,
boolean unauthenticatedCreateAllowed)
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.
|
static AccessControlContext |
getAccessControlContext(Connection connection,
String schemaName,
SQLDialect sqlDialect) |
static AccessControlContext |
getAccessControlContext(Connection connection,
String schemaName,
SQLDialect sqlDialect,
AuthenticationProvider authenticationProvider) |
static AccessControlContext |
getAccessControlContext(DataSource dataSource,
String schemaName,
SQLDialect sqlDialect) |
static AccessControlContext |
getAccessControlContext(DataSource dataSource,
String schemaName,
SQLDialect sqlDialect,
AuthenticationProvider authenticationProvider) |
Set<Resource> |
getAccessorResourcesByResourcePermissions(Resource accessedResource,
String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Returns a set of resources that have the specified permissions to the specified accessed resource.
|
Resource |
getAuthenticatedResource()
Returns the resource that is currently authenticated in this session.
|
Set<DomainCreatePermission> |
getDomainCreatePermissions(Resource accessorResource)
Gets all direct domain create permissions the specified accessor resource has.
|
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<DomainPermission> |
getDomainPermissions(Resource accessorResource,
String domainName)
Gets all domain permissions the accessor resource has directly to the specified domain.
|
Map<String,Set<DomainPermission>> |
getDomainPermissionsMap(Resource accessorResource)
Gets all domain permissions the accessor resource has directly to any domain, mapped by domain name.
|
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.
|
Set<ResourcePermission> |
getGlobalResourcePermissions(Resource accessorResource,
String resourceClassName)
Gets the global resource permissions the specified accessor resource has directly to the resources of
the specified resource class in the current session resource's domain.
|
Set<ResourcePermission> |
getGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
String domainName)
Gets the global resource permissions the specified accessor resource has directly to the resources of
the specified resource class in the specified domain.
|
Map<String,Map<String,Set<ResourcePermission>>> |
getGlobalResourcePermissionsMap(Resource accessorResource)
Gets all global resource permissions the specified accessor resource has directly to any resources
of any resource class in any domain, mapped by domain name and resource class name.
|
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
|
Set<ResourceCreatePermission> |
getResourceCreatePermissions(Resource accessorResource,
String resourceClassName)
Gets all direct resource create permissions the accessor resource has to the specified
resource class in the the current session resource's domain (which define a subset of
the resource permissions the accessor resource would receive directly, if it created a
resource of the specified resource class in the current session resource's domain).
|
Set<ResourceCreatePermission> |
getResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
String domainName)
Gets all direct resource create permissions the accessor resource has to the specified
resource class in the specified domain (which define a subset of the resource permissions
the accessor resource would receive directly, if it created a resource of the specified
resource class in the specified domain).
|
Map<String,Map<String,Set<ResourceCreatePermission>>> |
getResourceCreatePermissionsMap(Resource accessorResource)
Gets all direct resource create permissions the accessor resource has to any resource class in
any domain, mapped by domain name and resource class name.
|
List<String> |
getResourcePermissionNames(String resourceClassName)
Returns the list of all resource permission names defined for the specified resource class name
|
Set<ResourcePermission> |
getResourcePermissions(Resource accessorResource,
Resource accessedResource)
Gets the resource permissions that the specified accessor resource has directly to the
specified accessed resource.
|
Set<Resource> |
getResourcesByResourcePermissions(Resource accessorResource,
String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Returns a set of resources (of the specified resource class) on which
the specified accessor resource has the specified permissions, regardless of domain.
|
Set<Resource> |
getResourcesByResourcePermissions(String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Returns a set of resources (of the specified resource class) on which
the current session resource has the specified permissions.
|
Set<Resource> |
getResourcesByResourcePermissionsAndDomain(Resource accessorResource,
String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Returns a set of resources (of the specified resource class) on which
the specified accessor resource has the specified permissions, within the
specified domain or within any descendant domains.
|
Set<Resource> |
getResourcesByResourcePermissionsAndDomain(String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Returns a set of resources (of the specified resource class) on which
the current session resource has the specified permissions, 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.
|
protected static <T> Set<T> |
getSetWithoutNulls(T firstElement,
T... elements) |
boolean |
hasDomainCreatePermissions(DomainCreatePermission domainCreatePermission,
DomainCreatePermission... domainCreatePermissions)
Checks if the session resource has the specified domain create permissions.
|
boolean |
hasDomainCreatePermissions(Resource accessorResource,
DomainCreatePermission domainCreatePermission,
DomainCreatePermission... domainCreatePermissions)
Checks if the specified accessor resource has the specified domain create permissions.
|
boolean |
hasDomainPermissions(Resource accessorResource,
String domainName,
DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the specified accessor resource has the specified domain permissions on
the specified domain.
|
boolean |
hasDomainPermissions(String domainName,
DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the session resource has the specified domain permissions on the specified domain.
|
boolean |
hasGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource has the specified global resource permissions on
the specified resource class in the session resource's domain.
|
boolean |
hasGlobalResourcePermissions(Resource accessorResource,
String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource has the specified global resource permissions on
the specified resource class in the specified domain.
|
boolean |
hasGlobalResourcePermissions(String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource has the specified global resource permissions on the specified
resource class in the session resource's domain.
|
boolean |
hasGlobalResourcePermissions(String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource has the specified global resource permissions on the specified
resource class in the specified domain.
|
boolean |
hasPostCreateDomainPermissions(DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the session resource would receive the specified domain permissions, if it were to create a domain.
|
boolean |
hasPostCreateDomainPermissions(Resource accessorResource,
DomainPermission domainPermission,
DomainPermission... domainPermissions)
Checks if the specified accessor resource would receive the specified domain permissions, if the accessor
were to create a domain.
|
boolean |
hasPostCreateResourcePermissions(Resource accessorResource,
String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource would receive the specified permissions on an object of
the specified class in the session resource's domain, if it were to create such an object.
|
boolean |
hasPostCreateResourcePermissions(Resource accessorResource,
String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource would receive the specified permissions on an object of
the specified class in the specified domain, if it were to create such an object.
|
boolean |
hasPostCreateResourcePermissions(String resourceClassName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource would receive the specified permissions on an object of
the specified class in the session resource's domain, if it were to create such an object.
|
boolean |
hasPostCreateResourcePermissions(String resourceClassName,
String domainName,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource would receive the specified permissions on an object of
the specified class in the specified domain, if it were to create such an object.
|
boolean |
hasResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the specified accessor resource has the specified create permissions on an object of
the specified class in the session resource's domain.
|
boolean |
hasResourceCreatePermissions(Resource accessorResource,
String resourceClassName,
String domainName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the specified accessor resource has the specified create permissions on an object of
the specified class in the specified domain.
|
boolean |
hasResourceCreatePermissions(String resourceClassName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the session resource has the specified create permissions on an object of the specified
resource class in the session resource's domain.
|
boolean |
hasResourceCreatePermissions(String resourceClassName,
String domainName,
ResourceCreatePermission resourceCreatePermission,
ResourceCreatePermission... resourceCreatePermissions)
Checks if the session resource has the specified create permissions on an object of the specified
resource class in the specified domain.
|
boolean |
hasResourcePermissions(Resource accessedResource,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the session resource has the specified resource permissions to the specified accessed resource.
|
boolean |
hasResourcePermissions(Resource accessorResource,
Resource accessedResource,
ResourcePermission resourcePermission,
ResourcePermission... resourcePermissions)
Checks if the specified accessor resource has the specified resource permissions
to the specified accessed resource.
|
void |
impersonate(Resource resource)
Switches the security credentials of this session to those of the specified resource.
|
static void |
postDeserialize(AccessControlContext accessControlContext,
Connection connection) |
static void |
postDeserialize(AccessControlContext accessControlContext,
DataSource dataSource) |
static void |
preSerialize(AccessControlContext accessControlContext) |
void |
setCredentials(Resource resource,
Credentials newCredentials)
Sets the authentication credentials of the specified authenticatable resource (= a resource of a
resource class that has been defined with the
isAuthenticatable flag set to true). |
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> permissions)
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,
String domainName,
Set<ResourcePermission> resourcePermissions)
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,
String domainName,
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 specified domain.
|
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 static AccessControlContext getAccessControlContext(Connection connection, String schemaName, SQLDialect sqlDialect)
public static AccessControlContext getAccessControlContext(DataSource dataSource, String schemaName, SQLDialect sqlDialect)
public static AccessControlContext getAccessControlContext(Connection connection, String schemaName, SQLDialect sqlDialect, AuthenticationProvider authenticationProvider)
public static AccessControlContext getAccessControlContext(DataSource dataSource, String schemaName, SQLDialect sqlDialect, AuthenticationProvider authenticationProvider)
public static void preSerialize(AccessControlContext accessControlContext)
public static void postDeserialize(AccessControlContext accessControlContext, Connection connection)
public static void postDeserialize(AccessControlContext accessControlContext, DataSource dataSource)
public void authenticate(Resource resource, Credentials credentials)
AccessControlContext
authenticate
) will fail.authenticate
in interface AccessControlContext
resource
- the resource to be authenticatedcredentials
- the credentials to authenticate the resourcepublic void authenticate(Resource resource)
AccessControlContext
AuthenticationProvider
without
specifying authentication credentials, if that AuthenticationProvider supports such an operation.
The security credentials for this session will be those of the specified and authenticated resource.
Note: Unless a session is authenticated, all attempts to call any other methods (except authenticate
) will fail.authenticate
in interface AccessControlContext
resource
- the resource to be authenticatedpublic void unauthenticate()
AccessControlContext
unauthenticate
in interface AccessControlContext
public void impersonate(Resource resource)
AccessControlContext
impersonate
in interface AccessControlContext
resource
- the resource to be impersonatedpublic void unimpersonate()
AccessControlContext
unimpersonate
in interface AccessControlContext
public void setCredentials(Resource resource, Credentials newCredentials)
AccessControlContext
isAuthenticatable
flag set to true).
One of the following has to be true for this method to succeed:
setCredentials
in interface AccessControlContext
resource
- the resource for which the credentials should be updated. The resource for which the credentials are
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 credentials are to be changed or must have RESET-CREDENTIALS
permissions to the resource whose credentials are to be changed, otherwise an exception is thrown.newCredentials
- the new credentials for the resourcepublic void createResourceClass(String resourceClassName, boolean authenticatable, boolean unauthenticatedCreateAllowed)
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.unauthenticatedCreateAllowed
- 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.public void createResourcePermission(String resourceClassName, String permissionName)
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.public void createDomain(String domainName)
AccessControlContext
createDomain
in interface AccessControlContext
domainName
- a string domain namepublic void createDomain(String domainName, String parentDomainName)
AccessControlContext
createDomain
in interface AccessControlContext
domainName
- a string domain nameparentDomainName
- the domain name of the parent domainpublic Resource createResource(String resourceClassName)
AccessControlContext
AuthenticationProvider
implementation is required to support
creation of an authenticatable resource without providing explicit credentialscreateResource
in interface AccessControlContext
resourceClassName
- a string resource class namepublic Resource createResource(String resourceClassName, String domainName)
AccessControlContext
AuthenticationProvider
implementation is required to support
creation of an authenticatable resource without providing explicit credentialscreateResource
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- a string domain namepublic Resource createResource(String resourceClassName, Credentials credentials)
AccessControlContext
createResource
in interface AccessControlContext
resourceClassName
- a string resource class namecredentials
- the credentials to authenticate the new resourcepublic Resource createResource(String resourceClassName, String domainName, Credentials credentials)
AccessControlContext
createResource
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- a string domain namecredentials
- the credentials to authenticate the new resourcepublic void setDomainPermissions(Resource accessorResource, String domainName, Set<DomainPermission> permissions)
AccessControlContext
setDomainPermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be granteddomainName
- a string domain namepermissions
- the permissions to be granted on the specified domainpublic Set<DomainPermission> getDomainPermissions(Resource accessorResource, String domainName)
AccessControlContext
getDomainPermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returneddomainName
- a string domain namepublic Map<String,Set<DomainPermission>> getDomainPermissionsMap(Resource accessorResource)
AccessControlContext
getDomainPermissionsMap
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedpublic Set<DomainPermission> getEffectiveDomainPermissions(Resource accessorResource, String domainName)
AccessControlContext
getEffectiveDomainPermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returneddomainName
- a string domain namepublic Map<String,Set<DomainPermission>> getEffectiveDomainPermissionsMap(Resource accessorResource)
AccessControlContext
getEffectiveDomainPermissionsMap
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedpublic void setDomainCreatePermissions(Resource accessorResource, Set<DomainCreatePermission> domainCreatePermissions)
AccessControlContext
setDomainCreatePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be granteddomainCreatePermissions
- the permissions to be granted to the specified domainpublic Set<DomainCreatePermission> getDomainCreatePermissions(Resource accessorResource)
AccessControlContext
getDomainCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedpublic Set<DomainCreatePermission> getEffectiveDomainCreatePermissions(Resource accessorResource)
AccessControlContext
getEffectiveDomainCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedpublic void setResourceCreatePermissions(Resource accessorResource, String resourceClassName, String domainName, Set<ResourceCreatePermission> resourceCreatePermissions)
AccessControlContext
setResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be grantedresourceClassName
- a string resource class namedomainName
- a string representing a valid domain nameresourceCreatePermissions
- a set of resource create permissions to be grantedpublic void setResourceCreatePermissions(Resource accessorResource, String resourceClassName, Set<ResourceCreatePermission> resourceCreatePermissions)
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 grantedpublic Set<ResourceCreatePermission> getResourceCreatePermissions(Resource accessorResource, String resourceClassName, String domainName)
AccessControlContext
getResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedresourceClassName
- a string resource class namedomainName
- a string representing a valid domain namepublic Set<ResourceCreatePermission> getResourceCreatePermissions(Resource accessorResource, String resourceClassName)
AccessControlContext
getResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedresourceClassName
- a string resource class namepublic Map<String,Map<String,Set<ResourceCreatePermission>>> getResourceCreatePermissionsMap(Resource accessorResource)
AccessControlContext
getResourceCreatePermissionsMap
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedpublic Set<ResourceCreatePermission> getEffectiveResourceCreatePermissions(Resource accessorResource, String resourceClassName, String domainName)
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 namepublic Set<ResourceCreatePermission> getEffectiveResourceCreatePermissions(Resource accessorResource, String resourceClassName)
AccessControlContext
getEffectiveResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedresourceClassName
- a string resource class namepublic Map<String,Map<String,Set<ResourceCreatePermission>>> getEffectiveResourceCreatePermissionsMap(Resource accessorResource)
AccessControlContext
getEffectiveResourceCreatePermissionsMap
in interface AccessControlContext
accessorResource
- the accessor resource relative which permissions should be returnedpublic void setResourcePermissions(Resource accessorResource, Resource accessedResource, Set<ResourcePermission> resourcePermissions)
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 grantedpublic Set<ResourcePermission> getResourcePermissions(Resource accessorResource, Resource accessedResource)
AccessControlContext
getResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedaccessedResource
- the resource on which the privileges were grantedpublic Set<ResourcePermission> getEffectiveResourcePermissions(Resource accessorResource, Resource accessedResource)
AccessControlContext
getEffectiveResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedaccessedResource
- the resource on which the privileges were grantedpublic void setGlobalResourcePermissions(Resource accessorResource, String resourceClassName, String domainName, Set<ResourcePermission> resourcePermissions)
AccessControlContext
setGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource to which the privilege should be grantedresourceClassName
- a string resource class namedomainName
- a string domain nameresourcePermissions
- the set of resource permissions to be granted globally to
the specified resource class and domainpublic void setGlobalResourcePermissions(Resource accessorResource, String resourceClassName, Set<ResourcePermission> resourcePermissions)
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 domainpublic Set<ResourcePermission> getGlobalResourcePermissions(Resource accessorResource, String resourceClassName, String domainName)
AccessControlContext
getGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedresourceClassName
- a string resource class namedomainName
- a string domain namepublic Set<ResourcePermission> getGlobalResourcePermissions(Resource accessorResource, String resourceClassName)
AccessControlContext
getGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedresourceClassName
- a string resource class namepublic Set<ResourcePermission> getEffectiveGlobalResourcePermissions(Resource accessorResource, String resourceClassName, String domainName)
AccessControlContext
getEffectiveGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedresourceClassName
- a string resource class namedomainName
- a string domain namepublic Set<ResourcePermission> getEffectiveGlobalResourcePermissions(Resource accessorResource, String resourceClassName)
AccessControlContext
getEffectiveGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedresourceClassName
- a string resource class namepublic Map<String,Map<String,Set<ResourcePermission>>> getGlobalResourcePermissionsMap(Resource accessorResource)
AccessControlContext
getGlobalResourcePermissionsMap
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedpublic Map<String,Map<String,Set<ResourcePermission>>> getEffectiveGlobalResourcePermissionsMap(Resource accessorResource)
AccessControlContext
getEffectiveGlobalResourcePermissionsMap
in interface AccessControlContext
accessorResource
- the resource relative to which the permissions should be returnedpublic String getDomainNameByResource(Resource resource)
AccessControlContext
getDomainNameByResource
in interface AccessControlContext
resource
- the resource for which to retrieve the domain namepublic Set<String> getDomainDescendants(String domainName)
AccessControlContext
getDomainDescendants
in interface AccessControlContext
domainName
- a domain name for which to retrieve the descendantspublic ResourceClassInfo getResourceClassInfo(String resourceClassName)
AccessControlContext
getResourceClassInfo
in interface AccessControlContext
resourceClassName
- a string resource class name about which to retrieve informationpublic ResourceClassInfo getResourceClassInfoByResource(Resource resource)
AccessControlContext
getResourceClassInfoByResource
in interface AccessControlContext
resource
- a resource about whose resource class to retrieve informationpublic Resource getAuthenticatedResource()
AccessControlContext
getAuthenticatedResource
in interface AccessControlContext
public Resource getSessionResource()
AccessControlContext
impersonated
.getSessionResource
in interface AccessControlContext
public void assertPostCreateDomainPermissions(Resource accessorResource, DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
assertPostCreateDomainPermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessdomainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic void assertPostCreateDomainPermissions(DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
assertPostCreateDomainPermissions
in interface AccessControlContext
domainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic boolean hasPostCreateDomainPermissions(Resource accessorResource, DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
hasPostCreateDomainPermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessdomainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic boolean hasPostCreateDomainPermissions(DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
hasPostCreateDomainPermissions
in interface AccessControlContext
domainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic void assertDomainPermissions(Resource accessorResource, String domainName, DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
assertDomainPermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkeddomainName
- the domain for which the permission should be checkeddomainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic void assertDomainPermissions(String domainName, DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
assertDomainPermissions
in interface AccessControlContext
domainName
- the domain for which the permission should be checkeddomainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic boolean hasDomainPermissions(Resource accessorResource, String domainName, DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
hasDomainPermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkeddomainName
- the domain for which the permission should be checkeddomainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic boolean hasDomainPermissions(String domainName, DomainPermission domainPermission, DomainPermission... domainPermissions)
AccessControlContext
hasDomainPermissions
in interface AccessControlContext
domainName
- the domain for which the permission should be checkeddomainPermission
- the permission to be checkeddomainPermissions
- the other (optional) permissions to be checkedpublic void assertDomainCreatePermissions(Resource accessorResource, DomainCreatePermission domainCreatePermission, DomainCreatePermission... domainCreatePermissions)
AccessControlContext
assertDomainCreatePermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkeddomainCreatePermission
- the domain create permission to be checkeddomainCreatePermissions
- the other (optional) domain create permissions to be checkedpublic void assertDomainCreatePermissions(DomainCreatePermission domainCreatePermission, DomainCreatePermission... domainCreatePermissions)
AccessControlContext
assertDomainCreatePermissions
in interface AccessControlContext
domainCreatePermission
- the domain create permission to be checkeddomainCreatePermissions
- the other (optional) domain create permissions to be checkedpublic boolean hasDomainCreatePermissions(Resource accessorResource, DomainCreatePermission domainCreatePermission, DomainCreatePermission... domainCreatePermissions)
AccessControlContext
hasDomainCreatePermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkeddomainCreatePermission
- the domain create permission to be checkeddomainCreatePermissions
- the other (optional) domain create permissions to be checkedpublic boolean hasDomainCreatePermissions(DomainCreatePermission domainCreatePermission, DomainCreatePermission... domainCreatePermissions)
AccessControlContext
hasDomainCreatePermissions
in interface AccessControlContext
domainCreatePermission
- the domain create permission to be checkeddomainCreatePermissions
- the other (optional) domain create permissions to be checkedpublic void assertPostCreateResourcePermissions(Resource accessorResource, String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertPostCreateResourcePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertPostCreateResourcePermissions(String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertPostCreateResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertPostCreateResourcePermissions(Resource accessorResource, String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertPostCreateResourcePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertPostCreateResourcePermissions(String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertPostCreateResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasPostCreateResourcePermissions(Resource accessorResource, String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasPostCreateResourcePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasPostCreateResourcePermissions(String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasPostCreateResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasPostCreateResourcePermissions(Resource accessorResource, String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasPostCreateResourcePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasPostCreateResourcePermissions(String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasPostCreateResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertGlobalResourcePermissions(Resource accessorResource, String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkedresourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertGlobalResourcePermissions(String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertGlobalResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertGlobalResourcePermissions(Resource accessorResource, String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkedresourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertGlobalResourcePermissions(String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertGlobalResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasGlobalResourcePermissions(Resource accessorResource, String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkedresourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasGlobalResourcePermissions(String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasGlobalResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasGlobalResourcePermissions(Resource accessorResource, String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasGlobalResourcePermissions
in interface AccessControlContext
accessorResource
- the resource on which access is being checkedresourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasGlobalResourcePermissions(String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasGlobalResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertResourcePermissions(Resource accessorResource, Resource accessedResource, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertResourcePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessaccessedResource
- the resource on which access is being requestedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertResourcePermissions(Resource accessedResource, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
assertResourcePermissions
in interface AccessControlContext
accessedResource
- the resource on which access is being requestedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasResourcePermissions(Resource accessorResource, Resource accessedResource, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasResourcePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessaccessedResource
- the resource on which access is being requestedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic boolean hasResourcePermissions(Resource accessedResource, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
hasResourcePermissions
in interface AccessControlContext
accessedResource
- the resource on which access is being requestedresourcePermission
- the permission to be checkedresourcePermissions
- the other (optional) permissions to be checkedpublic void assertResourceCreatePermissions(Resource accessorResource, String resourceClassName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
assertResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class nameresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic void assertResourceCreatePermissions(String resourceClassName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
assertResourceCreatePermissions
in interface AccessControlContext
resourceClassName
- a string resource class nameresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic void assertResourceCreatePermissions(Resource accessorResource, String resourceClassName, String domainName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
assertResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic void assertResourceCreatePermissions(String resourceClassName, String domainName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
assertResourceCreatePermissions
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic boolean hasResourceCreatePermissions(Resource accessorResource, String resourceClassName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
hasResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class nameresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic boolean hasResourceCreatePermissions(String resourceClassName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
hasResourceCreatePermissions
in interface AccessControlContext
resourceClassName
- a string resource class nameresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic boolean hasResourceCreatePermissions(Resource accessorResource, String resourceClassName, String domainName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
hasResourceCreatePermissions
in interface AccessControlContext
accessorResource
- the resource requesting the accessresourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic boolean hasResourceCreatePermissions(String resourceClassName, String domainName, ResourceCreatePermission resourceCreatePermission, ResourceCreatePermission... resourceCreatePermissions)
AccessControlContext
hasResourceCreatePermissions
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- the domain in which the permissions should be checkedresourceCreatePermission
- the create permissions to be checkedresourceCreatePermissions
- the other (optional) create permissions to be checkedpublic Set<Resource> getResourcesByResourcePermissions(String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
getResourcesByResourcePermissions
in interface AccessControlContext
resourceClassName
- a string resource class nameresourcePermission
- the permission to checkresourcePermissions
- the permissions to checkpublic Set<Resource> getResourcesByResourcePermissions(Resource accessorResource, String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
getResourcesByResourcePermissions
in interface AccessControlContext
accessorResource
- the resource relative to which the set of accessible resources is computedresourceClassName
- a string resource class nameresourcePermission
- the permission to checkresourcePermissions
- the permissions to checkpublic Set<Resource> getResourcesByResourcePermissionsAndDomain(String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
getResourcesByResourcePermissionsAndDomain
in interface AccessControlContext
resourceClassName
- a string resource class namedomainName
- a domain nameresourcePermission
- the permission to checkresourcePermissions
- the permissions to checkpublic Set<Resource> getResourcesByResourcePermissionsAndDomain(Resource accessorResource, String resourceClassName, String domainName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
getResourcesByResourcePermissionsAndDomain
in interface AccessControlContext
accessorResource
- the resource relative to which the set of accessible resources is computedresourceClassName
- a string resource class namedomainName
- a domain nameresourcePermission
- the permission to checkresourcePermissions
- the permissions to checkpublic Set<Resource> getAccessorResourcesByResourcePermissions(Resource accessedResource, String resourceClassName, ResourcePermission resourcePermission, ResourcePermission... resourcePermissions)
AccessControlContext
AccessControlContext.getResourcesByResourcePermissions(java.lang.String, com.acciente.oacc.ResourcePermission, com.acciente.oacc.ResourcePermission...)
method, but
unlike getResourcesByResourcePermissions
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.getAccessorResourcesByResourcePermissions
in interface AccessControlContext
accessedResource
- the resource relative to which accessor resources are soughtresourceClassName
- a string resource class nameresourcePermission
- the permission to checkresourcePermissions
- the other (optional) permissions to checkpublic List<String> getResourceClassNames()
AccessControlContext
getResourceClassNames
in interface AccessControlContext
public List<String> getResourcePermissionNames(String resourceClassName)
AccessControlContext
getResourcePermissionNames
in interface AccessControlContext
resourceClassName
- the resource class name for which the permissions should be retrieved@SafeVarargs protected static <T> Set<T> getSetWithoutNulls(T firstElement, T... elements)
OACC is a Java Application Security Framework developed by Acciente, LLC..
Copyright 2015, Acciente, LLC.All rights reserved.