com.liferay.portal.scripting
Class ScriptingImpl
java.lang.Object
com.liferay.portal.scripting.ScriptingImpl
- All Implemented Interfaces:
- Scripting
public class ScriptingImpl
- extends Object
- implements Scripting
Method Summary |
void |
addScriptingExecutor(String language,
ScriptingExecutor scriptingExecutor)
|
void |
clearCache(String language)
|
Map<String,Object> |
eval(Set<String> allowedClasses,
Map<String,Object> inputObjects,
Set<String> outputNames,
String language,
String script,
String... servletContextNames)
|
void |
exec(Set<String> allowedClasses,
Map<String,Object> inputObjects,
String language,
String script,
String... servletContextNames)
|
protected ClassLoader[] |
getClassLoaders(String[] servletContextNames)
|
protected String |
getErrorMessage(Exception e)
|
protected String |
getErrorMessage(String script,
Exception e)
|
Set<String> |
getSupportedLanguages()
|
void |
setScriptingExecutors(Map<String,ScriptingExecutor> scriptingExecutors)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptingImpl
public ScriptingImpl()
addScriptingExecutor
public void addScriptingExecutor(String language,
ScriptingExecutor scriptingExecutor)
clearCache
public void clearCache(String language)
throws ScriptingException
- Specified by:
clearCache
in interface Scripting
- Throws:
ScriptingException
eval
public Map<String,Object> eval(Set<String> allowedClasses,
Map<String,Object> inputObjects,
Set<String> outputNames,
String language,
String script,
String... servletContextNames)
throws ScriptingException
- Specified by:
eval
in interface Scripting
- Throws:
ScriptingException
exec
public void exec(Set<String> allowedClasses,
Map<String,Object> inputObjects,
String language,
String script,
String... servletContextNames)
throws ScriptingException
- Specified by:
exec
in interface Scripting
- Throws:
ScriptingException
getSupportedLanguages
public Set<String> getSupportedLanguages()
- Specified by:
getSupportedLanguages
in interface Scripting
setScriptingExecutors
public void setScriptingExecutors(Map<String,ScriptingExecutor> scriptingExecutors)
getClassLoaders
protected ClassLoader[] getClassLoaders(String[] servletContextNames)
getErrorMessage
protected String getErrorMessage(Exception e)
getErrorMessage
protected String getErrorMessage(String script,
Exception e)