Interface ScriptEngineManager
@NonNullByDefault
public interface ScriptEngineManager
The ScriptEngineManager provides the ability to load and unload scripts.
- Author:
- Simon Merschjohann - Initial contribution, Scott Rushworth - changed parameter names when implementing ScriptModuleTypeProvider
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a listener that is notified when a ScriptEngineFactory is added or removed@Nullable ScriptEngineContainercreateScriptEngine(String scriptType, String engineIdentifier) Creates a new ScriptEngine used to execute scripts, ScriptActions or ScriptConditionsbooleanisSupported(String scriptType) Checks if the supplied file extension or MimeType is supported by the existing ScriptEngineFactoriesbooleanloadScript(String engineIdentifier, InputStreamReader scriptData) Loads a script and initializes its scope variablesvoidremoveEngine(String engineIdentifier) Unloads the ScriptEngine loaded with the engineIdentifiervoidRemove a listener that is notified when a ScriptEngineFactory is added or removed
- 
Method Details- 
createScriptEngineCreates a new ScriptEngine used to execute scripts, ScriptActions or ScriptConditions- Parameters:
- scriptType- a file extension (script) or MimeType (ScriptAction or ScriptCondition)
- engineIdentifier- the unique identifier for the ScriptEngine (script file path or UUID)
- Returns:
- ScriptEngineContainer or null
 
- 
loadScriptLoads a script and initializes its scope variables- Parameters:
- engineIdentifier- the unique identifier for the ScriptEngine (script file path or UUID)
- scriptData- the content of the script
- Returns:
- trueif the script was successfully loaded,- falseotherwise
 
- 
removeEngineUnloads the ScriptEngine loaded with the engineIdentifier- Parameters:
- engineIdentifier- the unique identifier for the ScriptEngine (script file path or UUID)
 
- 
isSupportedChecks if the supplied file extension or MimeType is supported by the existing ScriptEngineFactories- Parameters:
- scriptType- a file extension (script) or MimeType (ScriptAction or ScriptCondition)
- Returns:
- true, if supported, else false
 
- 
addFactoryChangeListenerAdd a listener that is notified when a ScriptEngineFactory is added or removed- Parameters:
- listener- an object that implements- ScriptEngineManager.FactoryChangeListener
 
- 
removeFactoryChangeListenerRemove a listener that is notified when a ScriptEngineFactory is added or removed- Parameters:
- listener- an object that implements- ScriptEngineManager.FactoryChangeListener
 
 
-