Package org.flowable.content.api
Interface ContentStorage
public interface ContentStorage
Storage for reading and writing content.
- Author:
- Frederik Heremans, Joram Barrez
-
Method Summary
Modifier and TypeMethodDescriptioncreateContentObject
(InputStream contentStream, Map<String, Object> metaData) Deprecated.default ContentObject
createContentObject
(InputStream contentStream, ContentObjectStorageMetadata metaData) Reads the givenInputStream
and stores it.void
Deletes the object the given id.updateContentObject
(String id, InputStream contentStream, Map<String, Object> metaData) Deprecated.default ContentObject
updateContentObject
(String id, InputStream contentStream, ContentObjectStorageMetadata metaData) Update the content with the given id to the content present in the given stream.
-
Method Details
-
createContentObject
@Deprecated ContentObject createContentObject(InputStream contentStream, Map<String, Object> metaData) Deprecated.- Parameters:
contentStream
-metaData
- A key-value collection that can be used to change the way the content is stored.- Returns:
- reads the given
InputStream
and stores it. Returns aContentObject
with a unique id generated - which can be used for reading the content again.
-
createContentObject
default ContentObject createContentObject(InputStream contentStream, ContentObjectStorageMetadata metaData) Reads the givenInputStream
and stores it.- Parameters:
contentStream
- the content stream that should be storedmetaData
- additional data that can be used to change the way the content is stored- Returns:
- a
ContentObject
with a unique id generated - which can be used for reading the content again
-
updateContentObject
@Deprecated ContentObject updateContentObject(String id, InputStream contentStream, Map<String, Object> metaData) Deprecated.Update the content with the given id to the content present in the given stream.- Parameters:
id
-contentStream
-metaData
- A key-value collection that can be used to change the way the content is stored.- Returns:
- Returns a
ContentObject
with a unique id generated - which can br used for reading the content again. - Throws:
ContentStorageException
- When an exception occurred while updating the content and the content is not updated.
-
updateContentObject
default ContentObject updateContentObject(String id, InputStream contentStream, ContentObjectStorageMetadata metaData) Update the content with the given id to the content present in the given stream.- Parameters:
id
- the id of the content being updatedcontentStream
- the content stream that should be updatedmetaData
- additional data that can be used to change the way the content is stored- Returns:
- Returns a
ContentObject
with a unique id generated - which can br used for reading the content again. - Throws:
ContentStorageException
- When an exception occurred while updating the content and the content is not updated.
-
getContentObject
- Returns:
- a
ContentObject
with the given id. - Throws:
ContentNotFoundException
- When the content with the given id does not exist
-
getMetaData
- Returns:
- Returns the metadata that was passed when creating the
ContentObject
-
deleteContentObject
Deletes the object the given id.- Parameters:
id
-- Throws:
ContentNotFoundException
- When the content with the given id does not existContentStorageException
- When an error occurred while deleting the content.
-
getContentStoreName
String getContentStoreName()
-
createContentObject(InputStream, ContentObjectStorageMetadata)
instead