Class ModifyInventoryForFlightRenderer

java.lang.Object
com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.config.jaxb.wizard.ViewType,Map<String,String>>
com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer
de.hybris.platform.transportbackoffice.widgets.inventory.renderer.ModifyInventoryForFlightRenderer
All Implemented Interfaces:
com.hybris.cockpitng.widgets.common.NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.config.jaxb.wizard.ViewType,Map<String,String>>, com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.config.jaxb.wizard.ViewType,Map<String,String>>, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>

public class ModifyInventoryForFlightRenderer extends com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
This is responsible of rendering the layout of the Step2 of modify inventory for flight.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.hybris.cockpitng.components.Editor
    createEditor(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, String type, String defaultEditor, String property, String event)
    Method that create editor according to given parameter
    protected void
    createGridColumns(org.zkoss.zul.Grid modifyInventoryGrid, Boolean isSingleTransportOffering, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
    Creates grid columns
    protected org.zkoss.zul.Grid
    createGridLayout(org.zkoss.zul.Div container, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
    Creates grid layout
    protected void
    createGridRows(org.zkoss.zul.Grid modifyInventoryGrid, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering)
    Creates grid rows
    protected org.zkoss.zk.ui.Component
    createLayout(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
    Creates grid layout.
    protected org.zkoss.zul.Row
    createRow(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering, StockLevelModel stockLevelModel, String property)
    Method creates Row for each stock level entry.
    protected com.hybris.cockpitng.labels.LabelService
    Gets label service.
    protected boolean
    isStockLevelCodeValid(String stockLevelCode)
    Checks if the stockLevelCode is valid, checking it against the REGEX_ALPHANUMERIC.
    void
    onEvent(org.zkoss.zk.ui.event.Event event)
     
    protected void
    putInStockStatusEnumInContext(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
    Method fetches the InStockStatus label value and save into the context.
    void
    render(org.zkoss.zk.ui.Component parent, com.hybris.cockpitng.config.jaxb.wizard.ViewType customView, Map<String,String> parameters, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
     
    void
    setLabelService(com.hybris.cockpitng.labels.LabelService labelService)
    Sets label service.

    Methods inherited from class com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer

    addRendererListener, fireComponentRendered, fireComponentRendered, fireComponentRendered, removeRendererListener

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer

    render
  • Constructor Details

    • ModifyInventoryForFlightRenderer

      public ModifyInventoryForFlightRenderer()
  • Method Details

    • render

      public void render(org.zkoss.zk.ui.Component parent, com.hybris.cockpitng.config.jaxb.wizard.ViewType customView, Map<String,String> parameters, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Specified by:
      render in interface com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,com.hybris.cockpitng.config.jaxb.wizard.ViewType,Map<String,String>>
      Specified by:
      render in class com.hybris.cockpitng.widgets.configurableflow.renderer.DefaultCustomViewRenderer
    • createLayout

      protected org.zkoss.zk.ui.Component createLayout(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Creates grid layout.
      Parameters:
      widgetInstanceManager - the widget instance manager
      Returns:
      the component
    • putInStockStatusEnumInContext

      protected void putInStockStatusEnumInContext(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Method fetches the InStockStatus label value and save into the context.
      Parameters:
      widgetInstanceManager - the widget instance manager
    • createGridLayout

      protected org.zkoss.zul.Grid createGridLayout(org.zkoss.zul.Div container, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Creates grid layout
      Parameters:
      container - the container
      widgetInstanceManager - the widget instance manager
      Returns:
      the grid
    • createGridRows

      protected void createGridRows(org.zkoss.zul.Grid modifyInventoryGrid, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering)
      Creates grid rows
      Parameters:
      modifyInventoryGrid - the modify inventory grid
      widgetInstanceManager - the widget instance manager
      isSingleTransportOffering - the is single transport offering
    • isStockLevelCodeValid

      protected boolean isStockLevelCodeValid(String stockLevelCode)
      Checks if the stockLevelCode is valid, checking it against the REGEX_ALPHANUMERIC.
      Parameters:
      stockLevelCode - as the stock level code
      Returns:
      true if the code is valid, false otherwise
    • createRow

      protected org.zkoss.zul.Row createRow(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, boolean isSingleTransportOffering, StockLevelModel stockLevelModel, String property)
      Method creates Row for each stock level entry.
      Parameters:
      widgetInstanceManager - the widget instance manager
      isSingleTransportOffering - the is single transport offering
      stockLevelModel - the stock level model
      property - the property
      Returns:
      the row
    • createGridColumns

      protected void createGridColumns(org.zkoss.zul.Grid modifyInventoryGrid, Boolean isSingleTransportOffering, com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      Creates grid columns
      Parameters:
      modifyInventoryGrid - the modify inventory grid
      isSingleTransportOffering - the is single transport offering
      widgetInstanceManager - the widget instance manager
    • createEditor

      protected com.hybris.cockpitng.components.Editor createEditor(com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager, String type, String defaultEditor, String property, String event)
      Method that create editor according to given parameter
      Parameters:
      widgetInstanceManager - the widget instance manager
      type - the type
      defaultEditor - the default editor
      property - the property
      event - the event
      Returns:
      the editor
    • onEvent

      public void onEvent(org.zkoss.zk.ui.event.Event event)
      Specified by:
      onEvent in interface org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>
    • getLabelService

      protected com.hybris.cockpitng.labels.LabelService getLabelService()
      Gets label service.
      Returns:
      the label service
    • setLabelService

      public void setLabelService(com.hybris.cockpitng.labels.LabelService labelService)
      Sets label service.
      Parameters:
      labelService - the label service