Package org.apache.batik.bridge
Class NoLoadScriptSecurity
java.lang.Object
org.apache.batik.bridge.NoLoadScriptSecurity
- All Implemented Interfaces:
ScriptSecurity
This implementation for the
ScriptSecurity
interface
does not allow scripts to be loaded.- Version:
- $Id: NoLoadScriptSecurity.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Message when trying to load a script file and the Document does not have a URLprotected SecurityException
The exception is built in the constructor and thrown if the checkLoadScript method is called. -
Constructor Summary
ConstructorsConstructorDescriptionNoLoadScriptSecurity
(String scriptType) Creates a new NoLoadScriptSecurity object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Controls whether the script should be loaded or not.
-
Field Details
-
ERROR_NO_SCRIPT_OF_TYPE_ALLOWED
Message when trying to load a script file and the Document does not have a URL- See Also:
-
se
The exception is built in the constructor and thrown if the checkLoadScript method is called.
-
-
Constructor Details
-
NoLoadScriptSecurity
Creates a new NoLoadScriptSecurity object.- Parameters:
scriptType
- type of script, as found in the type attribute of the <script> element.
-
-
Method Details
-
checkLoadScript
public void checkLoadScript()Controls whether the script should be loaded or not.- Specified by:
checkLoadScript
in interfaceScriptSecurity
- Throws:
SecurityException
- if the script should not be loaded.
-