Package org.exoplatform.wiki.tree.utils
Class TreeUtils
- java.lang.Object
-
- org.exoplatform.wiki.tree.utils.TreeUtils
-
public class TreeUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description TreeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TreeNodegetDescendants(WikiPageParams params, HashMap<String,Object> context, String userId)Create a tree node contain all its descendant with a givenWikiPageParamsstatic WikiPageParamsgetPageParamsFromPath(String path)static StringgetPathFromPageParams(WikiPageParams param)static TreeNodegetTreeNode(WikiPageParams params)Create a tree node with a givenWikiPageParamsstatic List<JsonNodeData>tranformToJson(TreeNode treeNode, HashMap<String,Object> context)
-
-
-
Method Detail
-
getTreeNode
public static TreeNode getTreeNode(WikiPageParams params) throws Exception
Create a tree node with a givenWikiPageParams- Parameters:
params- is the wiki page parameters- Returns:
TreeNode- Throws:
Exception- if an error occured
-
getDescendants
public static TreeNode getDescendants(WikiPageParams params, HashMap<String,Object> context, String userId) throws Exception
Create a tree node contain all its descendant with a givenWikiPageParams- Parameters:
params- is the wiki page parameterscontext- is the page tree contextuserId-- Returns:
TreeNode- Throws:
Exception- if error occured
-
tranformToJson
public static List<JsonNodeData> tranformToJson(TreeNode treeNode, HashMap<String,Object> context) throws Exception
- Throws:
Exception
-
getPageParamsFromPath
public static WikiPageParams getPageParamsFromPath(String path) throws Exception
- Throws:
Exception
-
getPathFromPageParams
public static String getPathFromPageParams(WikiPageParams param)
-
-