Class ScriptExecutorController
- java.lang.Object
-
- org.zkoss.zk.ui.event.GenericEventListener
-
- org.zkoss.zk.ui.util.GenericComposer<T>
-
- org.zkoss.zk.ui.util.GenericAutowireComposer<T>
-
- org.zkoss.zk.ui.util.GenericForwardComposer<org.zkoss.zk.ui.Component>
-
- com.hybris.cockpitng.util.ViewAnnotationAwareComposer
-
- com.hybris.cockpitng.util.DefaultWidgetController
-
- com.hybris.backoffice.widgets.scriptexecutor.ScriptExecutorController
-
- All Implemented Interfaces:
com.hybris.cockpitng.core.WidgetController,com.hybris.cockpitng.dnd.WidgetDragAndDropAware,com.hybris.cockpitng.engine.WidgetInstanceManagerAware,java.io.Serializable,org.zkoss.zk.ui.event.EventListener,org.zkoss.zk.ui.event.SerializableEventListener,org.zkoss.zk.ui.util.ComponentActivationListener,org.zkoss.zk.ui.util.ComponentCloneListener,org.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>,org.zkoss.zk.ui.util.ComposerExt<org.zkoss.zk.ui.Component>
public class ScriptExecutorController extends com.hybris.cockpitng.util.DefaultWidgetControllerWidget controller of a Script Executor widget. With this widget it's possible to run a script content using platforms {#ScriptingLanguagesService}.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINPUT_SOCKET_DATAstatic java.lang.StringSETTING_SCRIPT_CONTENTstatic java.lang.StringSETTING_SCRIPT_CONTENT_LANGstatic java.lang.StringSETTING_SCRIPT_URIstatic java.lang.StringSOCKET_OUTPUT_ERRORstatic java.lang.StringSOCKET_OUTPUT_SUCCESS
-
Constructor Summary
Constructors Constructor Description ScriptExecutorController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ScriptExecutionResultexecuteScript(ScriptExecutable executable, java.lang.Object data)protected voidexecuteScriptByURI(java.lang.Object data, java.lang.String scriptId)protected voidexecuteScriptWithInlineContent(java.lang.Object data, java.lang.String scriptContent, java.lang.String scriptContentLang)protected ScriptingLanguagesServicegetScriptingLanguagesService()voidinput(java.lang.Object data)Method runs the script based on it's widget settings.-
Methods inherited from class com.hybris.cockpitng.util.DefaultWidgetController
doAfterCompose, doBeforeCompose, doBeforeComposeChildren, executeOperation, getDragAndDropStrategy, getLabel, getLabel, getModel, getValue, getWidgetDragAndDropStrategyRepository, getWidgetInstanceManager, getWidgetRoot, getWidgetSettings, getWidgetslot, getWidgetTitle, getWidgetUtils, initDragAndDropAwareness, initialize, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, invokeListenerMethod, onSocketInput, preInitialize, sendOutput, sendOutputAfterOperation, sendOutputAfterOperation, sendOutputAfterOperation, setValue, setWidgetInstanceManager, setWidgetTitle
-
Methods inherited from class com.hybris.cockpitng.util.ViewAnnotationAwareComposer
scanEventListeners
-
Methods inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer
alert, didActivate, getPage, willClone, willPassivate
-
-
-
-
Field Detail
-
INPUT_SOCKET_DATA
public static final java.lang.String INPUT_SOCKET_DATA
- See Also:
- Constant Field Values
-
SETTING_SCRIPT_URI
public static final java.lang.String SETTING_SCRIPT_URI
- See Also:
- Constant Field Values
-
SETTING_SCRIPT_CONTENT
public static final java.lang.String SETTING_SCRIPT_CONTENT
- See Also:
- Constant Field Values
-
SETTING_SCRIPT_CONTENT_LANG
public static final java.lang.String SETTING_SCRIPT_CONTENT_LANG
- See Also:
- Constant Field Values
-
SOCKET_OUTPUT_SUCCESS
public static final java.lang.String SOCKET_OUTPUT_SUCCESS
- See Also:
- Constant Field Values
-
SOCKET_OUTPUT_ERROR
public static final java.lang.String SOCKET_OUTPUT_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
input
public void input(java.lang.Object data)
Method runs the script based on it's widget settings.- Parameters:
data- the data which is accessible in the script under the "data" variable name.
-
executeScriptWithInlineContent
protected void executeScriptWithInlineContent(java.lang.Object data, java.lang.String scriptContent, java.lang.String scriptContentLang)
-
executeScriptByURI
protected void executeScriptByURI(java.lang.Object data, java.lang.String scriptId)
-
executeScript
protected ScriptExecutionResult executeScript(ScriptExecutable executable, java.lang.Object data)
-
getScriptingLanguagesService
protected ScriptingLanguagesService getScriptingLanguagesService()
-
-