public class FolderTreeNode extends JcrTreeNode
nodeModel
Constructor and Description |
---|
FolderTreeNode(JcrNodeModel model,
DocumentListFilter config)
Constructs a folder tree node using
model and config . |
FolderTreeNode(JcrNodeModel model,
DocumentListFilter config,
Comparator<IJcrTreeNode> subfolderComparator)
Constructs a folder tree node using
model , config and subfolderComparator . |
Modifier and Type | Method and 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.
|
children, detach, ensureChildrenSorted, equals, getAllowsChildren, getChild, getChildAt, getIndex, getParent, hashCode, loadChildren, toString
getChainedModel, getNode, getNodeModel, getObject, setChainedModel, setObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNodeModel
public FolderTreeNode(JcrNodeModel model, DocumentListFilter config)
model
and config
.model
- jcr folder node modelconfig
- document list filtering configurationpublic FolderTreeNode(JcrNodeModel model, DocumentListFilter config, Comparator<IJcrTreeNode> subfolderComparator)
model
, config
and subfolderComparator
.
If non-null subfolderComparator
is provided, subfolders are sorted by the given comparator.
And,
model
- jcr folder node modelconfig
- document list filtering configurationsubfolderComparator
- subfolder comparator used in sorting if non-null object is providedpublic boolean isLeaf()
isLeaf
in interface TreeNode
isLeaf
in class JcrTreeNode
public int getChildCount()
getChildCount
in interface TreeNode
getChildCount
in class JcrTreeNode
protected List<javax.jcr.Node> loadChildNodes() throws javax.jcr.RepositoryException
Overrides to filter out child nodes based on folder filter configuration.
loadChildNodes
in class JcrTreeNode
javax.jcr.RepositoryException
- if repository exception occursprotected JcrTreeNode createChildJcrTreeNode(JcrNodeModel childNodeModel)
Overrides to create FolderTreeNode
instead of JcrTreeNode
.
createChildJcrTreeNode
in class JcrTreeNode
childNodeModel
- child node modelprotected void sortChildTreeNodes(List<IJcrTreeNode> childTreeNodes) throws javax.jcr.RepositoryException
Overrides to sort children by the subfolderComparator
if set to any.
Otherwise, follow the default behavior of JcrTreeNode
.
sortChildTreeNodes
in class JcrTreeNode
childTreeNodes
- child tree nodesjavax.jcr.RepositoryException
- if repository exception occursCopyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.