public interface Tree<T extends ContentMeta>
Modifier and Type | Method and Description |
---|---|
Resource<T> |
createResource(Path path,
T content)
Create a resource
|
Resource<T> |
createResource(java.lang.String path,
T content) |
boolean |
deleteResource(Path path)
Delete a resource at a path
|
boolean |
deleteResource(java.lang.String path) |
Resource<T> |
getPath(Path path)
Return the resource or directory at the path
|
Resource<T> |
getPath(java.lang.String path) |
Resource<T> |
getResource(Path path)
Return the resource at the path
|
Resource<T> |
getResource(java.lang.String path) |
boolean |
hasDirectory(Path path)
Return true if a directory at the path exists
|
boolean |
hasDirectory(java.lang.String path) |
boolean |
hasPath(Path path)
Return true if the path exists
|
boolean |
hasPath(java.lang.String path) |
boolean |
hasResource(Path path)
Return true if a resource at the path exists
|
boolean |
hasResource(java.lang.String path) |
java.util.Set<Resource<T>> |
listDirectory(Path path)
Return the set of resources at the directory path
|
java.util.Set<Resource<T>> |
listDirectory(java.lang.String 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>> |
listDirectoryResources(java.lang.String path) |
java.util.Set<Resource<T>> |
listDirectorySubdirs(Path path)
Return the set of sub directory resources within the directory path
|
java.util.Set<Resource<T>> |
listDirectorySubdirs(java.lang.String path) |
Resource<T> |
updateResource(Path path,
T content)
Update an existing resource
|
Resource<T> |
updateResource(java.lang.String path,
T content) |
boolean hasPath(Path path)
path
- pathboolean hasPath(java.lang.String path)
boolean hasResource(Path path)
path
- pathboolean hasResource(java.lang.String path)
boolean hasDirectory(Path path)
path
- pathboolean hasDirectory(java.lang.String path)
Resource<T> getPath(Path path)
path
- pathResource<T> getResource(Path path)
path
- pathjava.lang.IllegalArgumentException
- if the path is a directory or does not existjava.util.Set<Resource<T>> listDirectoryResources(Path path)
path
- pathjava.util.Set<Resource<T>> listDirectory(Path path)
path
- pathjava.util.Set<Resource<T>> listDirectorySubdirs(Path path)
path
- directory pathboolean deleteResource(Path path)
path
- pathjava.lang.IllegalArgumentException
- if the path is a directory or does not existboolean deleteResource(java.lang.String path)
Resource<T> createResource(Path path, T content)
path
- pathcontent
- resource contentjava.lang.IllegalArgumentException
- if the path is a directoryResource<T> updateResource(Path path, T content)
path
- pathcontent
- resource contentjava.lang.IllegalArgumentException
- if the path is a directory or does not exist