org.ow2.jonas.lib.security.jacc
Class JPolicyWrapper
java.lang.Object
java.security.Policy
org.ow2.jonas.lib.security.jacc.JPolicyWrapper
public class JPolicyWrapper
- extends java.security.Policy
Wrapper to the JPolicy class. This is used to instantiate
the real Policy object by using Thread classloader.
- Author:
- Florent Benoit
| Nested classes/interfaces inherited from class java.security.Policy |
java.security.Policy.Parameters |
| Fields inherited from class java.security.Policy |
UNSUPPORTED_EMPTY_COLLECTION |
|
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 given the characteristics
of the protection domain. |
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 |
JPolicyWrapper
public JPolicyWrapper()
- Default constructor
refresh
public void refresh()
- Refreshes/reloads the policy configuration.
- Overrides:
refresh in class java.security.Policy
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 given the characteristics
of the protection domain.
- Overrides:
getPermissions in class java.security.Policy
- Parameters:
codesource - the given codesource on which retrieve permissions
- Returns:
- permissions
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 given domain on which retrieve permissions
- Returns:
- permissions
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 test.permission - the Permission object to be tested for implication.
- Returns:
- true if "permission" is a proper subset of a permission
granted to this ProtectionDomain.
Copyright © 2012 OW2 Consortium. All Rights Reserved.