Package org.hippoecm.frontend.model.tree
Class JcrTreeNode
- java.lang.Object
-
- org.hippoecm.frontend.model.NodeModelWrapper<JcrTreeNode>
-
- org.hippoecm.frontend.model.tree.JcrTreeNode
-
- All Implemented Interfaces:
Serializable
,TreeNode
,org.apache.wicket.model.IDetachable
,org.apache.wicket.model.IModel<JcrTreeNode>
,org.apache.wicket.util.io.IClusterable
,IJcrTreeNode
- Direct Known Subclasses:
FolderTreeNode
public class JcrTreeNode extends NodeModelWrapper<JcrTreeNode> implements IJcrTreeNode
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hippoecm.frontend.model.NodeModelWrapper
nodeModel
-
-
Constructor Summary
Constructors Constructor Description JcrTreeNode(org.apache.wicket.model.IModel<Node> nodeModel, IJcrTreeNode parent)
JcrTreeNode(org.apache.wicket.model.IModel<Node> nodeModel, IJcrTreeNode parent, Comparator<IJcrTreeNode> childComparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumeration<? extends TreeNode>
children()
protected JcrTreeNode
createChildJcrTreeNode(JcrNodeModel childNodeModel)
Creates child tree node.void
detach()
void
ensureChildrenSorted()
Ensure child tree nodes sorted properly.boolean
equals(Object object)
boolean
getAllowsChildren()
IJcrTreeNode
getChild(String name)
Resolve the child that corresponds to a particular name.TreeNode
getChildAt(int i)
int
getChildCount()
int
getIndex(TreeNode node)
TreeNode
getParent()
int
hashCode()
boolean
isLeaf()
protected List<Node>
loadChildNodes()
Loads child nodes.protected List<IJcrTreeNode>
loadChildren()
Loads child tree nodes.protected void
sortChildTreeNodes(List<IJcrTreeNode> childTreeNodes)
Sort child tree nodes.String
toString()
-
Methods inherited from class org.hippoecm.frontend.model.NodeModelWrapper
getNode, getNodeModel, getObject, setNodeModel, setObject
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hippoecm.frontend.model.tree.IJcrTreeNode
getNodeModel
-
-
-
-
Constructor Detail
-
JcrTreeNode
public JcrTreeNode(org.apache.wicket.model.IModel<Node> nodeModel, IJcrTreeNode parent)
-
JcrTreeNode
public JcrTreeNode(org.apache.wicket.model.IModel<Node> nodeModel, IJcrTreeNode parent, Comparator<IJcrTreeNode> childComparator)
-
-
Method Detail
-
getChild
public IJcrTreeNode getChild(String name) throws RepositoryException
Resolve the child that corresponds to a particular name.- Specified by:
getChild
in interfaceIJcrTreeNode
- Parameters:
name
-- Returns:
- child node
- Throws:
RepositoryException
-
children
public Enumeration<? extends TreeNode> children()
-
getChildAt
public TreeNode getChildAt(int i)
- Specified by:
getChildAt
in interfaceTreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfaceTreeNode
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interfaceTreeNode
-
ensureChildrenSorted
public void ensureChildrenSorted()
Ensure child tree nodes sorted properly.
-
detach
public void detach()
- Specified by:
detach
in interfaceorg.apache.wicket.model.IDetachable
- Specified by:
detach
in interfaceorg.apache.wicket.model.IModel<JcrTreeNode>
- Overrides:
detach
in classNodeModelWrapper<JcrTreeNode>
-
loadChildren
protected List<IJcrTreeNode> loadChildren() throws RepositoryException
Loads child tree nodes.- Returns:
- loaded child tree nodes
- Throws:
RepositoryException
- if repository exception occurs
-
loadChildNodes
protected List<Node> loadChildNodes() throws RepositoryException
Loads child nodes.- Returns:
- loaded child nodes
- Throws:
RepositoryException
- if repository exception occurs
-
createChildJcrTreeNode
protected JcrTreeNode createChildJcrTreeNode(JcrNodeModel childNodeModel)
Creates child tree node.- Parameters:
childNodeModel
- child node model- Returns:
- child tree node.
-
sortChildTreeNodes
protected void sortChildTreeNodes(List<IJcrTreeNode> childTreeNodes) throws RepositoryException
Sort child tree nodes.- Parameters:
childTreeNodes
- child tree nodes- Throws:
RepositoryException
- if repository exception occurs
-
-