Class TreeNode
- java.lang.Object
 - 
- com.composum.sling.core.usermanagement.model.TreeNode
 
 
- 
public class TreeNode extends Object
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected Map<String,TreeNode>childrenprotected AuthorizableModelmodelprotected Stringnamestatic Comparator<TreeNode>NODE_COMPARATORprotected Stringpathstatic Map<String,String>PATH_TO_TYPEprotected Stringtypestatic StringTYPE_FOLDERstatic StringTYPE_ROOT 
- 
Constructor Summary
Constructors Constructor Description TreeNode(@NotNull String type, @NotNull String path)TreeNode(AuthorizableModel model) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNode(@NotNull TreeNode treeNode)protected @NotNull TreeNodecreateFolder(@NotNull String path)@Nullable AuthorizableModelgetModel()@Nullable StringgetName()static @NotNull StringgetName(@NotNull String path)@Nullable TreeNodegetNode(@NotNull String nodePath)Collection<TreeNode>getNodes()@NotNull StringgetPath()@NotNull StringgetType()booleanisAuthorizable()voidtoJson(@NotNull com.google.gson.stream.JsonWriter writer, boolean recursive)protected voidtoJsonData(@NotNull com.google.gson.stream.JsonWriter writer, boolean loaded) 
 - 
 
- 
- 
Field Detail
- 
TYPE_ROOT
public static final String TYPE_ROOT
- See Also:
 - Constant Field Values
 
 
- 
TYPE_FOLDER
public static final String TYPE_FOLDER
- See Also:
 - Constant Field Values
 
 
- 
NODE_COMPARATOR
public static final Comparator<TreeNode> NODE_COMPARATOR
 
- 
type
protected final String type
 
- 
name
protected final String name
 
- 
path
protected final String path
 
- 
model
protected final AuthorizableModel model
 
 - 
 
- 
Constructor Detail
- 
TreeNode
public TreeNode(AuthorizableModel model)
 
 - 
 
- 
Method Detail
- 
isAuthorizable
public boolean isAuthorizable()
 
- 
getModel
@Nullable public @Nullable AuthorizableModel getModel()
 
- 
getType
@NotNull public @NotNull String getType()
 
- 
getName
@Nullable public @Nullable String getName()
 
- 
getPath
@NotNull public @NotNull String getPath()
 
- 
addNode
public void addNode(@NotNull @NotNull TreeNode treeNode) 
- 
getNodes
public Collection<TreeNode> getNodes()
 
- 
toJson
public void toJson(@NotNull @NotNull com.google.gson.stream.JsonWriter writer, boolean recursive) throws IOException- Throws:
 IOException
 
- 
toJsonData
protected void toJsonData(@NotNull @NotNull com.google.gson.stream.JsonWriter writer, boolean loaded) throws IOException- Throws:
 IOException
 
 - 
 
 -