Class NaviTreeNode

    • Field Detail

      • NODE_ATTR_FILEUPLOAD_TARGET

        public static final java.lang.String NODE_ATTR_FILEUPLOAD_TARGET
        Attribute used to set the target component for fileupload-events.
        See Also:
        Constant Field Values
      • modelNaviNode

        protected NavigationNode modelNaviNode
        Model node of this view node.
      • countLabel

        protected org.zkoss.zul.Label countLabel
        Label holder for document counts.
      • onClickListener

        protected transient org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> onClickListener
        The onclick event listener of this node.
    • Constructor Detail

      • NaviTreeNode

        protected NaviTreeNode​(NavigationViewImpl naviView,
                               NavigationTree tree,
                               org.zkoss.zul.Treechildren parent)
        Constructor for root level folders.
        Parameters:
        naviView - navigation view
        tree - model navigation tree
        parent - parent tree element
    • Method Detail

      • addTreeRow

        protected final void addTreeRow​(boolean selectionMode)
        Add tree row and register event listeners.
        Parameters:
        selectionMode - selection mode enabled or disabled
      • getTreeCell

        protected org.zkoss.zul.Treecell getTreeCell()
        Returns:
        Treecell
      • setTreecells

        protected void setTreecells​(java.util.List<org.zkoss.zul.Treecell> newCells)
        Parameters:
        newCells - New cells
      • clearChildren

        protected void clearChildren()
        Clear children.
      • createTreerow

        protected void createTreerow()
        Creates a new treerow.
      • createCells

        protected java.util.List<org.zkoss.zul.Treecell> createCells()
        Creates the ZK Treecells to display this tree node.
        Returns:
        a list of the created Treecells.
      • getCountValue

        protected java.lang.String getCountValue()
        Builds and returns the value of this nodes count label.
        Returns:
        the value of this nodes count label.
      • updateCounter

        public void updateCounter​(com.saperion.folder.FolderUpdateInfo folderUpdateInfo)
        Updates the count label of this node.
        Parameters:
        folderUpdateInfo - The FolderUpdateInfo describing the update values.
      • updateCounter

        public void updateCounter​(com.saperion.wf.BoxCount count)
        Updates the count label of this node.
        Parameters:
        count - count for a workflow inbox
      • getDroppableIdentifiers

        protected java.lang.String getDroppableIdentifiers()
        Returns a comma separated string with the identifiers of items that can be dropped on this item or 'false'/'true' if no/all items can be dropped on this item.
        Returns:
        identifiers of droppable items
      • getDragableIdentifiers

        protected java.lang.String getDragableIdentifiers()
        Returns:
        Dragable identifier
      • addOnDoubleClickEventListener

        protected void addOnDoubleClickEventListener()
        Add double click event listener.
      • addOnOpenEventListener

        protected void addOnOpenEventListener()
        Add on open event listener, should load children on demand.
      • openNode

        protected void openNode()
        Expands the node.
      • addContextMenu

        protected void addContextMenu()
        Add context menu.
      • addMainContextMenu

        protected void addMainContextMenu()
        Add main context menu.
      • shouldCreateWebpartFolderMenuItem

        protected boolean shouldCreateWebpartFolderMenuItem()
        Determines if WebpartFolderMenuItem should be created.
        Returns:
        true if WebpartFolderMenuItem should be created, false otherwise.
      • addCreateCollectionMenuItem

        protected void addCreateCollectionMenuItem()
      • addMenuItem

        protected void addMenuItem​(org.zkoss.zul.Menuitem item,
                                   boolean withSeparator)
        Adds a new item to the context menu.
        Parameters:
        item - the new item
        withSeparator - adds a separator before the item if necessary
      • addSeparator

        protected void addSeparator()
        Add separator.
      • addRefreshMenuItem

        protected void addRefreshMenuItem()
        Adds refresh menu item.
      • addEmptyMenuItem

        protected void addEmptyMenuItem()
        Empty menu item.
      • addFastAccessMenuItem

        protected boolean addFastAccessMenuItem()
        Fast access context menu.
        Returns:
        true if menu item was added
      • getNavigationPresenter

        protected NavigationPresenter getNavigationPresenter()
        Returns:
        Navigation presenter
      • addCreateFolderMenuItem

        protected boolean addCreateFolderMenuItem()
        Add menu item for creating folder.
        Returns:
        true if item was created
      • addRenameFolderMenuItem

        protected boolean addRenameFolderMenuItem()
        Add menu item for delete folder.
        Returns:
        true if item was created
      • addEditFolderPropertiesMenuItem

        protected void addEditFolderPropertiesMenuItem()
        Adds the menu item to edit the folder's properties.
      • addSearchFolderMenuItem

        protected void addSearchFolderMenuItem()
        Adds the menu item to search for folders with a mask.
      • addOnClickEventListener

        protected void addOnClickEventListener()
        Adds the event listener for onClick event. Override this method to listen to click events.
      • raiseTabClear

        protected void raiseTabClear()
        Raise tab clear.
      • addDeleteFolderMenuItem

        protected boolean addDeleteFolderMenuItem()
        Add delete folder menu item.
        Returns:
        true if item was created
      • addFolderSecurityMenuItem

        protected boolean addFolderSecurityMenuItem()
        Add folder security menu item.
        Returns:
        true if item was created
      • addUploadMenuItem

        protected boolean addUploadMenuItem()
        Add folder security menu item.
        Returns:
        true if item was created
      • render

        public void render()
        Renders the children of this node based on the given model node.
        Specified by:
        render in interface NaviNodeAccessor
      • getMenuPopup

        protected org.zkoss.zul.Menupopup getMenuPopup()
        Returns:
        Menu popup
      • getNavigationView

        protected NavigationViewImpl getNavigationView()
        Returns:
        navigation view - root panel element.
      • compareTo

        public int compareTo​(NaviTreeNode o)
        Specified by:
        compareTo in interface java.lang.Comparable<NaviTreeNode>
        See Also:
        Comparable.compareTo(java.lang.Object)
      • getEventtarget

        public java.util.Set<org.zkoss.zk.ui.Component> getEventtarget​(java.lang.String eventName)
        Reads the event target for the given event name, if set or the root element.
        Specified by:
        getEventtarget in interface EventChild
        Parameters:
        eventName - Event name or null for main target
        Returns:
        Set of event targets
        See Also:
        EventChildHandlerImpl.getEventtarget(java.lang.String)
      • getEventProvider

        protected EventChildHandler getEventProvider()
        Returns the event provider.
        Returns:
        event provider
      • moveFolder

        protected void moveFolder​(NaviTreeNode sourceNode)
                           throws NgcUiException
        Moves a folder to another.
        Parameters:
        sourceNode - the node which has to be included before this node.
        Throws:
        NgcUiException - exception to be handled by view
      • refreshCurrentNode

        protected void refreshCurrentNode​(boolean includeChildren)
                                   throws AuthenticationException,
                                          NgcUiException
        Refreshes the current node. Optional boolean parameter to update children laying under the current node.
        Parameters:
        includeChildren - Shall the children of the current node be updated, too?
        Throws:
        AuthenticationException - AuthentificationException
        NgcUiException - NgcUiException
      • getMaskDDC

        public java.lang.String getMaskDDC()
        Reads the mask ddc name. (Traverses the tree upwards to search).
        Returns:
        Mask ddc name or null, if not found.
      • unregisterChildrensColumns

        protected void unregisterChildrensColumns()
        Unregisters the columns used by the child nodes at the column manager.
      • registerChildrensColumns

        protected void registerChildrensColumns()
        Registers the columns used by the child nodes at the column manager.
      • getContextCreator

        protected NodeContextMenuCreator getContextCreator()
        Returns:
        the context menu item creator
      • generateUUID

        public java.lang.String generateUUID()
        Specified by:
        generateUUID in interface Identifiable
        Returns:
        the generated uuid for the DOM tree
      • hideChildren

        public boolean hideChildren()
        Checks if this node will hide it's children or not. Other node-types can override this method to decide whether to hide children or not.
        Returns:
        hide children or not
      • onPageDetached

        public void onPageDetached​(org.zkoss.zk.ui.Page page)
        Specified by:
        onPageDetached in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        onPageDetached in class org.zkoss.zk.ui.AbstractComponent
      • getDefaultMenuRights

        public NaviMenuRights getDefaultMenuRights()
        This method returns the default NaviMenuRights for the context menu containing all rights. This method is supposed to be overridden in extending classes to handle node type specific rights.
        Returns:
        default menu rights