public class RepositoryFileTree extends Object implements Comparable<RepositoryFileTree>, Serializable
RepositoryFile
and its immediate children.* The immediate children is a list of this type
(which can have children and so on). This class is immutable.
* This is necessary since a RepositoryFile
does not (by design) have a reference to its children. A
RepositoryFile
is meant to be a lightweight object representing metadata about a file in isolation. It
does not have references to other RepositoryFile
instances. The potential for misuse of a children field
on RepositoryFile
was great enough to warrant the creation of RepositoryFileTree
. This
separation of single file vs. tree is seen as a cleaner API with less confusion about when children is
populated.
Modifier and Type | Class and Description |
---|---|
static class |
RepositoryFileTree.Builder |
Constructor and Description |
---|
RepositoryFileTree(RepositoryFile file,
List<RepositoryFileTree> children) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RepositoryFileTree other)
Compare is based on the root file.
|
boolean |
equals(Object obj) |
List<RepositoryFileTree> |
getChildren()
Children can have one of three values:
null: children were not fetched; used for operations that support depth
empty list: there are no children for this file (i.e.
|
RepositoryFile |
getFile() |
Boolean |
getVersionCommentEnabled() |
Boolean |
getVersioningEnabled() |
int |
hashCode() |
void |
setVersionCommentEnabled(Boolean versionCommentEnabled) |
void |
setVersioningEnabled(Boolean versioningEnabled) |
String |
toString() |
protected String |
toString(int depth) |
public RepositoryFileTree(RepositoryFile file, List<RepositoryFileTree> children)
public RepositoryFile getFile()
public List<RepositoryFileTree> getChildren()
public int compareTo(RepositoryFileTree other)
compareTo
in interface Comparable<RepositoryFileTree>
protected String toString(int depth)
public Boolean getVersioningEnabled()
public void setVersioningEnabled(Boolean versioningEnabled)
public Boolean getVersionCommentEnabled()
public void setVersionCommentEnabled(Boolean versionCommentEnabled)
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.