public class TreeStorageManager extends java.lang.Object implements StorageManager
| Constructor and Description |
|---|
TreeStorageManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(StorageManagerListener listener)
Receive notification of changes
|
org.rundeck.storage.api.Resource<ResourceMeta> |
createFileResource(java.lang.String path,
java.io.InputStream input,
java.util.Map<java.lang.String,java.lang.String> meta)
Create new resource, fails if it exists
|
static TreeStorageManager |
createFromStorageTree(StorageTree storageTree) |
boolean |
deleteAllFileResources(java.lang.String root)
Recursively delete all files from the root path
|
boolean |
deleteFileResource(java.lang.String path)
delete a resource
|
boolean |
existsDirResource(java.lang.String path) |
boolean |
existsFileResource(java.lang.String path) |
org.rundeck.storage.api.Resource<ResourceMeta> |
getFileResource(java.lang.String path)
Return config file contents
|
java.util.List<java.lang.String> |
listDirPaths(java.lang.String path)
List the full paths of file resources in the directory at the given path
|
java.util.List<java.lang.String> |
listDirPaths(java.lang.String path,
java.lang.String pattern)
List the full paths of file and dir resources in the directory at the given path,
dir resources will end with "/"
|
long |
loadFileResource(java.lang.String path,
java.io.OutputStream output)
Read the contents of a file at the path into the outputstream
|
void |
removeListener(StorageManagerListener listener)
Remove a listener
|
org.rundeck.storage.api.Resource<ResourceMeta> |
updateFileResource(java.lang.String path,
java.io.InputStream input,
java.util.Map<java.lang.String,java.lang.String> meta)
Update existing resource, fails if it does not exist
|
org.rundeck.storage.api.Resource<ResourceMeta> |
writeFileResource(java.lang.String path,
java.io.InputStream input,
java.util.Map<java.lang.String,java.lang.String> meta)
Write to a resource, create if it does not exist
|
public void addListener(StorageManagerListener listener)
StorageManageraddListener in interface StorageManagerpublic void removeListener(StorageManagerListener listener)
StorageManagerremoveListener in interface StorageManagerpublic boolean existsFileResource(java.lang.String path)
existsFileResource in interface StorageManagerpublic boolean existsDirResource(java.lang.String path)
existsDirResource in interface StorageManagerpublic java.util.List<java.lang.String> listDirPaths(java.lang.String path)
listDirPaths in interface StorageManagerpath - path directory pathpublic java.util.List<java.lang.String> listDirPaths(java.lang.String path,
java.lang.String pattern)
listDirPaths in interface StorageManagerpath - path directory pathpattern - pattern matchpublic org.rundeck.storage.api.Resource<ResourceMeta> getFileResource(java.lang.String path)
getFileResource in interface StorageManagerpath - public long loadFileResource(java.lang.String path,
java.io.OutputStream output)
throws java.io.IOException
StorageManagerloadFileResource in interface StorageManagerjava.io.IOExceptionpublic org.rundeck.storage.api.Resource<ResourceMeta> updateFileResource(java.lang.String path, java.io.InputStream input, java.util.Map<java.lang.String,java.lang.String> meta)
updateFileResource in interface StorageManagerpath - pathinput - streammeta - metadatapublic org.rundeck.storage.api.Resource<ResourceMeta> createFileResource(java.lang.String path, java.io.InputStream input, java.util.Map<java.lang.String,java.lang.String> meta)
createFileResource in interface StorageManagerpath - pathinput - streammeta - metadatapublic org.rundeck.storage.api.Resource<ResourceMeta> writeFileResource(java.lang.String path, java.io.InputStream input, java.util.Map<java.lang.String,java.lang.String> meta)
writeFileResource in interface StorageManagerpath - pathinput - streammeta - metadatapublic boolean deleteFileResource(java.lang.String path)
deleteFileResource in interface StorageManagerpath - pathpublic boolean deleteAllFileResources(java.lang.String root)
deleteAllFileResources in interface StorageManagerroot - root pathpublic static TreeStorageManager createFromStorageTree(StorageTree storageTree)