Package org.rundeck.storage.impl
Class DelegateTree<T extends ContentMeta>
- java.lang.Object
-
- org.rundeck.storage.impl.StringToPathTree<T>
-
- org.rundeck.storage.impl.BaseDelegateTree<T>
-
- org.rundeck.storage.impl.DelegateTree<T>
-
- All Implemented Interfaces:
Tree<T>
public class DelegateTree<T extends ContentMeta> extends BaseDelegateTree<T> implements Tree<T>
storage defers to a delegate
-
-
Constructor Summary
Constructors Constructor Description DelegateTree()DelegateTree(Tree<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource<T>createResource(Path path, T content)Create a resourcebooleandeleteResource(Path path)Delete a resource at a pathResource<T>getPath(Path path)Return the resource or directory at the pathResource<T>getResource(Path path)Return the resource at the pathbooleanhasDirectory(Path path)Return true if a directory at the path existsbooleanhasPath(Path path)Return true if the path existsbooleanhasResource(Path path)Return true if a resource at the path existsjava.util.Set<Resource<T>>listDirectory(Path path)Return the set of resources at the directory pathjava.util.Set<Resource<T>>listDirectoryResources(Path path)Return the set of non-directory resources at the directory pathjava.util.Set<Resource<T>>listDirectorySubdirs(Path path)Return the set of sub directory resources within the directory pathResource<T>updateResource(Path path, T content)Update an existing resource-
Methods inherited from class org.rundeck.storage.impl.BaseDelegateTree
getDelegate, setDelegate
-
Methods inherited from class org.rundeck.storage.impl.StringToPathTree
createResource, deleteResource, getPath, getResource, hasDirectory, hasPath, hasResource, listDirectory, listDirectoryResources, listDirectorySubdirs, updateResource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.rundeck.storage.api.Tree
createResource, deleteResource, getPath, getResource, hasDirectory, hasPath, hasResource, listDirectory, listDirectoryResources, listDirectorySubdirs, updateResource
-
-
-
-
Method Detail
-
hasPath
public boolean hasPath(Path path)
Description copied from interface:TreeReturn true if the path exists- Specified by:
hasPathin interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- true if it exists
-
hasResource
public boolean hasResource(Path path)
Description copied from interface:TreeReturn true if a resource at the path exists- Specified by:
hasResourcein interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- true if a resource exists
-
hasDirectory
public boolean hasDirectory(Path path)
Description copied from interface:TreeReturn true if a directory at the path exists- Specified by:
hasDirectoryin interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- true if the path is a directory
-
getPath
public Resource<T> getPath(Path path)
Description copied from interface:TreeReturn the resource or directory at the path- Specified by:
getPathin interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- Resource or directory
-
getResource
public Resource<T> getResource(Path path)
Description copied from interface:TreeReturn the resource at the path- Specified by:
getResourcein interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- Resource
-
listDirectorySubdirs
public java.util.Set<Resource<T>> listDirectorySubdirs(Path path)
Description copied from interface:TreeReturn the set of sub directory resources within the directory path- Specified by:
listDirectorySubdirsin interfaceTree<T extends ContentMeta>- Parameters:
path- directory path- Returns:
- set of subdirectories
-
listDirectoryResources
public java.util.Set<Resource<T>> listDirectoryResources(Path path)
Description copied from interface:TreeReturn the set of non-directory resources at the directory path- Specified by:
listDirectoryResourcesin interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- set of resources
-
listDirectory
public java.util.Set<Resource<T>> listDirectory(Path path)
Description copied from interface:TreeReturn the set of resources at the directory path- Specified by:
listDirectoryin interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- set of resources
-
deleteResource
public boolean deleteResource(Path path)
Description copied from interface:TreeDelete a resource at a path- Specified by:
deleteResourcein interfaceTree<T extends ContentMeta>- Parameters:
path- path- Returns:
- true if the resource was deleted
-
createResource
public Resource<T> createResource(Path path, T content)
Description copied from interface:TreeCreate a resource- Specified by:
createResourcein interfaceTree<T extends ContentMeta>- Parameters:
path- pathcontent- resource content- Returns:
- the resource
-
updateResource
public Resource<T> updateResource(Path path, T content)
Description copied from interface:TreeUpdate an existing resource- Specified by:
updateResourcein interfaceTree<T extends ContentMeta>- Parameters:
path- pathcontent- resource content- Returns:
- the resource
-
-