public class AutomationScriptingServiceImpl extends Object implements AutomationScriptingService
| Modifier and Type | Field and Description |
|---|---|
protected ThreadLocal<ScriptEngine> |
engines |
protected String |
jsWrapper |
protected ScriptOperationContext |
operationContext |
protected ThreadLocal<ScriptOperationContext> |
operationContexts |
| Constructor and Description |
|---|
AutomationScriptingServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
generateFlatFunction(StringBuffer sb,
String opId) |
protected void |
generateFunction(StringBuffer sb,
String opId) |
<T> T |
getInterface(Class<T> scriptingOperationInterface,
String script,
CoreSession session) |
String |
getJSWrapper() |
protected String |
getJSWrapper(boolean refresh) |
protected void |
parseAutomationIDSForScripting(Map<String,List<String>> opMap,
List<String> flatOps,
String id) |
static String |
replaceDashByUnderscore(String id)
Prevents dashes in operation/chain ids.
|
void |
run(InputStream in,
CoreSession session)
Run Automation Scripting with given 'JavaScript' InputStream and CoreSession.
|
void |
run(String script,
CoreSession session)
Run Automation Scripting for a given 'JavaScript' script and CoreSession.
|
void |
setOperationContext(ScriptOperationContext ctx) |
protected ScriptOperationContext |
wrapContext(ScriptOperationContext ctx) |
protected ScriptOperationContext operationContext
protected final ThreadLocal<ScriptEngine> engines
protected final ThreadLocal<ScriptOperationContext> operationContexts
public AutomationScriptingServiceImpl()
protected String getJSWrapper(boolean refresh) throws OperationException
OperationExceptionpublic void setOperationContext(ScriptOperationContext ctx)
setOperationContext in interface AutomationScriptingServiceprotected ScriptOperationContext wrapContext(ScriptOperationContext ctx)
public String getJSWrapper() throws OperationException
getJSWrapper in interface AutomationScriptingServiceOperationExceptionpublic void run(InputStream in, CoreSession session) throws ScriptException, OperationException
AutomationScriptingServicerun in interface AutomationScriptingServiceScriptExceptionOperationExceptionpublic void run(String script, CoreSession session) throws ScriptException, OperationException
AutomationScriptingServicerun in interface AutomationScriptingServiceScriptExceptionOperationExceptionpublic <T> T getInterface(Class<T> scriptingOperationInterface, String script, CoreSession session) throws ScriptException, OperationException
getInterface in interface AutomationScriptingServiceScriptExceptionOperationExceptionprotected void parseAutomationIDSForScripting(Map<String,List<String>> opMap, List<String> flatOps, String id)
protected void generateFunction(StringBuffer sb, String opId)
protected void generateFlatFunction(StringBuffer sb, String opId)
public static String replaceDashByUnderscore(String id)
Copyright © 2016 Nuxeo SA. All rights reserved.