Package com.dtolabs.rundeck.core.logging
Interface ExecutionFileStorage
-
- All Known Subinterfaces:
ExecutionFileStoragePlugin
public interface ExecutionFileStorage
Handles storage and retrieval of typed files for an execution, the filetype is specified in thestore(String, java.io.InputStream, long, java.util.Date)
andretrieve(String, java.io.OutputStream)
methods, and more than one filetype may be stored or retrieved for the same execution.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
deleteFile(java.lang.String filetype)
delete the file of the given file typedefault boolean
partialRetrieve(java.lang.String filetype, java.io.OutputStream stream)
Write the incomplete snapshot of the file of the given file type to the given streamdefault boolean
partialStore(java.lang.String filetype, java.io.InputStream stream, long length, java.util.Date lastModified)
Stores the incomplete snapshot file of the given file type, read from the given streamboolean
retrieve(java.lang.String filetype, java.io.OutputStream stream)
Write a file of the given file type to the given streamboolean
store(java.lang.String filetype, java.io.InputStream stream, long length, java.util.Date lastModified)
Stores a file of the given file type, read from the given stream
-
-
-
Method Detail
-
store
boolean store(java.lang.String filetype, java.io.InputStream stream, long length, java.util.Date lastModified) throws java.io.IOException, ExecutionFileStorageException
Stores a file of the given file type, read from the given stream- Parameters:
filetype
- filetype or extension of the file to storestream
- the input streamlength
- the file lengthlastModified
- the file modification time- Returns:
- true if successful
- Throws:
java.io.IOException
- if an IO error occursExecutionFileStorageException
- if other errors occur
-
partialStore
default boolean partialStore(java.lang.String filetype, java.io.InputStream stream, long length, java.util.Date lastModified) throws java.io.IOException, ExecutionFileStorageException
Stores the incomplete snapshot file of the given file type, read from the given stream- Parameters:
filetype
- filetype or extension of the file to storestream
- the input streamlength
- the file lengthlastModified
- the file modification time- Returns:
- true if successful
- Throws:
java.io.IOException
- if an IO error occursExecutionFileStorageException
- if other errors occur
-
retrieve
boolean retrieve(java.lang.String filetype, java.io.OutputStream stream) throws java.io.IOException, ExecutionFileStorageException
Write a file of the given file type to the given stream- Parameters:
filetype
- key to identify stored filestream
- the output stream- Returns:
- true if successful
- Throws:
java.io.IOException
- if an IO error occursExecutionFileStorageException
- if other errors occur
-
partialRetrieve
default boolean partialRetrieve(java.lang.String filetype, java.io.OutputStream stream) throws java.io.IOException, ExecutionFileStorageException
Write the incomplete snapshot of the file of the given file type to the given stream- Parameters:
filetype
- key to identify stored filestream
- the output stream- Returns:
- true if successful
- Throws:
java.io.IOException
- if an IO error occursExecutionFileStorageException
- if other errors occur
-
deleteFile
default boolean deleteFile(java.lang.String filetype) throws java.io.IOException, ExecutionFileStorageException
delete the file of the given file type- Parameters:
filePath
- key to identify stored file- Returns:
- true if successful
- Throws:
java.io.IOException
- if an IO error occursExecutionFileStorageException
- if other errors occur
-
-