public interface StoredFileHandler
StoredFile entities and its content.| Modifier and Type | Method and Description |
|---|---|
void |
copy(StoredFile source,
StoredFile target)
Copies the source's attributes and content to target.
|
<T extends StoredFile> |
find(java.lang.Class<T> clazz,
long id)
Finds a
StoredFile in the catalog, if found returns the StoredFile with the specified id.This method doesn't check if the related content is present through the StoredFileContentManager |
SerializableInputStream |
getContent(StoredFile target)
Opens an input stream to allow read the content of the specified
StoredFile.It is caller's responsibility to close the stream after read. |
void |
move(StoredFile source,
StoredFile target)
Moves the source's attributes and content to target REMOVING the source.
|
void |
remove(long id)
Remove the stored file and its content.
|
void |
save(StoredFile storedFile,
SerializableInputStream in)
Saves (create/update) a stored file reading its content from the specified stream.
This method closes the provided SerializableInputStream after the method has completed. |
void copy(StoredFile source, StoredFile target) throws StoredFileException
StoredFileException<T extends StoredFile> T find(java.lang.Class<T> clazz, long id) throws StoredFileException, EntityNotFoundException
StoredFile in the catalog, if found returns the StoredFile with the specified id.StoredFileContentManagerEntityNotFoundException - if a stored file was not found.StoredFileExceptionSerializableInputStream getContent(StoredFile target) throws StoredFileException, EntityNotFoundException
StoredFile.void move(StoredFile source, StoredFile target) throws StoredFileException
StoredFileExceptionvoid remove(long id)
throws StoredFileException,
EntityNotFoundException
void save(StoredFile storedFile, SerializableInputStream in) throws StoredFileException
SerializableInputStream after the method has completed.StoredFileException