| |
|
| java.lang.Object java.security.Policy org.ow2.easybeans.security.jacc.provider.JPolicy
JPolicy | final public class JPolicy extends Policy (Code) | | Defines the "delegating Policy provider" / JACC 2.5 In J2SE 1.4 new methods
can be used for dynamic permissions implies() and getPermissions() methods on
Policy class were added. A replacement Policy object may accomplish this by
delegating non-javax.security.jacc policy decisions to the corresponding
default system Policy implementation class. A replacement Policy object that
relies in this way on the corresponding default Policy implementation class
must identify itself in its installation instructions as a "delegating Policy
provider"
EasyBeans uses delegating model
author: Florent Benoit |
Method Summary | |
public static JPolicy | getInstance() Gets the unique instance of the JACC delegating policy provider. | 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.
Parameters: domain - the ProtectionDomain associated with the caller. | 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.
Parameters: codeSource - the CodeSource associated with the caller. | 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.
Parameters: domain - the ProtectionDomain to test. Parameters: permission - the Permission object to be tested for implication. | public void | refresh() Refreshes/reloads the policy configuration. |
getInstance | public static JPolicy getInstance()(Code) | | Gets the unique instance of the JACC delegating policy provider.
unique instance of the JACC delegating policy provider |
getPermissions | public PermissionCollection getPermissions(ProtectionDomain domain)(Code) | | Evaluates the global policy and returns a PermissionCollection object
specifying the set of permissions allowed given the characteristics of
the protection domain.
Parameters: domain - the ProtectionDomain associated with the caller. the set of permissions allowed for the domain according to thepolicy.The returned set of permissions must be a new mutableinstance and it must support heterogeneous Permission types. |
getPermissions | public PermissionCollection getPermissions(CodeSource codeSource)(Code) | | Evaluates the global policy and returns a PermissionCollection object
specifying the set of permissions allowed for code from the specified
code source.
Parameters: codeSource - the CodeSource associated with the caller. Thisencapsulates the original location of the code (where the codecame from) and the public key(s) of its signer. the set of permissions allowed for code from codesource accordingto the policy.The returned set of permissions must be a newmutable instance and it must support heterogeneous Permissiontypes. |
implies | public boolean implies(ProtectionDomain domain, Permission permission)(Code) | | Evaluates the global policy for the permissions granted to the
ProtectionDomain and tests whether the permission is granted.
Parameters: domain - the ProtectionDomain to test. Parameters: permission - the Permission object to be tested for implication. true if "permission" is a proper subset of a permission grantedto this ProtectionDomain. |
refresh | public void refresh()(Code) | | Refreshes/reloads the policy configuration.
|
|
|
|