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>
children
protected AuthorizableModel
model
protected String
name
static Comparator<TreeNode>
NODE_COMPARATOR
protected String
path
static Map<String,String>
PATH_TO_TYPE
protected String
type
static String
TYPE_FOLDER
static String
TYPE_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 void
addNode(@NotNull TreeNode treeNode)
protected @NotNull TreeNode
createFolder(@NotNull String path)
@Nullable AuthorizableModel
getModel()
@Nullable String
getName()
static @NotNull String
getName(@NotNull String path)
@Nullable TreeNode
getNode(@NotNull String nodePath)
Collection<TreeNode>
getNodes()
@NotNull String
getPath()
@NotNull String
getType()
boolean
isAuthorizable()
void
toJson(@NotNull com.google.gson.stream.JsonWriter writer, boolean recursive)
protected void
toJsonData(@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
-
-