Package org.exoplatform.wiki.tree.utils
Class TreeUtils
java.lang.Object
org.exoplatform.wiki.tree.utils.TreeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<JsonNodeData> cleanDraftChildren(List<JsonNodeData> children, Locale locale) static TreeNodegetDescendants(WikiPageParams params, HashMap<String, Object> context, String userId) Create a tree node contain all its descendant with a givenWikiPageParamsstatic StringgetLocatedLangDisplayName(List<Locale> localesList, Locale currentLocale, String lang) static WikiPageParamsgetPageParamsFromPath(String path) static Stringstatic TreeNodegetTreeNode(WikiPageParams params) Create a tree node with a givenWikiPageParamsstatic List<JsonNodeData> tranformToJson(TreeNode treeNode, HashMap<String, Object> context)
-
Constructor Details
-
TreeUtils
public TreeUtils()
-
-
Method Details
-
getTreeNode
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 ExceptionCreate 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
- Throws:
Exception
-
getPathFromPageParams
-
cleanDraftChildren
-
getLocatedLangDisplayName
-