public class ConverterTree<T extends ContentMeta> extends DelegateTree<T>
ContentConverter
Constructor and Description |
---|
ConverterTree(Tree<T> delegate,
ContentConverter<T> converter,
PathSelector pathSelector)
Convert content from the delegate with the given converter if it matches the selector
|
ConverterTree(Tree<T> delegate,
ContentConverter<T> converter,
PathSelector pathSelector,
ResourceSelector<T> resourceSelector) |
ConverterTree(Tree<T> delegate,
ContentConverter<T> converter,
ResourceSelector<T> resourceSelector) |
Modifier and Type | Method and Description |
---|---|
Resource<T> |
createResource(Path path,
T content)
Create a resource
|
Resource<T> |
getPath(Path path)
Return the resource or directory at the path
|
Resource<T> |
getResource(Path path)
Return the resource at the path
|
Resource<T> |
updateResource(Path path,
T content)
Update an existing resource
|
deleteResource, hasDirectory, hasPath, hasResource, listDirectory, listDirectoryResources, listDirectorySubdirs
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 ConverterTree(Tree<T> delegate, ContentConverter<T> converter, PathSelector pathSelector)
delegate
- delegateconverter
- converterpathSelector
- path selectionpublic ConverterTree(Tree<T> delegate, ContentConverter<T> converter, ResourceSelector<T> resourceSelector)
public ConverterTree(Tree<T> delegate, ContentConverter<T> converter, PathSelector pathSelector, ResourceSelector<T> resourceSelector)
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 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 content