| java.lang.Object org.apache.batik.bridge.DefaultScriptSecurity
DefaultScriptSecurity | public class DefaultScriptSecurity implements ScriptSecurity(Code) | | Default implementation for the ScriptSecurity interface.
It allows all types of scripts to be loaded, but only if they
come from the same server as the document they are included into.
author: Vincent Hardy version: $Id: DefaultScriptSecurity.java 475477 2006-11-15 22:44:28Z cam $ |
Constructor Summary | |
public | DefaultScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL) Parameters: scriptType - type of script, as found in the type attribute of the <script> element. Parameters: scriptURL - url for the script, as defined inthe script's xlink:href attribute. |
Method Summary | |
public void | checkLoadScript() Controls whether the script should be loaded or not. |
ERROR_CANNOT_ACCESS_DOCUMENT_URL | final public static String ERROR_CANNOT_ACCESS_DOCUMENT_URL(Code) | | Message when trying to load a script file and the Document
does not have a URL
|
ERROR_SCRIPT_FROM_DIFFERENT_URL | final public static String ERROR_SCRIPT_FROM_DIFFERENT_URL(Code) | | Message when trying to load a script file from a server
different than the one of the document.
|
se | protected SecurityException se(Code) | | The exception is built in the constructor and thrown if
not null and the checkLoadScript method is called.
|
DefaultScriptSecurity | public DefaultScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL)(Code) | | Parameters: scriptType - type of script, as found in the type attribute of the <script> element. Parameters: scriptURL - url for the script, as defined inthe script's xlink:href attribute. If thatattribute was empty, then this parameter shouldbe null Parameters: docURL - url for the document into which the script was found. |
checkLoadScript | public void checkLoadScript()(Code) | | Controls whether the script should be loaded or not.
throws: SecurityException - if the script should not be loaded. |
|
|