Class ReturnCancellationController

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
de.hybris.platform.omsbackoffice.widgets.returns.cancelreturnpopup.ReturnCancellationController
All Implemented Interfaces:
com.hybris.cockpitng.core.WidgetController, com.hybris.cockpitng.dnd.WidgetDragAndDropAware, com.hybris.cockpitng.engine.WidgetInstanceManagerAware, 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 ReturnCancellationController extends com.hybris.cockpitng.util.DefaultWidgetController
Controller for the cancellation return pop up
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Object
     
    protected static final String
     
    protected static final String
     

    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
    Confirm the return approval request
    protected com.hybris.cockpitng.core.events.CockpitEventQueue
     
     
    org.zkoss.zul.Textbox
     
     
    protected com.hybris.cockpitng.util.notifications.NotificationService
     
     
     
    org.zkoss.zul.Textbox
     
    getSelectedCancelReason(org.zkoss.zk.ui.event.Event event)
    Gets the label for the selected cancel reason in case the event has a target of Combobox
    protected void
    handleGlobalCancelReason(org.zkoss.zk.ui.event.Event event)
    Applies a global reason to all individual entries after an event is triggered
    void
    Initialize the popup to choose cancellation reason
    Retrieve the CancelReason according to the selected label in the combobox
    protected void
    processCancellation(org.zkoss.zk.ui.event.Event event)
    Process the cancellation only if the user confirmed it
    void
     
    void
    Reinitialize the popup.
    protected void
    Check if the data provided by the form are compliant with the validation rules

    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

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

    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
  • Field Details

  • Constructor Details

    • ReturnCancellationController

      public ReturnCancellationController()
  • Method Details

    • initCancelReturnForm

      public void initCancelReturnForm(ReturnRequestModel inputObject)
      Initialize the popup to choose cancellation reason
      Parameters:
      inputObject - the return request for which we want set the cancellation reason
    • handleGlobalCancelReason

      protected void handleGlobalCancelReason(org.zkoss.zk.ui.event.Event event)
      Applies a global reason to all individual entries after an event is triggered
      Parameters:
      event - the on select event that was triggered by the user
    • matchingComboboxCancelReason

      protected Optional<CancelReason> matchingComboboxCancelReason(String cancelReasonLabel)
      Retrieve the CancelReason according to the selected label in the combobox
      Parameters:
      cancelReasonLabel - a String representation of the reason
      Returns:
      the CancelReason corresponding to the label
    • getSelectedCancelReason

      protected Optional<CancelReason> getSelectedCancelReason(org.zkoss.zk.ui.event.Event event)
      Gets the label for the selected cancel reason in case the event has a target of Combobox
      Parameters:
      event - the event that was fired
      Returns:
      the CancelReason corresponding to the label.
    • undoCancelReturn

      public void undoCancelReturn()
      Reinitialize the popup.
    • confirmCancelReturn

      public void confirmCancelReturn()
      Confirm the return approval request
    • processCancellation

      protected void processCancellation(org.zkoss.zk.ui.event.Event event)
      Process the cancellation only if the user confirmed it
      Parameters:
      event - the confirmation event coming from the user
    • validateRequest

      protected void validateRequest()
      Check if the data provided by the form are compliant with the validation rules
    • getReturnRequest

      protected ReturnRequestModel getReturnRequest()
    • setReturnRequest

      public void setReturnRequest(ReturnRequestModel returnRequest)
    • getEnumerationService

      protected EnumerationService getEnumerationService()
    • getCockpitLocaleService

      protected BackofficeLocaleService getCockpitLocaleService()
    • getCockpitEventQueue

      protected com.hybris.cockpitng.core.events.CockpitEventQueue getCockpitEventQueue()
    • getReturnCallbackService

      protected ReturnCallbackService getReturnCallbackService()
    • getNotificationService

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

      public org.zkoss.zul.Textbox getCustomerName()
    • getReturnRequestCode

      public org.zkoss.zul.Textbox getReturnRequestCode()