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
- See Also:
-
Field Summary
Fields inherited from class org.hippoecm.frontend.model.NodeModelWrapper
nodeModel
-
Constructor Summary
ConstructorDescriptionFolderTreeNode
(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
Modifier and TypeMethodDescriptionprotected JcrTreeNode
createChildJcrTreeNode
(JcrNodeModel childNodeModel) Creates child tree node.int
boolean
isLeaf()
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
Methods inherited from interface org.apache.wicket.model.IModel
as, combineWith, filter, flatMap, isPresent, map, orElse, orElseGet
-
Constructor Details
-
FolderTreeNode
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 Details
-
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
Loads child nodes.Overrides to filter out child nodes based on folder filter configuration.
- Overrides:
loadChildNodes
in classJcrTreeNode
- Returns:
- loaded child nodes
- Throws:
RepositoryException
- if repository exception occurs
-
createChildJcrTreeNode
Creates child tree node.Overrides to create
FolderTreeNode
instead ofJcrTreeNode
.- Overrides:
createChildJcrTreeNode
in classJcrTreeNode
- Parameters:
childNodeModel
- child node model- Returns:
- child tree node.
-
sortChildTreeNodes
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:
RepositoryException
- if repository exception occurs
-