Class SimplePolicyProvider
- java.lang.Object
-
- java.security.Policy
-
- com.sun.enterprise.security.jacc.provider.SimplePolicyProvider
-
public class SimplePolicyProvider extends Policy
- Author:
- monzillo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.security.Policy
Policy.Parameters
-
-
Field Summary
-
Fields inherited from class java.security.Policy
UNSUPPORTED_EMPTY_COLLECTION
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissionCollectiongetPermissions(CodeSource codesource)Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.PermissionCollectiongetPermissions(ProtectionDomain domain)Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed given the characteristics of the protection domain.booleanimplies(ProtectionDomain domain, Permission permission)Evaluates the global policy for the permissions granted to the ProtectionDomain and tests whether the permission is granted.voidrefresh()Refreshes/reloads the policy configuration.-
Methods inherited from class java.security.Policy
getInstance, getInstance, getInstance, getParameters, getPolicy, getProvider, getType, setPolicy
-
-
-
-
Method Detail
-
getPermissions
public PermissionCollection getPermissions(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:
getPermissionsin classPolicy- 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 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:
getPermissionsin classPolicy- 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(ProtectionDomain domain, Permission permission)
Evaluates the global policy for the permissions granted to the ProtectionDomain and tests whether the permission is granted.- Overrides:
impliesin classPolicy- 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
-
-