com.sun.enterprise.security.jacc.provider
Class SimplePolicyProvider
java.lang.Object
java.security.Policy
com.sun.enterprise.security.jacc.provider.SimplePolicyProvider
public class SimplePolicyProvider
- extends java.security.Policy
- Author:
- monzillo
| Nested classes/interfaces inherited from class java.security.Policy |
java.security.Policy.Parameters |
| Fields inherited from class java.security.Policy |
UNSUPPORTED_EMPTY_COLLECTION |
|
Constructor Summary |
SimplePolicyProvider()
Create a new instance of SimplePolicyProvider
delegates to existing policy provider unless one
is not defined, in which case it trys to load
default sun provider |
|
Method Summary |
java.security.PermissionCollection |
getPermissions(java.security.CodeSource codesource)
Evaluates the global policy and returns a
PermissionCollection object specifying the set of
permissions allowed for code from the specified
code source. |
java.security.PermissionCollection |
getPermissions(java.security.ProtectionDomain domain)
Evaluates the global policy and returns a
PermissionCollection object specifying the set of
permissions allowed given the characteristics of the
protection domain. |
boolean |
implies(java.security.ProtectionDomain domain,
java.security.Permission permission)
Evaluates the global policy for the permissions granted to
the ProtectionDomain and tests whether the permission is
granted. |
void |
refresh()
Refreshes/reloads the policy configuration. |
| Methods inherited from class java.security.Policy |
getInstance, getInstance, getInstance, getParameters, getPolicy, getProvider, getType, setPolicy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimplePolicyProvider
public SimplePolicyProvider()
- Create a new instance of SimplePolicyProvider
delegates to existing policy provider unless one
is not defined, in which case it trys to load
default sun provider
getPermissions
public java.security.PermissionCollection getPermissions(java.security.CodeSource codesource)
- Evaluates the global policy and returns a
PermissionCollection object specifying the set of
permissions allowed for code from the specified
code source.
- Overrides:
getPermissions in class java.security.Policy
- Parameters:
codesource - the CodeSource associated with the caller.
This encapsulates the original location of the code (where the code
came from) and the public key(s) of its signer.
- Returns:
- the set of permissions allowed for code from codesource
according to the policy.The returned set of permissions must be
a new mutable instance and it must support heterogeneous
Permission types.
getPermissions
public java.security.PermissionCollection getPermissions(java.security.ProtectionDomain domain)
- Evaluates the global policy and returns a
PermissionCollection object specifying the set of
permissions allowed given the characteristics of the
protection domain.
- Overrides:
getPermissions in class java.security.Policy
- Parameters:
domain - the ProtectionDomain associated with the caller.
- Returns:
- the set of permissions allowed for the domain
according to the policy.The returned set of permissions must be
a new mutable instance and it must support heterogeneous
Permission types.
- Since:
- 1.4
- See Also:
ProtectionDomain,
SecureClassLoader
implies
public boolean implies(java.security.ProtectionDomain domain,
java.security.Permission permission)
- Evaluates the global policy for the permissions granted to
the ProtectionDomain and tests whether the permission is
granted.
- Overrides:
implies in class java.security.Policy
- Parameters:
domain - the ProtectionDomain to testpermission - the Permission object to be tested for implication.
- Returns:
- true if "permission" is a proper subset of a permission
granted to this ProtectionDomain.
- Since:
- 1.4
- See Also:
ProtectionDomain
refresh
public void refresh()
- Refreshes/reloads the policy configuration. The behavior of this method
depends on the implementation. For example, calling
refresh
on a file-based policy will cause the file to be re-read.
- Overrides:
refresh in class java.security.Policy
Copyright © 2012 GlassFish Community. All Rights Reserved.