java.lang.Object
de.hybris.platform.configurablebundlecockpits.productcockpit.navigationnode.browserarea.tree.BundleNavigationNodeController
All Implemented Interfaces:
SelectableComponent<Tree,org.zkoss.zul.Treeitem,TypedObject>, TreeController<TypedObject>

public class BundleNavigationNodeController extends Object implements TreeController<TypedObject>
Controller of 'navigation node' tree, see related class: BundleNavigationNodeBrowserModel
Spring Bean ID:
navigationNodeController
  • Constructor Details

    • BundleNavigationNodeController

      public BundleNavigationNodeController()
  • Method Details

    • selected

      public void selected(Tree tree, Set<org.zkoss.zul.Treeitem> selectedTreeItems)
      Description copied from interface: SelectableComponent
      Called every time the tree node was selected
      Specified by:
      selected in interface SelectableComponent<Tree,org.zkoss.zul.Treeitem,TypedObject>
      Parameters:
      tree - in case an update is needed
      selectedTreeItems - set of currently selected items
    • getSelected

      public Set<TypedObject> getSelected()
      Specified by:
      getSelected in interface SelectableComponent<Tree,org.zkoss.zul.Treeitem,TypedObject>
      Returns:
      currently selected set of items
    • create

      public TypedObject create(Tree tree, TypedObject target)
      Description copied from interface: TreeController
      Creates new object as a child of 'target' node
      Specified by:
      create in interface TreeController<TypedObject>
      Parameters:
      tree - after successful creation, tree will be notified to update itself
      target - that will have new 'object' added.
      Returns:
      created object
    • create

      public TypedObject create(Tree tree, TypedObject target, int index)
      Description copied from interface: TreeController
      Creates new object as a child of 'target' node
      Specified by:
      create in interface TreeController<TypedObject>
      Parameters:
      tree - after successful creation, tree will be notified to update itself
      target - that will have new 'object' added.
      index - at which the new 'object' will be added within 'target' child set
      Returns:
      created object
    • add

      public void add(Tree tree, Object object, TypedObject target)
      Description copied from interface: TreeController
      Adds given object as a child of 'target' node (by default as last child), if null then new object is created
      Specified by:
      add in interface TreeController<TypedObject>
      Parameters:
      tree - after successful addition, tree will be notified to update itself
      object - e.g. the dragged component which contains something to add to the 'target' node, null indicates that new object shall be created or anything else
      target - that will have 'object' added.
    • move

      public void move(Tree tree, TypedObject node, TypedObject target, boolean addAsChild)
      Description copied from interface: TreeController
      Moves given node in place of 'target' node.
      Specified by:
      move in interface TreeController<TypedObject>
      Parameters:
      tree - after successful movement, tree will be notified to update itself
      node - to be moved
      target - node to be shifted. In place of this 'target' node the 'node' will be moved.
      addAsChild - flag indicating whether node should be added as a child or not.
    • add

      public void add(Tree tree, Object object, TypedObject target, int index)
      Description copied from interface: TreeController
      Adds given object as a child of 'target' node, if null then new object is created
      Specified by:
      add in interface TreeController<TypedObject>
      Parameters:
      tree - after successful addition, tree will be notified to update itself
      object - e.g. the dragged component which contains something to add to the 'target' node, or anything else
      target - that will have 'object' added.
      index - at which the 'object' will be added within 'target' child set
    • delete

      public void delete(Tree tree, TypedObject node)
      Description copied from interface: TreeController
      Deletes given node
      Specified by:
      delete in interface TreeController<TypedObject>
      Parameters:
      tree - after successful deletion, tree will be notified to update itself
      node - to delete
    • doubleClicked

      public void doubleClicked(Tree tree, TypedObject currentNode)
      Description copied from interface: TreeController
      Called when given node was double clicked in tree
      Specified by:
      doubleClicked in interface TreeController<TypedObject>
      Parameters:
      tree - to play with after whatever was done
      currentNode - which was double clicked
    • getBundleNavigationService

      public BundleNavigationService getBundleNavigationService()
    • setBundleNavigationService

      public void setBundleNavigationService(BundleNavigationService bundleNavigationService)
    • customAction

      public Object customAction(Tree tree, org.zkoss.zk.ui.event.Event event, TypedObject node)
      Description copied from interface: TreeController
      If some custom actions were added to the tree, this method will be called for each of them
      Specified by:
      customAction in interface TreeController<TypedObject>
      Parameters:
      tree - to play with if necessary
      event - original event that was sent when custom action button was clicked
      node - from selected tree item
      Returns:
      whatever you implement
    • refresh

      public void refresh(Tree tree)
    • refresh

      public void refresh(Tree tree, List<List<Integer>> openedNodes)
    • detachDialog

      protected void detachDialog(org.zkoss.zul.Window dialog)
    • addProductsToNode

      public void addProductsToNode(BundleTemplateModel bundleTemplateModel, Iterable<TypedObject> typedProductsToAdd)
      Adds new or existing products to the product list of a bundletemplate.
      Parameters:
      bundleTemplateModel -
      typedProductsToAdd -
    • getModelService

      protected ModelService getModelService()
    • getSystemService

      protected SystemService getSystemService()
    • getSynchronizationService

      protected SynchronizationService getSynchronizationService()
    • setSystemService

      public void setSystemService(SystemService systemService)
    • setModelService

      public void setModelService(ModelService modelService)
    • setSynchronizationService

      public void setSynchronizationService(SynchronizationService synchronizationService)
    • getFlexibleSearchService

      protected FlexibleSearchService getFlexibleSearchService()
    • setFlexibleSearchService

      public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
    • getBundleTreeController

      public BundleTreeController getBundleTreeController()
    • setBundleTreeController

      public void setBundleTreeController(BundleTreeController bundleTreeController)