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 Policy
Wrapper to the JPolicy class. This is used to instantiate
the real Policy object by using Thread classloader.
- Author:
- Florent Benoit
|
Method Summary |
PermissionCollection |
getPermissions(CodeSource codesource)
Evaluates the global policy and returns a PermissionCollection object
specifying the set of permissions allowed given the characteristics
of the protection domain. |
PermissionCollection |
getPermissions(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(ProtectionDomain domain,
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.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 Policy
getPermissions
public PermissionCollection getPermissions(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 Policy
- Parameters:
codesource - the given codesource on which retrieve permissions
- Returns:
- permissions
getPermissions
public PermissionCollection getPermissions(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 Policy
- Parameters:
domain - the given domain on which retrieve permissions
- Returns:
- permissions
implies
public boolean implies(ProtectionDomain domain,
Permission permission)
- Evaluates the global policy for the permissions granted
to the ProtectionDomain and tests whether the permission is granted.
- Overrides:
implies in class 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.