Class CreateOrEditMarketBucketController

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.unifieduibackoffice.widgets.farebuckets.CreateOrEditMarketBucketController
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 CreateOrEditMarketBucketController extends com.hybris.cockpitng.util.DefaultWidgetController
This controller will handle events for creating and editing market bucket
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
    protected void
    This method will create tab, panel and toolbar inside a newly created row for addFareFamilyGrid
    void
     
    protected void
    createAddNewFlightColumns(org.zkoss.zul.Grid flightGrid)
    This method will create columns for ticketDesignator flightGrid
    protected void
    createAddNewFlightRow(org.zkoss.zul.Rows flightRows, org.zkoss.zul.Grid flightGrid, FlightRange flightRange)
    This method will create and add flightRow in flightRows
    protected void
    createAddTicketDesignatorColumns(org.zkoss.zul.Grid ticketDesignatorGrid)
    This method will create columns for ticketDesignator grid
    protected void
    createAddTicketDesignatorRow(org.zkoss.zul.Rows ticketDesignatorRows, String ticketDesignator)
    This method will create and add ticketDesignatorRow in ticketDesignatorRows
    protected void
    createBaggagePanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
    This method will create Tabpanel content for Baggage tab
    protected org.zkoss.zul.Radiogroup
    This method will create Radiogroup object
    protected org.zkoss.zul.Button
    createButton(String labelKey)
    This method will create Button object
    protected org.zkoss.zul.Cell
    This method will create Cell object
    protected org.zkoss.zul.Column
    createColumn(String labelKey)
    This method will create Column object
    protected org.zkoss.zul.Combobox
    createCombobox(String name, org.zkoss.zul.ListModelList<ComboBoxData> list, boolean readOnly)
    This method will create Combobox object
    protected ComboBoxData
    createComboBoxData(String value, String labelKey)
    This method will create ComboBoxData object
    protected void
    This method will create all combo box that we needed for zk component
    protected org.zkoss.zul.Datebox
    This method will create Datebox object
    protected void
    createDatesPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
    This method will create Tabpanel content for Dates tab
    protected com.hybris.cockpitng.components.Editor
    createEditor(String type, String attribute)
    This method will create Editor object
    protected void
    createFlightPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
    This method will create Tabpanel content for Baggage tab
    protected void
    createGeneralPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
    This method will create Tabpanel content for General tab
    protected org.zkoss.zul.Grid
    This method will create Grid object and append Rows object to the grid
    protected org.zkoss.zul.Intbox
    This method will create Intbox object
    protected org.zkoss.zul.Label
    createLabel(String labelKey)
    This method will create Label object
    protected void
    This method will call create market bucket method, will handle the exception and accordingly notify, show message box to user and send socket event
    void
     
    protected void
    createPricesPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
    This method will create Tabpanel content for Prices tab
    protected org.zkoss.zul.Tab
    This method will create Tab For FareFamily
    protected org.zkoss.zul.Tabpanel
    This method will create Tabpanel object
    protected org.zkoss.zul.Tabpanels
    This method will create Tabpanels For FareFamily in a sequence
    protected org.zkoss.zul.Tabs
    This method will create Tabs For FareFamily
    protected org.zkoss.zul.Textbox
    This method will create Textbox object
    protected org.zkoss.zul.Toolbar
    createToolBar(org.zkoss.zul.Row fareFamilyRow)
    This method will create ToolBar with delete button and onClick EventListener for button to remove FareFamily
    protected void
    deleteFareFamilyItem(org.zkoss.zul.Row fareFamilyRow)
    This method will remove FareFamily
    getNameValueMap(org.zkoss.zk.ui.Component child)
    this method will extract name and value from the Component
    void
    initialize(org.zkoss.zk.ui.Component comp)
     
    protected Date
    This method will parse string date in date object
    protected void
    This method will populate common view data
    protected void
    populateFareFamilyFromBaggageTab(FareFamily fareFamily, org.zkoss.zul.Rows baggageTabRows)
    this method will populate fareFamily data from baggageTabRows
    protected void
    populateFareFamilyFromDatesTab(FareFamily fareFamily, org.zkoss.zul.Rows datesTabRows)
    this method will populate FareFamily data from datesTabRows
    protected void
    populateFareFamilyFromFlightTab(FareFamily fareFamily, org.zkoss.zul.Rows flightTabRows)
    this method will populate fareFamily data from flightTabRows
    protected void
    populateFareFamilyFromGeneralTab(FareFamily fareFamily, org.zkoss.zul.Rows generalTabRows)
    this method will populate FareFamily data from generalTabRows
    protected void
    populateFareFamilyFromPricesTab(FareFamily fareFamily, org.zkoss.zul.Rows pricesTabRows)
    this method will populate fareFamily data from pricesTabRows
    protected void
    This method will populate Market Bucket object from zk components
    protected void
    populateTicketDesignator(FareFamily fareFamily, org.zkoss.zk.ui.Component child)
    this method will populate TicketDesignator data from ticketDesignatorGrid
    void
     
    void
     
    protected void
    This method will call update market bucket method, will handle the exception and accordingly notify, show message box to user and send socket event
    protected boolean
    Validate mandatory form element are not empty and logical data

    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, 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
  • Constructor Details

    • CreateOrEditMarketBucketController

      public CreateOrEditMarketBucketController()
  • Method Details

    • initialize

      public void initialize(org.zkoss.zk.ui.Component comp)
      Overrides:
      initialize in class com.hybris.cockpitng.util.DefaultWidgetController
    • createOrEditMarketBucket

      public void createOrEditMarketBucket(MarketBucket marketBucket)
    • refresh

      public void refresh()
    • save

      public void save()
    • addFareFamilyEvent

      public void addFareFamilyEvent()
    • addFareFamily

      protected void addFareFamily(FareFamily fareFamily)
      This method will create tab, panel and toolbar inside a newly created row for addFareFamilyGrid
      Parameters:
      fareFamily - the fareFamily
    • createMarketBucket

      protected void createMarketBucket(MarketBucket marketBucket)
      This method will call create market bucket method, will handle the exception and accordingly notify, show message box to user and send socket event
      Parameters:
      marketBucket - the marketBucket
    • updateMarketBucket

      protected void updateMarketBucket(MarketBucket marketBucket)
      This method will call update market bucket method, will handle the exception and accordingly notify, show message box to user and send socket event
      Parameters:
      marketBucket - the marketBucket
    • validateMarketBucketData

      protected boolean validateMarketBucketData()
      Validate mandatory form element are not empty and logical data
      Returns:
      the boolean,returns true if validation success else return false
    • createComboBoxList

      protected void createComboBoxList()
      This method will create all combo box that we needed for zk component
    • createComboBoxData

      protected ComboBoxData createComboBoxData(String value, String labelKey)
      This method will create ComboBoxData object
      Parameters:
      value - the value
      labelKey - the label key
      Returns:
    • populateCommonViewData

      protected void populateCommonViewData()
      This method will populate common view data
    • populateMarketBucket

      protected void populateMarketBucket(MarketBucket marketBucket)
      This method will populate Market Bucket object from zk components
      Parameters:
      marketBucket - the marketBucket
    • populateFareFamilyFromGeneralTab

      protected void populateFareFamilyFromGeneralTab(FareFamily fareFamily, org.zkoss.zul.Rows generalTabRows)
      this method will populate FareFamily data from generalTabRows
      Parameters:
      fareFamily - the fareFamily
      generalTabRows - the generalTabRows
    • populateFareFamilyFromDatesTab

      protected void populateFareFamilyFromDatesTab(FareFamily fareFamily, org.zkoss.zul.Rows datesTabRows)
      this method will populate FareFamily data from datesTabRows
      Parameters:
      fareFamily - the fareFamily
      datesTabRows - the datesTabRows
    • populateTicketDesignator

      protected void populateTicketDesignator(FareFamily fareFamily, org.zkoss.zk.ui.Component child)
      this method will populate TicketDesignator data from ticketDesignatorGrid
      Parameters:
      fareFamily - the fareFamily
      child - the div component
    • populateFareFamilyFromPricesTab

      protected void populateFareFamilyFromPricesTab(FareFamily fareFamily, org.zkoss.zul.Rows pricesTabRows)
      this method will populate fareFamily data from pricesTabRows
      Parameters:
      fareFamily - the fareFamily
      pricesTabRows - the pricesTabRows
    • populateFareFamilyFromBaggageTab

      protected void populateFareFamilyFromBaggageTab(FareFamily fareFamily, org.zkoss.zul.Rows baggageTabRows)
      this method will populate fareFamily data from baggageTabRows
      Parameters:
      fareFamily - the fareFamily
      baggageTabRows - the baggageTabRows
    • populateFareFamilyFromFlightTab

      protected void populateFareFamilyFromFlightTab(FareFamily fareFamily, org.zkoss.zul.Rows flightTabRows)
      this method will populate fareFamily data from flightTabRows
      Parameters:
      fareFamily - the fareFamily
      flightTabRows - the flightTabRows
    • getNameValueMap

      protected AbstractMap.SimpleEntry<String,Object> getNameValueMap(org.zkoss.zk.ui.Component child)
      this method will extract name and value from the Component
      Parameters:
      child - the component from which we need to extract values
      Returns:
      the SimpleEntry Map
    • createTabsForFareFamily

      protected org.zkoss.zul.Tabs createTabsForFareFamily()
      This method will create Tabs For FareFamily
      Returns:
      the Tabs
    • createTabForFareFamily

      protected org.zkoss.zul.Tab createTabForFareFamily(String labelKey)
      This method will create Tab For FareFamily
      Parameters:
      labelKey - the labelKey
      Returns:
    • createTabpanelsForFareFamily

      protected org.zkoss.zul.Tabpanels createTabpanelsForFareFamily(FareFamily fareFamily)
      This method will create Tabpanels For FareFamily in a sequence
      Parameters:
      fareFamily - the fareFamily
      Returns:
      the Tabpanels
    • createToolBar

      protected org.zkoss.zul.Toolbar createToolBar(org.zkoss.zul.Row fareFamilyRow)
      This method will create ToolBar with delete button and onClick EventListener for button to remove FareFamily
      Parameters:
      fareFamilyRow - the fareFamilyRow
      Returns:
      the Toolbar
    • deleteFareFamilyItem

      protected void deleteFareFamilyItem(org.zkoss.zul.Row fareFamilyRow)
      This method will remove FareFamily
      Parameters:
      fareFamilyRow - the row
    • createGeneralPanel

      protected void createGeneralPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
      This method will create Tabpanel content for General tab
      Parameters:
      fareFamily - the fareFamily
      tabpanels - the tabpanels
    • createDatesPanel

      protected void createDatesPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
      This method will create Tabpanel content for Dates tab
      Parameters:
      fareFamily - the fareFamily
      tabpanels - the tabpanels
    • createPricesPanel

      protected void createPricesPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
      This method will create Tabpanel content for Prices tab
      Parameters:
      fareFamily - the fareFamily
      tabpanels - the tabpanels
    • createBaggagePanel

      protected void createBaggagePanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
      This method will create Tabpanel content for Baggage tab
      Parameters:
      fareFamily - the fareFamily
      tabpanels - the tabpanels
    • createFlightPanel

      protected void createFlightPanel(org.zkoss.zul.Tabpanels tabpanels, FareFamily fareFamily)
      This method will create Tabpanel content for Baggage tab
      Parameters:
      fareFamily - the fareFamily
      tabpanels - the tabpanels
    • createGrid

      protected org.zkoss.zul.Grid createGrid()
      This method will create Grid object and append Rows object to the grid
      Returns:
      the Grid
    • createTabpanel

      protected org.zkoss.zul.Tabpanel createTabpanel()
      This method will create Tabpanel object
      Returns:
      the tabpanel
    • createLabel

      protected org.zkoss.zul.Label createLabel(String labelKey)
      This method will create Label object
      Parameters:
      labelKey - the labelKey from labels properties
      Returns:
      the Label
    • createTextBox

      protected org.zkoss.zul.Textbox createTextBox(String name)
      This method will create Textbox object
      Parameters:
      name - the name
      Returns:
      the Textbox
    • createIntBox

      protected org.zkoss.zul.Intbox createIntBox(String name)
      This method will create Intbox object
      Parameters:
      name - the name
      Returns:
      the Intbox
    • createButton

      protected org.zkoss.zul.Button createButton(String labelKey)
      This method will create Button object
      Parameters:
      labelKey - the labelKey from labels properties
      Returns:
      the Button
    • createDateBox

      protected org.zkoss.zul.Datebox createDateBox(String name)
      This method will create Datebox object
      Parameters:
      name - the name
      Returns:
      the Datebox
    • createEditor

      protected com.hybris.cockpitng.components.Editor createEditor(String type, String attribute)
      This method will create Editor object
      Parameters:
      type - the item type
      attribute - the attribute
      Returns:
      the Editor
    • createCombobox

      protected org.zkoss.zul.Combobox createCombobox(String name, org.zkoss.zul.ListModelList<ComboBoxData> list, boolean readOnly)
      This method will create Combobox object
      Parameters:
      name - the
      list - the list of ComboBoxData
      readOnly - the attribute which can decide either Combobox should be read only or not
      Returns:
      the Combobox
    • createBooleanRadiogroup

      protected org.zkoss.zul.Radiogroup createBooleanRadiogroup(String name)
      This method will create Radiogroup object
      Parameters:
      name - the name
      Returns:
      the Radiogroup
    • createColumn

      protected org.zkoss.zul.Column createColumn(String labelKey)
      This method will create Column object
      Parameters:
      labelKey - the labelKey from labels properties
      Returns:
      the Column
    • createCell

      protected org.zkoss.zul.Cell createCell()
      This method will create Cell object
      Returns:
      the Cell
    • createAddTicketDesignatorColumns

      protected void createAddTicketDesignatorColumns(org.zkoss.zul.Grid ticketDesignatorGrid)
      This method will create columns for ticketDesignator grid
      Parameters:
      ticketDesignatorGrid - the ticketDesignatorGrid
    • createAddTicketDesignatorRow

      protected void createAddTicketDesignatorRow(org.zkoss.zul.Rows ticketDesignatorRows, String ticketDesignator)
      This method will create and add ticketDesignatorRow in ticketDesignatorRows
      Parameters:
      ticketDesignator - the ticketDesignator
      ticketDesignatorRows - the ticketDesignatorRows
    • createAddNewFlightColumns

      protected void createAddNewFlightColumns(org.zkoss.zul.Grid flightGrid)
      This method will create columns for ticketDesignator flightGrid
      Parameters:
      flightGrid -
    • createAddNewFlightRow

      protected void createAddNewFlightRow(org.zkoss.zul.Rows flightRows, org.zkoss.zul.Grid flightGrid, FlightRange flightRange)
      This method will create and add flightRow in flightRows
      Parameters:
      flightRows - the flightRows
      flightGrid - the flightGrid
      flightRange - the flightRange
    • parseDateInStringToDate

      protected Date parseDateInStringToDate(String dateInString)
      This method will parse string date in date object
      Parameters:
      dateInString - the dateInString
      Returns:
      the date