| java.lang.Object java.lang.Runtime pnuts.lang.PnutsImpl pnuts.ext.ImplementationAdapter pnuts.security.SecurePnutsImpl
All known Subclasses: pnuts.security.JAASPnutsImpl,
SecurePnutsImpl | public class SecurePnutsImpl extends ImplementationAdapter (Code) | | A PnutsImpl subclass that execute scripts in an access control context in
Java2 Security.
e.g.
context.setImplementation(new SecurePnutsImpl(new CompilerPnutsImpl(), codesource))
|
SecurePnutsImpl | public SecurePnutsImpl(PnutsImpl impl)(Code) | | A Constructor
Parameters: impl - a PnutsImpl object |
SecurePnutsImpl | public SecurePnutsImpl(Implementation impl)(Code) | | A Constructor
Parameters: impl - a PnutsImpl object |
SecurePnutsImpl | public SecurePnutsImpl(PnutsImpl impl, CodeSource codeSource)(Code) | | A Constructor
Parameters: impl - the base implementation Parameters: codeSource - a CodeSource object which indicates the source of the expressionexecute by eval(String, Context). |
SecurePnutsImpl | public SecurePnutsImpl(Implementation impl, CodeSource codeSource)(Code) | | A Constructor
Parameters: impl - the base implementation Parameters: codeSource - a CodeSource object which indicates the source of the expressionexecute by eval(String, Context). |
accept | public Object accept(SimpleNode node, Context context)(Code) | | Evaluate a parsed script
Parameters: node - the parsed script Parameters: context - the context in which the script is evaluated the result of the evaluation |
addSandBoxPermissions | protected void addSandBoxPermissions(URL codebase, PermissionCollection perms)(Code) | | Add Applet sand-box permissions to the specified PermissionCollection.
Parameters: codebase - the codebase of the script Parameters: perms - the base PermissionCollection |
eval | public Object eval(String expr, Context context)(Code) | | Evaluate an expreesion
Parameters: expr - the expression to be evaluated Parameters: context - the context in which the expression is evaluated the result of the evaluation |
getPermissions | protected PermissionCollection getPermissions(CodeSource codesource)(Code) | | Returns permissions from policy file, plus Applet's sand-box permissions.
A subclass may override this method to define a custom security policy.
Parameters: codesource - the CodeSource of the script the PermissionCollection for the script |
getPolicyPermissions | protected PermissionCollection getPolicyPermissions(CodeSource codesource)(Code) | | Gets permission declared in the policy file
Parameters: codesource - the CodeSource of the script the permissions for the script |
load | public Object load(String file, Context context) throws FileNotFoundException(Code) | | Load a script file using classloader
Parameters: file - the name of the script Parameters: context - the context in which the script is executed the result of the evaluation |
load | public Object load(URL scriptURL, Context context)(Code) | | Load a script file from a URL
Parameters: scriptURL - the URL of the script Parameters: context - the context in which the script is executed |
loadFile | public Object loadFile(String filename, Context context) throws FileNotFoundException(Code) | | Load a script file from local file system
Parameters: filename - the file name of the script Parameters: context - the context in which the expression is evaluated the result of the evaluation |
Methods inherited from pnuts.lang.PnutsImpl | public Object accept(SimpleNode node, Context context)(Code)(Java Doc) protected Object acceptNode(SimpleNode node, Context context)(Code)(Java Doc) public Object eval(String expr, Context context)(Code)(Java Doc) public static PnutsImpl getDefault()(Code)(Java Doc) public Object load(String file, Context context) throws FileNotFoundException(Code)(Java Doc) public Object load(URL scriptURL, Context context)(Code)(Java Doc) public Object loadFile(String filename, Context context) throws FileNotFoundException(Code)(Java Doc) protected void popFile(Context context)(Code)(Java Doc) protected void provide(String file, Context context)(Code)(Java Doc) protected void pushFile(Object file, Context context)(Code)(Java Doc) public String queryProperty(String key)(Code)(Java Doc) protected void revoke(String file, Context context)(Code)(Java Doc) public void setProperties(Properties properties)(Code)(Java Doc) public void setProperty(String key, String value)(Code)(Java Doc)
|
|
|