public abstract class AbstractScriptSpec extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ScriptEngineType |
engineType |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScriptSpec(ScriptEngineType engineType) |
| Modifier and Type | Method and Description |
|---|---|
abstract CompiledScript |
compile(Compilable compiler)
Compiles the script for later execution.
|
static AbstractScriptSpec |
create(ApplicationImpl application,
DocumentWorkerScript script)
Constructs the appropriate implementation for the specified script data.
|
ScriptEngineType |
getEngineType()
Returns the JavaScript engine to use for the script represented by this specification.
|
abstract String |
getScript()
Returns the script represented by this specification.
|
abstract boolean |
isStatic()
Returns whether the script specification represents a script that is static (i.e.
|
protected abstract void |
setScriptSpecField(DocumentWorkerScript script)
Updates the relevant field in the specified script.
|
DocumentWorkerScript |
toDocumentWorkerScript(String name)
Creates a new
DocumentWorkerScript for the script specification. |
protected final ScriptEngineType engineType
protected AbstractScriptSpec(ScriptEngineType engineType)
public static AbstractScriptSpec create(ApplicationImpl application, DocumentWorkerScript script) throws InvalidScriptException
application - the global data for the workerscript - the object that contains the script datanull if the script data object is not initializedInvalidScriptException - if the specified script data is invalid is some way@Nonnull public abstract CompiledScript compile(Compilable compiler) throws ScriptException
compiler - the engine to use to do the compilationScriptException - if compilation fails@Nonnull public final ScriptEngineType getEngineType()
@Nonnull public abstract String getScript() throws IOException
IOException - if the script could not be retrievedpublic abstract boolean isStatic()
@Nonnull public final DocumentWorkerScript toDocumentWorkerScript(String name)
DocumentWorkerScript for the script specification.name - the name of the script to useprotected abstract void setScriptSpecField(DocumentWorkerScript script)
script - the script object to be updatedCopyright © 2016–2021 EntIT Software LLC, a Micro Focus company. All rights reserved.