Class AbstractRuleCompilePublishComposer

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
All Implemented Interfaces:
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:
AbstractRuleCompileForModuleComposer, AbstractRuleUndeployFromModuleComposer, RulesModuleSyncComposer

public abstract class AbstractRuleCompilePublishComposer extends com.hybris.cockpitng.util.ViewAnnotationAwareComposer
Abstract class for the rule compile/publish composers with the global event listener binding
See Also:
  • Field Summary

    Fields inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer

    _separator, application, applicationScope, arg, componentScope, desktop, desktopScope, execution, page, pageScope, param, requestScope, self, session, sessionScope, spaceOwner, spaceScope

    Fields inherited from class org.zkoss.zk.ui.util.GenericComposer

    _applied
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doAfterCompose(org.zkoss.zk.ui.Component component)
     
    protected <T extends AbstractRuleModel>
    List<T>
    Provides a list of all the related rules for the provided rule set.
    protected com.hybris.cockpitng.util.notifications.NotificationService
     
    void
    handleRuleEngineModuleSwapCompletedEvent(com.hybris.cockpitng.core.events.CockpitEvent event)
     
    void
    handleRuleUpdatedEvent(com.hybris.cockpitng.core.events.CockpitEvent event)
     
    protected void
    the method invoked upon exception
    protected void
    the method invoked upon job being triggered
    protected void
    onPublishingError(String failureReason, Collection<ResultItem> results)
    the method invoked upon publishing errors
    protected void
    onRuleUpdate(String ruleCode)
    the method invoked upon rule update
    protected abstract void
    onSuccess(String moduleName, String previousModuleVersion, String moduleVersion)
    the method invoked upon publishing success
    protected void
    the method invoked upon validation errors before publishing

    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

    Methods inherited from class org.zkoss.zk.ui.event.GenericEventListener

    bindComponent, getController, onEvent, unbindComponent

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractRuleCompilePublishComposer

      public AbstractRuleCompilePublishComposer()
  • Method Details

    • doAfterCompose

      public void doAfterCompose(org.zkoss.zk.ui.Component component) throws Exception
      Specified by:
      doAfterCompose in interface org.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>
      Overrides:
      doAfterCompose in class com.hybris.cockpitng.util.ViewAnnotationAwareComposer
      Throws:
      Exception
    • handleRuleEngineModuleSwapCompletedEvent

      public void handleRuleEngineModuleSwapCompletedEvent(com.hybris.cockpitng.core.events.CockpitEvent event)
    • handleRuleUpdatedEvent

      public void handleRuleUpdatedEvent(com.hybris.cockpitng.core.events.CockpitEvent event)
    • onSuccess

      protected abstract void onSuccess(String moduleName, String previousModuleVersion, String moduleVersion)
      the method invoked upon publishing success
      Parameters:
      moduleName - name of the published module
      previousModuleVersion - previous version of the module
      moduleVersion - current version of the module
    • onPublishingError

      protected void onPublishingError(String failureReason, Collection<ResultItem> results)
      the method invoked upon publishing errors
      Parameters:
      failureReason - failure reason message
      results - collection of publishing results
    • onRuleUpdate

      protected void onRuleUpdate(String ruleCode)
      the method invoked upon rule update
      Parameters:
      ruleCode - code of the updated rule
    • onException

      protected void onException(Exception exception)
      the method invoked upon exception
      Parameters:
      exception - the exception encountered
    • onJobTriggered

      protected void onJobTriggered(CronJobModel cronJob)
      the method invoked upon job being triggered
      Parameters:
      cronJob - the cron job to be used in notification
    • onValidationError

      protected void onValidationError(String message)
      the method invoked upon validation errors before publishing
      Parameters:
      message - error messsage
    • getAffectedRules

      protected <T extends AbstractRuleModel> List<T> getAffectedRules(List<T> rules)
      Provides a list of all the related rules for the provided rule set. This method is intended to be used to identify all rules whose state might have been impacted by an action (such as publish/undeploy) triggered for one of the rules
      Parameters:
      rules - collection of rules
      Returns:
      list of all of the rules that are in a relationship to the provided rule set
    • getNotificationService

      protected com.hybris.cockpitng.util.notifications.NotificationService getNotificationService()