Package com.dtolabs.rundeck.core.storage
Interface TypedStorageTree
-
- All Superinterfaces:
StorageTree
,org.rundeck.storage.api.Tree<ResourceMeta>
- All Known Implementing Classes:
TypedStorageTreeImpl
public interface TypedStorageTree extends StorageTree
Extends StorageTree to provide content-type requirements for resources
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.rundeck.storage.api.Resource<ResourceMeta>
getResourceWithType(org.rundeck.storage.api.Path path, java.lang.String contentType)
boolean
hasResourceWithType(org.rundeck.storage.api.Path path, java.lang.String contentType)
byte[]
readResourceWithType(org.rundeck.storage.api.Path path, java.lang.String contentType)
-
Methods inherited from interface org.rundeck.storage.api.Tree
createResource, createResource, deleteResource, deleteResource, getPath, getPath, getResource, getResource, hasDirectory, hasDirectory, hasPath, hasPath, hasResource, hasResource, listDirectory, listDirectory, listDirectoryResources, listDirectoryResources, listDirectorySubdirs, listDirectorySubdirs, updateResource, updateResource
-
-
-
-
Method Detail
-
getResourceWithType
org.rundeck.storage.api.Resource<ResourceMeta> getResourceWithType(org.rundeck.storage.api.Path path, java.lang.String contentType)
- Parameters:
path
- pathcontentType
- content type string- Returns:
- contents of the resource
- Throws:
com.dtolabs.rundeck.core.storage.WrongContentType
- if the content type requested does not matchorg.rundeck.storage.api.StorageException
- if underlying tree throws an exception, e.g. not found
-
hasResourceWithType
boolean hasResourceWithType(org.rundeck.storage.api.Path path, java.lang.String contentType)
- Parameters:
path
- pathcontentType
- content type string- Returns:
- true if the resource exists and has the specified content type
- Throws:
com.dtolabs.rundeck.core.storage.WrongContentType
- if the content type requested does not matchorg.rundeck.storage.api.StorageException
- if underlying tree throws an exception, e.g. not found
-
readResourceWithType
byte[] readResourceWithType(org.rundeck.storage.api.Path path, java.lang.String contentType) throws java.io.IOException
- Parameters:
path
- pathcontentType
- content type string- Returns:
- contents of the resource
- Throws:
com.dtolabs.rundeck.core.storage.WrongContentType
- if the content type requested does not matchorg.rundeck.storage.api.StorageException
- if underlying tree throws an exception, e.g. not foundjava.io.IOException
-
-