Class WarehousingRefineByController

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.warehousingbackoffice.widgets.warehousingrefineby.WarehousingRefineByController
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 WarehousingRefineByController extends com.hybris.cockpitng.util.DefaultWidgetController
Controller allowing to filter a collection browser based combine with advanced search logic.
See Also:
  • Field Details

  • Constructor Details

    • WarehousingRefineByController

      public WarehousingRefineByController()
  • Method Details

    • onNodeSelected

      public void onNodeSelected(com.hybris.backoffice.navigation.NavigationNode nodeSelected)
      Resets the refine by widget on NavigationNode selection.
      Parameters:
      nodeSelected - the selected NavigationNode
    • initialize

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

      public void completeAdvancedSearchInitContext(com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchInitContext context)
      Adds refine by filters to the initial given AdvancedSearchInitContext.
      Parameters:
      context - the AdvancedSearchInitContext input
    • addConditionList

      protected void addConditionList(com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchData searchData, Map<String,List<com.hybris.backoffice.widgets.advancedsearch.impl.SearchConditionData>> searchExpressions)
      Adds refine by filters conditions to the existing ones.
      Parameters:
      searchData - the original {link AdvancedSearchData}
      searchExpressions - the search expressions defined in the configuration
    • addSearchCondition

      protected void addSearchCondition(org.zkoss.zul.Checkbox checkbox, Map<String,List<com.hybris.backoffice.widgets.advancedsearch.impl.SearchConditionData>> searchFieldConditions, com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchData advancedSearchData)
      Adds the search conditions associated to the selected Checkbox
      Parameters:
      checkbox - the selected Checkbox
      searchFieldConditions - the Map<String,List<com.hybris.backoffice.widgets.advancedsearch.impl.SearchConditionData>> containing all the search conditions
      advancedSearchData - the AdvancedSearchData
    • buildSearchQuery

      protected FlexibleSearchQuery buildSearchQuery(String typeCode, String searchValue)
      Parameters:
      typeCode - the DataType.code
      searchValue - the search value
      Returns:
      the created FlexibleSearchQuery
    • loadDataTypeForCode

      protected com.hybris.cockpitng.dataaccess.facades.type.DataType loadDataTypeForCode(String typeCode)
      Loads a DataType by its code.
      Parameters:
      typeCode - the DataType.code
      Returns:
      the DataType retrieved
    • loadRefineByConfiguration

      protected RefineBy loadRefineByConfiguration(String typeCode)
      Loads the configuration of the refine by according to the given type.
      Parameters:
      typeCode - the DataType.code
      Returns:
      the completed RefineBy
    • renderCheckbox

      protected void renderCheckbox(String searchFieldName, ArrayList searchFieldPossibleValues, String typeCode, SearchValue searchFieldValue, org.zkoss.zul.Div searchFieldDiv)
      Render a checkbox with her associated hidden Label which contains the search value.
      Parameters:
      searchFieldName - the name of the field to search on
      searchFieldPossibleValues - the list of search expressions to search
      typeCode - the DataType.code
      searchFieldValue - the value of the field to search
      searchFieldDiv - the Div to which the checkbox will be added
    • renderRefineByFromConfig

      protected void renderRefineByFromConfig(String typeCode)
      Renders the filters based on warehousingbackoffice-refine-by configuration.
      Parameters:
      typeCode - the DataType.code
    • resetWidget

      protected void resetWidget()
      Resets the content of the filter container.
    • submitFilter

      protected void submitFilter(org.zkoss.zk.ui.event.Event event)
      Submits a new search on checkbox selection.
      Parameters:
      event - the click event on one of the checkboxes
    • getRefineByConfig

      protected RefineBy getRefineByConfig()
    • setRefineByConfig

      public void setRefineByConfig(RefineBy refineByConfig)
    • getWarehousingFilterContainer

      protected org.zkoss.zul.Div getWarehousingFilterContainer()
    • setWarehousingFilterContainer

      public void setWarehousingFilterContainer(org.zkoss.zul.Div warehousingFilterContainer)
    • getEmptyFilters

      protected org.zkoss.zul.Label getEmptyFilters()
    • setEmptyFilters

      public void setEmptyFilters(org.zkoss.zul.Label emptyFilters)
    • getTypeFacade

      protected com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade()
    • setTypeFacade

      public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
    • getFlexibleSearchService

      protected FlexibleSearchService getFlexibleSearchService()
    • setFlexibleSearchService

      public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
    • getEnumerationService

      protected EnumerationService getEnumerationService()
    • setEnumerationService

      public void setEnumerationService(EnumerationService enumerationService)