java.lang.Object
com.untrusted.script.UntrustedScriptHandler
- All Implemented Interfaces:
- org.apache.batik.script.ScriptHandler
- public class UntrustedScriptHandler
- extends java.lang.Object
- implements org.apache.batik.script.ScriptHandler
This class implements the ScriptHandler interface and represents an
example of untrusted code.
It creates a number of Java Permissions and checks that access is denied.
the tests fail if the Permissions are granted.
The only thing that the class should be allowed to make is a connection
back to the server that served the document containing this script.
- Version:
- $Id: UntrustedScriptHandler.java,v 1.4 2005/03/27 08:58:29 cam Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
svgNS
public static final java.lang.String svgNS
- See Also:
- Constant Field Values
testedPath
public static final java.lang.String testedPath
- Path for the file tested with FilePermission
- See Also:
- Constant Field Values
testedHost
public static final java.lang.String testedHost
- Host which is used for testing
- See Also:
- Constant Field Values
basePermissions
protected static java.lang.Object[][] basePermissions
- Table of Permissions which will be tested.
permissions
private java.lang.Object[][] permissions
- Set of Permissions to test. One is added if the Document is loaded from a host
statusRects
private org.w3c.dom.Element[] statusRects
- Reference to the rectangles which show the test status
UntrustedScriptHandler
public UntrustedScriptHandler()
run
public void run(org.w3c.dom.Document doc,
org.apache.batik.script.Window win)
- Runs this handler. This method is called by the SVG viewer
when the scripts are loaded.
- Specified by:
run in interface org.apache.batik.script.ScriptHandler