Class TreeCatViewTag.TreeCatView

    • Constructor Detail

      • TreeCatView

        public TreeCatView()
    • Method Detail

      • isTreeSelectable

        public boolean isTreeSelectable()
      • setTreeSelectable

        public void setTreeSelectable​(java.lang.Boolean treeSelectable)
      • isShowReadable

        public boolean isShowReadable()
      • setShowReadable

        public void setShowReadable​(java.lang.Boolean showReadable)
      • isShowEdit

        public boolean isShowEdit()
      • setShowEdit

        public void setShowEdit​(java.lang.Boolean showEdit)
      • isShowRights

        public boolean isShowRights()
      • setShowRights

        public void setShowRights​(java.lang.Boolean showRights)
      • isShowWorkspace

        public boolean isShowWorkspace()
      • setShowWorkspace

        public void setShowWorkspace​(java.lang.Boolean showWorkspace)
      • isShowWorkspaceIcon

        public boolean isShowWorkspaceIcon()
      • setShowWorkspaceIcon

        public void setShowWorkspaceIcon​(java.lang.Boolean showWorkspaceIcon)
      • isShowPortal

        public boolean isShowPortal()
      • setShowPortal

        public void setShowPortal​(java.lang.Boolean showPortal)
      • isShowPubCount

        public boolean isShowPubCount()
      • setShowPubCount

        public void setShowPubCount​(java.lang.Boolean showPubCount)
      • isShowCtxMenu

        public boolean isShowCtxMenu()
      • setShowCtxMenu

        public void setShowCtxMenu​(java.lang.Boolean showCtxMenu)
      • setExactRoot

        public void setExactRoot​(java.lang.Boolean exactRoot)
      • isExactRoot

        public boolean isExactRoot()
      • getMemberRoots

        public java.util.Collection<Category> getMemberRoots()
      • setMemberRoots

        public void setMemberRoots​(java.util.Collection<Category> memberRoots)
      • getTreeLink

        public java.lang.String getTreeLink​(Data node,
                                            JcmsJspContext ctxt)
        Return the links associated to the given Data
        Overrides:
        getTreeLink in class TreeViewTag.TreeView
        Parameters:
        node - the Data
        ctxt - the JcmsJspContext
        Returns:
        String link
      • filterRights

        public void filterRights​(JcmsJspContext ctxt,
                                 java.util.Collection<Category> nodes)
        Filter node's collection with given parameter and filter
        Parameters:
        ctxt - JcmsJspContext to retrieve context
        nodes - a Collection of categories
      • handleDragDrop

        public void handleDragDrop​(JcmsJspContext ctxt)
        Handle Actions like drag and drop
        Parameters:
        ctxt - the current JcmsJspContext
      • isDisabled

        public boolean isDisabled​(TreeNode treeNode)
        Returns true if given Category is disabled
        Overrides:
        isDisabled in class TreeViewTag.TreeView
        Parameters:
        treeNode - the Category to work with
        Returns:
        true if disabled
      • getItemCss

        public java.lang.String getItemCss​(TreeNode treeNode,
                                           Member member,
                                           Workspace workspace)
        Returns a string representing CSS classes appended to the tree item (eg. <li class="treeview-item"> ...).
        Overrides:
        getItemCss in class TreeViewTag.TreeView
        Parameters:
        treeNode - current node to display
        member - Current member
        workspace - Current workspace
        Returns:
        String representing CSS classes
      • hasAnyUnread

        public boolean hasAnyUnread​(Category cat,
                                    Member loggedMember)
        Check if the given Category or it's descendant has any unread publication for given Member
        Parameters:
        cat - the Category to work with
        loggedMember - the to check
        Returns:
        true if there is unread publication
      • getPortalSet

        public java.util.Set<PortalInterface> getPortalSet​(Category cat,
                                                           Member loggedMember)
        Returns the Set of PortalInterface bind to given Category and readable by given Member
        Parameters:
        cat - the Category to work with
        loggedMember - the Member to check rights
        Returns:
        Set of matching PortalInterface
      • getPortalIcon

        public java.lang.String getPortalIcon​(java.util.Set<PortalInterface> set)
        Returns the best matching icon for the given Set of PortalInterface.
        Parameters:
        set - of PortalInterface
        Returns:
        String the icon treeview class
      • getPortalIconTitle

        public java.lang.String getPortalIconTitle​(java.util.Set<PortalInterface> set,
                                                   Member member,
                                                   java.lang.String lang)
        Returns the best matching icon title for the given Set of PortalInterface.
        Parameters:
        set - of PortalInterface
        member - current Member
        lang - current language
        Returns:
        String the icon title
      • getWorkspaceSet

        public java.util.Set<Workspace> getWorkspaceSet​(Category cat,
                                                        Member loggedMember,
                                                        boolean model)
        Returns the Set of Workspace bind to given Category and readable by given Member.
        Parameters:
        cat - the Category to work with
        loggedMember - the Member to check rights
        model - false to skip Workspace models
        Returns:
        Set of matching PortalInterface
      • getWorkspaceIcon

        public java.lang.String getWorkspaceIcon​(java.util.Set<Workspace> set)
        Returns the best matching icon for the given Set of Workspace.
        Parameters:
        set - of Workspace
        Returns:
        String the <i> treeview class
      • getWorkspaceIconTitle

        public java.lang.String getWorkspaceIconTitle​(java.util.Set<Workspace> set,
                                                      java.lang.String lang)
        Returns the best matching icon title for the given Set of Workspace.
        Parameters:
        set - of Workspace
        lang - current language
        Returns:
        String the icon title