@Override
public String runOperation(CallingContext context, RaptureScript script, String ctx, Map<String, Object> params) {
// Get the script from the implementation bit, set up the helpers into
// the context and execute...
try {
ScriptEngine engine = engineRef.get();
CompiledScript cScript = getOperationScript(engine, script);
addStandardContext(context, engine);
engine.put(PARAMS, params);
engine.put(CTX, ctx);
Kernel.getKernel().getStat().registerRunScript();
return JacksonUtil.jsonFromObject(cScript.eval());
} catch (ScriptException e) {
Kernel.writeAuditEntry(EXCEPTION, 2, e.getMessage());
throw RaptureExceptionFactory.create(HttpURLConnection.HTTP_INTERNAL_ERROR, "Error running script " + script.getName(), e);
}
}
BaseRaptureScript.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:Rapture
作者:
评论列表
文章目录