Class AbstractRuleCompileForModuleComposer<I>
- 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
-
- de.hybris.platform.ruleenginebackoffice.actions.AbstractRuleCompilePublishComposer
-
- de.hybris.platform.ruleenginebackoffice.actions.AbstractRuleCompileForModuleComposer<I>
-
- All Implemented Interfaces:
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>
- Direct Known Subclasses:
RuleCompileAllForModuleComposer
,RuleCompileForModuleComposer
public abstract class AbstractRuleCompileForModuleComposer<I> extends AbstractRuleCompilePublishComposer
AbstractRuleCompileForModuleComposer is the abstract class for the common functionality of the rule compile/publish actions with the rule module chooser dialog.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
DEFAULT_CONFIRM_PUBLISH_CANCEL
protected static java.lang.String
DEFAULT_CONFIRM_PUBLISH_MESSAGE
protected static java.lang.String
DEFAULT_CONFIRM_PUBLISH_OK
protected static java.lang.String
DEFAULT_CONFIRM_PUBLISH_TITLE
protected static java.lang.String
DEFAULT_MULTIPLEVERSIONS_CONFIRM_PUBLISH_MESSAGE
protected static java.lang.String
MESSAGEBOX_TEMPLATE_URL
-
Constructor Summary
Constructors Constructor Description AbstractRuleCompileForModuleComposer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
changeEnv()
void
closeDialog()
protected boolean
containsDeployedRules(java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
protected void
doCompileAndPublishRules(java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
protected void
doOnConfirmationClickForDeployedRules(org.zkoss.zul.Messagebox.ClickEvent clickEvent, java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
protected void
doOnConfirmationClickForMultiVersionRules(org.zkoss.zul.Messagebox.ClickEvent clickEvent, java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
protected com.hybris.cockpitng.actions.ActionContext<I>
getContext()
protected org.zkoss.zul.Combobox
getEnvInput()
protected com.hybris.cockpitng.core.events.CockpitEventQueue
getEventQueue()
protected InteractiveAction
getInteractiveAction()
returns reference to the action instance.protected java.lang.String
getMessageboxWidth()
protected org.zkoss.zul.Button
getOkBtn()
protected RuleEngineCronJobLauncher
getRuleEngineCronJobLauncher()
protected RuleService
getRuleService()
protected RulesModuleDao
getRulesModuleDao()
protected java.util.List<SourceRuleModel>
getRulesToProcess()
returns the rule to be compiled by this action.protected abstract RuleType
getRuleType()
the rule type used for (sub)selecting which environments / rule modules are displayed.protected org.zkoss.zul.Window
getWindow()
protected void
initEnvironmentOptionsCombo()
creates the combo boxes for the dialog box.void
onCreate(org.zkoss.zk.ui.event.CreateEvent event)
void
perform()
called upon on click event of the corresponding OK button.protected boolean
registerModuleSwappingNotification(java.lang.String moduleName)
protected void
showConfirmationDialog(java.lang.String message, org.zkoss.zk.ui.event.EventListener<org.zkoss.zul.Messagebox.ClickEvent> listener)
-
Methods inherited from class de.hybris.platform.ruleenginebackoffice.actions.AbstractRuleCompilePublishComposer
doAfterCompose, getAffectedRules, getNotificationService, handleRuleEngineModuleSwapCompletedEvent, handleRuleUpdatedEvent, onException, onJobTriggered, onPublishingError, onRuleUpdate, onSuccess
-
Methods inherited from class com.hybris.cockpitng.util.ViewAnnotationAwareComposer
invokeListenerMethod, scanEventListeners
-
Methods inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer
alert, didActivate, getPage, willClone, willPassivate
-
Methods inherited from class org.zkoss.zk.ui.util.GenericComposer
doBeforeCompose, doBeforeComposeChildren, doCatch, doFinally
-
-
-
-
Field Detail
-
DEFAULT_CONFIRM_PUBLISH_MESSAGE
protected static final java.lang.String DEFAULT_CONFIRM_PUBLISH_MESSAGE
- See Also:
- Constant Field Values
-
DEFAULT_MULTIPLEVERSIONS_CONFIRM_PUBLISH_MESSAGE
protected static final java.lang.String DEFAULT_MULTIPLEVERSIONS_CONFIRM_PUBLISH_MESSAGE
- See Also:
- Constant Field Values
-
DEFAULT_CONFIRM_PUBLISH_TITLE
protected static final java.lang.String DEFAULT_CONFIRM_PUBLISH_TITLE
- See Also:
- Constant Field Values
-
DEFAULT_CONFIRM_PUBLISH_OK
protected static final java.lang.String DEFAULT_CONFIRM_PUBLISH_OK
- See Also:
- Constant Field Values
-
DEFAULT_CONFIRM_PUBLISH_CANCEL
protected static final java.lang.String DEFAULT_CONFIRM_PUBLISH_CANCEL
- See Also:
- Constant Field Values
-
MESSAGEBOX_TEMPLATE_URL
protected static final java.lang.String MESSAGEBOX_TEMPLATE_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
perform
public void perform()
called upon on click event of the corresponding OK button.
-
containsDeployedRules
protected boolean containsDeployedRules(java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
-
showConfirmationDialog
protected void showConfirmationDialog(java.lang.String message, org.zkoss.zk.ui.event.EventListener<org.zkoss.zul.Messagebox.ClickEvent> listener)
-
getMessageboxWidth
protected java.lang.String getMessageboxWidth()
-
doOnConfirmationClickForMultiVersionRules
protected void doOnConfirmationClickForMultiVersionRules(org.zkoss.zul.Messagebox.ClickEvent clickEvent, java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
-
doOnConfirmationClickForDeployedRules
protected void doOnConfirmationClickForDeployedRules(org.zkoss.zul.Messagebox.ClickEvent clickEvent, java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
-
doCompileAndPublishRules
protected void doCompileAndPublishRules(java.lang.String moduleName, java.util.List<SourceRuleModel> sourceRules)
-
registerModuleSwappingNotification
protected boolean registerModuleSwappingNotification(java.lang.String moduleName)
-
getRuleType
protected abstract RuleType getRuleType()
the rule type used for (sub)selecting which environments / rule modules are displayed.- Returns:
- the rule type of the selected rule(s)
-
getRulesToProcess
protected java.util.List<SourceRuleModel> getRulesToProcess()
returns the rule to be compiled by this action.- Returns:
- the list of rules that will be compiled by this action
-
getInteractiveAction
protected InteractiveAction getInteractiveAction()
returns reference to the action instance.- Returns:
- the action instance
-
onCreate
public void onCreate(org.zkoss.zk.ui.event.CreateEvent event)
- Parameters:
event
- not used in this call
-
initEnvironmentOptionsCombo
protected void initEnvironmentOptionsCombo()
creates the combo boxes for the dialog box.
-
closeDialog
public void closeDialog()
-
changeEnv
public void changeEnv()
-
getRulesModuleDao
protected RulesModuleDao getRulesModuleDao()
-
getRuleEngineCronJobLauncher
protected RuleEngineCronJobLauncher getRuleEngineCronJobLauncher()
-
getEventQueue
protected com.hybris.cockpitng.core.events.CockpitEventQueue getEventQueue()
-
getRuleService
protected RuleService getRuleService()
-
getContext
protected com.hybris.cockpitng.actions.ActionContext<I> getContext()
-
getEnvInput
protected org.zkoss.zul.Combobox getEnvInput()
-
getWindow
protected org.zkoss.zul.Window getWindow()
-
getOkBtn
protected org.zkoss.zul.Button getOkBtn()
-
-