public class TreeStack<T extends ContentMeta> extends DelegateTree<T>
Constructor and Description |
---|
TreeStack(java.util.List<? extends SelectiveTree<T>> treeHandlerList,
Tree<T> delegate) |
Modifier and Type | Method and Description |
---|---|
Resource<T> |
createResource(Path path,
T content)
Create a resource
|
boolean |
deleteResource(Path path)
Delete a resource at a path
|
Resource<T> |
getPath(Path path)
Return the resource or directory at the path
|
Resource<T> |
getResource(Path path)
Return the resource at the path
|
boolean |
hasDirectory(Path path)
Return true if a directory at the path exists
|
static boolean |
hasParentPath(Path path,
SelectiveTree<?> tree) |
boolean |
hasPath(Path path)
Return true if the path exists
|
boolean |
hasResource(Path path)
Return true if a resource at the path exists
|
java.util.Set<Resource<T>> |
listDirectory(Path path)
Return the set of resources at the directory path
|
java.util.Set<Resource<T>> |
listDirectoryResources(Path path)
Return the set of non-directory resources at the directory path
|
java.util.Set<Resource<T>> |
listDirectorySubdirs(Path path)
Return the set of sub directory resources within the directory path
|
static boolean |
matchesPath(Path path,
SelectiveTree<?> tree) |
Resource<T> |
updateResource(Path path,
T content)
Update an existing resource
|
getDelegate, setDelegate
createResource, deleteResource, getPath, getResource, hasDirectory, hasPath, hasResource, listDirectory, listDirectoryResources, listDirectorySubdirs, updateResource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createResource, deleteResource, getPath, getResource, hasDirectory, hasPath, hasResource, listDirectory, listDirectoryResources, listDirectorySubdirs, updateResource
public TreeStack(java.util.List<? extends SelectiveTree<T>> treeHandlerList, Tree<T> delegate)
public Resource<T> getResource(Path path)
Tree
getResource
in interface Tree<T extends ContentMeta>
getResource
in class DelegateTree<T extends ContentMeta>
path
- pathpublic Resource<T> getPath(Path path)
Tree
getPath
in interface Tree<T extends ContentMeta>
getPath
in class DelegateTree<T extends ContentMeta>
path
- pathpublic java.util.Set<Resource<T>> listDirectoryResources(Path path)
Tree
listDirectoryResources
in interface Tree<T extends ContentMeta>
listDirectoryResources
in class DelegateTree<T extends ContentMeta>
path
- pathpublic java.util.Set<Resource<T>> listDirectory(Path path)
Tree
listDirectory
in interface Tree<T extends ContentMeta>
listDirectory
in class DelegateTree<T extends ContentMeta>
path
- pathpublic java.util.Set<Resource<T>> listDirectorySubdirs(Path path)
Tree
listDirectorySubdirs
in interface Tree<T extends ContentMeta>
listDirectorySubdirs
in class DelegateTree<T extends ContentMeta>
path
- directory pathpublic boolean deleteResource(Path path)
Tree
deleteResource
in interface Tree<T extends ContentMeta>
deleteResource
in class DelegateTree<T extends ContentMeta>
path
- pathpublic Resource<T> createResource(Path path, T content)
Tree
createResource
in interface Tree<T extends ContentMeta>
createResource
in class DelegateTree<T extends ContentMeta>
path
- pathcontent
- resource contentpublic Resource<T> updateResource(Path path, T content)
Tree
updateResource
in interface Tree<T extends ContentMeta>
updateResource
in class DelegateTree<T extends ContentMeta>
path
- pathcontent
- resource contentpublic boolean hasPath(Path path)
Tree
hasPath
in interface Tree<T extends ContentMeta>
hasPath
in class DelegateTree<T extends ContentMeta>
path
- pathpublic static boolean matchesPath(Path path, SelectiveTree<?> tree)
public static boolean hasParentPath(Path path, SelectiveTree<?> tree)
public boolean hasResource(Path path)
Tree
hasResource
in interface Tree<T extends ContentMeta>
hasResource
in class DelegateTree<T extends ContentMeta>
path
- pathpublic boolean hasDirectory(Path path)
Tree
hasDirectory
in interface Tree<T extends ContentMeta>
hasDirectory
in class DelegateTree<T extends ContentMeta>
path
- path