Class FolderTreeNode
- java.lang.Object
-
- org.hippoecm.frontend.model.NodeModelWrapper<JcrTreeNode>
-
- org.hippoecm.frontend.model.tree.JcrTreeNode
-
- org.hippoecm.frontend.plugins.standards.tree.FolderTreeNode
-
- All Implemented Interfaces:
Serializable
,TreeNode
,org.apache.wicket.model.IDetachable
,org.apache.wicket.model.IModel<JcrTreeNode>
,org.apache.wicket.util.io.IClusterable
,IJcrTreeNode
public class FolderTreeNode extends JcrTreeNode
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hippoecm.frontend.model.NodeModelWrapper
nodeModel
-
-
Constructor Summary
Constructors Constructor Description FolderTreeNode(JcrNodeModel model, DocumentListFilter config)
Constructs a folder tree node usingmodel
andconfig
.FolderTreeNode(JcrNodeModel model, DocumentListFilter config, Comparator<IJcrTreeNode> subfolderComparator)
Constructs a folder tree node usingmodel
,config
andsubfolderComparator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JcrTreeNode
createChildJcrTreeNode(JcrNodeModel childNodeModel)
Creates child tree node.int
getChildCount()
boolean
isLeaf()
protected List<javax.jcr.Node>
loadChildNodes()
Loads child nodes.protected void
sortChildTreeNodes(List<IJcrTreeNode> childTreeNodes)
Sort child tree nodes.-
Methods inherited from class org.hippoecm.frontend.model.tree.JcrTreeNode
children, detach, ensureChildrenSorted, equals, getAllowsChildren, getChild, getChildAt, getIndex, getParent, hashCode, loadChildren, 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
-
FolderTreeNode
public FolderTreeNode(JcrNodeModel model, DocumentListFilter config)
Constructs a folder tree node usingmodel
andconfig
.- Parameters:
model
- jcr folder node modelconfig
- document list filtering configuration
-
FolderTreeNode
public FolderTreeNode(JcrNodeModel model, DocumentListFilter config, Comparator<IJcrTreeNode> subfolderComparator)
Constructs a folder tree node usingmodel
,config
andsubfolderComparator
.If non-null
subfolderComparator
is provided, subfolders are sorted by the given comparator. And,- Parameters:
model
- jcr folder node modelconfig
- document list filtering configurationsubfolderComparator
- subfolder comparator used in sorting if non-null object is provided
-
-
Method Detail
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfaceTreeNode
- Overrides:
isLeaf
in classJcrTreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfaceTreeNode
- Overrides:
getChildCount
in classJcrTreeNode
-
loadChildNodes
protected List<javax.jcr.Node> loadChildNodes() throws javax.jcr.RepositoryException
Loads child nodes.Overrides to filter out child nodes based on folder filter configuration.
- Overrides:
loadChildNodes
in classJcrTreeNode
- Returns:
- loaded child nodes
- Throws:
javax.jcr.RepositoryException
- if repository exception occurs
-
createChildJcrTreeNode
protected JcrTreeNode createChildJcrTreeNode(JcrNodeModel childNodeModel)
Creates child tree node.Overrides to create
FolderTreeNode
instead ofJcrTreeNode
.- Overrides:
createChildJcrTreeNode
in classJcrTreeNode
- Parameters:
childNodeModel
- child node model- Returns:
- child tree node.
-
sortChildTreeNodes
protected void sortChildTreeNodes(List<IJcrTreeNode> childTreeNodes) throws javax.jcr.RepositoryException
Sort child tree nodes.Overrides to sort children by the
subfolderComparator
if set to any. Otherwise, follow the default behavior ofJcrTreeNode
.- Overrides:
sortChildTreeNodes
in classJcrTreeNode
- Parameters:
childTreeNodes
- child tree nodes- Throws:
javax.jcr.RepositoryException
- if repository exception occurs
-
-