org.rivetlogic.scar.util
Class TreeUtil
java.lang.Object
org.rivetlogic.scar.util.TreeUtil
public class TreeUtil
- extends java.lang.Object
Utilities class containing static methods to help with UI tree building and actions.
- Author:
- Rivet Logic Corporation
|
Method Summary |
static java.util.Collection<org.richfaces.model.TreeNode<TreeNodeData>> |
buildRichSubTreeStructure(java.util.List<com.rivetlogic.core.cma.repo.Node> raarNodes,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> flatTreeTable)
|
static org.richfaces.model.TreeNode<CategoryNodeData> |
buildRichTreeCategoryStructure(java.util.Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> categoryAssocs,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<CategoryNodeData>> table)
|
static org.richfaces.model.TreeNode<TreeNodeData> |
buildRichTreeStructure(java.util.List<com.rivetlogic.core.cma.repo.Node> raarNodes,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
builds a tree structure to be used in the UI, and saves all tree nodes into the supplied Hashtable
for use in manipulating the tree. |
protected static java.lang.String |
createExclusionPathQuery(java.util.List<java.lang.String> includedPaths,
java.util.List<java.lang.String> excludedPaths)
|
protected static java.lang.String |
generatePathQuery(java.util.List<java.lang.String> nodePaths,
java.util.List<java.lang.String> excludedPaths)
|
static void |
generateTreeRoots(java.util.List<org.richfaces.model.TreeNode<TreeNodeData>> treeRoots,
java.util.List<com.rivetlogic.core.cma.repo.Node> raarNodes,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
|
static java.util.List<com.rivetlogic.core.cma.repo.Node> |
getAllChildFoldersByPath(RaarServices raarServices,
com.rivetlogic.core.cma.repo.Ticket ticket,
java.lang.String path)
|
static java.util.List<com.rivetlogic.core.cma.repo.Node> |
getAllChildFoldersByRef(RaarServices raarServices,
com.rivetlogic.core.cma.repo.Ticket ticket,
org.alfresco.service.cmr.repository.NodeRef rootRef)
|
static java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> |
getImmediateChildren(RaarServices raarServices,
com.rivetlogic.core.cma.repo.Ticket ticket,
org.alfresco.service.cmr.repository.NodeRef nodeRef)
|
static org.alfresco.service.cmr.repository.NodeRef |
getParent(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.richfaces.model.TreeNode<NodeData> data)
|
static void |
removeTreeChildren(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
|
static void |
removeTreeChildren(org.richfaces.model.TreeNode<TreeNodeData> treeNode,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeUtil
public TreeUtil()
getAllChildFoldersByRef
public static java.util.List<com.rivetlogic.core.cma.repo.Node> getAllChildFoldersByRef(RaarServices raarServices,
com.rivetlogic.core.cma.repo.Ticket ticket,
org.alfresco.service.cmr.repository.NodeRef rootRef)
- Parameters:
raarServices - RAAR services to pass on to RaarUtil methodsticket - Ticket obtained post authenticationrootRef - NodeRef of the node to get children for
- Returns:
- a flat list of all child folders of rootRef recursively.
getAllChildFoldersByPath
public static java.util.List<com.rivetlogic.core.cma.repo.Node> getAllChildFoldersByPath(RaarServices raarServices,
com.rivetlogic.core.cma.repo.Ticket ticket,
java.lang.String path)
- Parameters:
raarServices - RAAR services to pass on to RaarUtil methodsticket - Ticket obtained post authenticationpath - path of the node to start with and recurse under
- Returns:
- a flat list of all child folders of the node specified by
path recursively.
buildRichTreeStructure
public static org.richfaces.model.TreeNode<TreeNodeData> buildRichTreeStructure(java.util.List<com.rivetlogic.core.cma.repo.Node> raarNodes,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
- builds a tree structure to be used in the UI, and saves all tree nodes into the supplied
Hashtable
for use in manipulating the tree.
- Parameters:
raarNodes - the nodes to build the tree with.table - the table to populate with nodes from the tree.
- Returns:
- the root
TreeNode that contains the entire tree structure.
removeTreeChildren
public static void removeTreeChildren(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
removeTreeChildren
public static void removeTreeChildren(org.richfaces.model.TreeNode<TreeNodeData> treeNode,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
getImmediateChildren
public static java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> getImmediateChildren(RaarServices raarServices,
com.rivetlogic.core.cma.repo.Ticket ticket,
org.alfresco.service.cmr.repository.NodeRef nodeRef)
generatePathQuery
protected static java.lang.String generatePathQuery(java.util.List<java.lang.String> nodePaths,
java.util.List<java.lang.String> excludedPaths)
createExclusionPathQuery
protected static java.lang.String createExclusionPathQuery(java.util.List<java.lang.String> includedPaths,
java.util.List<java.lang.String> excludedPaths)
generateTreeRoots
public static void generateTreeRoots(java.util.List<org.richfaces.model.TreeNode<TreeNodeData>> treeRoots,
java.util.List<com.rivetlogic.core.cma.repo.Node> raarNodes,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> table)
buildRichTreeCategoryStructure
public static org.richfaces.model.TreeNode<CategoryNodeData> buildRichTreeCategoryStructure(java.util.Collection<org.alfresco.service.cmr.repository.ChildAssociationRef> categoryAssocs,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<CategoryNodeData>> table)
buildRichSubTreeStructure
public static java.util.Collection<org.richfaces.model.TreeNode<TreeNodeData>> buildRichSubTreeStructure(java.util.List<com.rivetlogic.core.cma.repo.Node> raarNodes,
java.util.Hashtable<org.alfresco.service.cmr.repository.NodeRef,org.richfaces.model.TreeNode<TreeNodeData>> flatTreeTable)
getParent
public static org.alfresco.service.cmr.repository.NodeRef getParent(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.richfaces.model.TreeNode<NodeData> data)
- Parameters:
nodeRef - data -
- Returns:
- a NodeRef that represents the parent node of the node associated with the supplied NodeRef
Copyright 2008, Rivet Logic Corporation.