public interface AccessControlContext
This API does not specify the names used to identify permissions, the policy behind the API should use the standard names in JSR specifications to identify permissions. Manufacturer API names should be specified in the documentation for that API so the policy maker can accomidate them.
Modifier and Type | Method and Description |
---|---|
void |
checkPermission(String name)
Determines whether the access request indicated by the
specified permission should be allowed or denied, based on
the security policy currently in effect.
|
void |
checkPermission(String name,
String resource)
Check for permission and throw an exception if not allowed.
|
void |
checkPermission(String name,
String resource,
String extraValue)
Checks for permission and throw an exception if not allowed.
|
void checkPermission(String name) throws SecurityException
If the permission check failed because an InterruptedException was thrown, this method will throw a InterruptedSecurityException.
name
- name of the requested permissionSecurityException
- if the specified permission
is not permitted, based on the current security policyvoid checkPermission(String name, String resource) throws SecurityException
If the permission check failed because an InterruptedException was thrown, this method will throw a InterruptedSecurityException.
name
- name of the requested permissionresource
- string to insert into the question, can be null if
no %2 in the questionname
- name of the requested permissionSecurityException
- if the specified permission
is not permitted, based on the current security policyvoid checkPermission(String name, String resource, String extraValue) throws SecurityException
If the permission check failed because an InterruptedException was thrown, this method will throw a InterruptedSecurityException.
permission
- ID of the permission to check for,
the ID must be from
com.sun.midp.security.Permissions
resource
- string to insert into the question, can be null if
no %2 in the questionextraValue
- string to insert into the question,
can be null if no %3 in the questionname
- name of the requested permissionSecurityException
- if the specified permission
is not permitted, based on the current security policy