java.security
public
abstract
class
java.security.Policy
Abstract superclass of classes which represent the system security policy.
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
Public Methods
Returns a PermissionCollection describing what permissions are available
to the given CodeSource based on the current security policy.
Note that this method is not called for classes which are in
the system domain (i.e. system classes). System classes are
always given full permissions (i.e. AllPermission). This can
not be changed by installing a new Policy.
Parameters
cs
| CodeSource the code source to compute the permissions for. |
Returns
- PermissionCollection the permissions the code source should have.
Returns a PermissionCollection describing what permissions are available
to the given ProtectionDomain (more specifically, its CodeSource) based
on the current security policy.
Parameters
domain
| ProtectionDomain the protection domain to compute the
permissions for. |
Returns
- PermissionCollection the permissions the code source should have.
public
static
Policy
getPolicy()
Returns the current system security policy. If no policy has been
instantiated then this is done using the security property
policy.provider
Returns
- Policy the current system security policy.
Returns whether the Permission is implied by the PermissionCollection of
the Protection Domain
Parameters
domain
| ProtectionDomain for which Permission to be checked |
permission
| Permission for which authorization is to be verified |
Returns
- boolean Permission implied by ProtectionDomain
public
abstract
void
refresh()
Reloads the policy configuration, depending on how the type of source
location for the policy information.
public
static
void
setPolicy(Policy policy)
Sets the system-wide policy object if it is permitted by the security
manager.
Parameters
policy
| Policy the policy object that needs to be set.
|