Class AbstractScriptEngineFactory
java.lang.Object
org.openhab.core.automation.module.script.AbstractScriptEngineFactory
- All Implemented Interfaces:
ScriptEngineFactory
@NonNullByDefault
public abstract class AbstractScriptEngineFactory
extends Object
implements ScriptEngineFactory
This is an abstract class for implementing
ScriptEngineFactory
s.- Author:
- Scott Rushworth - Initial contribution
-
Field Summary
Fields inherited from interface org.openhab.core.automation.module.script.ScriptEngineFactory
CONTEXT_KEY_DEPENDENCY_LISTENER, CONTEXT_KEY_ENGINE_IDENTIFIER, CONTEXT_KEY_EXTENSION_ACCESSOR, ENGINE_MANAGER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable ScriptEngine
createScriptEngine
(String scriptType) This method creates a new ScriptEngine based on the supplied file extension or MimeType.This method returns a list of file extensions and MimeTypes that are supported by the ScriptEngine, e.g.void
scopeValues
(ScriptEngine scriptEngine, Map<String, Object> scopeValues) This method "scopes" new values into the given ScriptEngine.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openhab.core.automation.module.script.ScriptEngineFactory
getDependencyTracker
-
Field Details
-
logger
protected final org.slf4j.Logger logger
-
-
Constructor Details
-
AbstractScriptEngineFactory
public AbstractScriptEngineFactory()
-
-
Method Details
-
getScriptTypes
Description copied from interface:ScriptEngineFactory
This method returns a list of file extensions and MimeTypes that are supported by the ScriptEngine, e.g. py, application/python, js, application/javascript, etc.- Specified by:
getScriptTypes
in interfaceScriptEngineFactory
- Returns:
- List of supported script types
-
scopeValues
Description copied from interface:ScriptEngineFactory
This method "scopes" new values into the given ScriptEngine.- Specified by:
scopeValues
in interfaceScriptEngineFactory
- Parameters:
scriptEngine
-scopeValues
-
-
createScriptEngine
Description copied from interface:ScriptEngineFactory
This method creates a new ScriptEngine based on the supplied file extension or MimeType.- Specified by:
createScriptEngine
in interfaceScriptEngineFactory
- Parameters:
scriptType
- a file extension (script) or MimeType (ScriptAction or ScriptCondition)- Returns:
- ScriptEngine or null
-