org.codehaus.spice.xmlpolicy.runtime
Class DefaultPolicy
java.lang.Object
|
+--java.security.Policy
|
+--org.codehaus.spice.xmlpolicy.runtime.AbstractPolicy
|
+--org.codehaus.spice.xmlpolicy.runtime.DefaultPolicy
- public class DefaultPolicy
- extends AbstractPolicy
A policy implementation that accepts policys details from a map.
The map is between a codebase and a array of permissions.
Note that it was a deliberate decision to limit the time at which you can
specify policy data for security reasons.
- Author:
- Peter Donald
Method Summary |
protected void |
processGrants(Map grants)
Process map of grants and configure Policy appropriately. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPolicy
public DefaultPolicy(Map grants)
throws Exception
- Create a Policy that applies specified grants.
Each entry in map maps a CodeSource to an array
of Permissions.
- Parameters:
grants
- the grant map
- Throws:
Exception
- if unable to construct Policy
DefaultPolicy
public DefaultPolicy()
- Create a policy with zero entrys.
Sub-classes usually use this constructor then
invoke processGrants separately.
processGrants
protected final void processGrants(Map grants)
throws Exception
- Process map of grants and configure Policy appropriately.
- Parameters:
grants
- the grants map
- Throws:
Exception
- if unable to perform configuration
Copyright © 2002-2003 Codehaus. All Rights Reserved.