Class SimpleFileSystemContentStorage
- java.lang.Object
-
- com.flowable.content.engine.impl.fs.SimpleFileSystemContentStorage
-
- All Implemented Interfaces:
ContentStorage
public class SimpleFileSystemContentStorage extends Object implements ContentStorage
(Very) simple implementation of theContentStorage
that relies on the passed metadata to store content. Under a root folder, a division between 'task' and 'process-instance' content is made. New content gets a new UUID assigned and is placed in one of these folders. The id of the returnedContentObject
indicates in which folder it is stored.- Author:
- Joram Barrez
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SimpleFileSystemContentStorage.MapBasedContentObjectStorageMetadata
-
Field Summary
Fields Modifier and Type Field Description static String
CASE_PREFIX
protected File
caseFolder
protected File
contentFolderRoot
static String
PROCESS_INSTANCE_PREFIX
protected File
processInstanceFolder
static String
TASK_PREFIX
protected File
taskFolder
static String
TYPE_CASE_INSTANCE
static String
TYPE_PROCESS_INSTANCE
static String
TYPE_TASK
static String
TYPE_UNCATEGORIZED
static String
UNCATEGORIZED_PREFIX
protected File
uncategorizedFolder
-
Constructor Summary
Constructors Constructor Description SimpleFileSystemContentStorage(File contentFolderRoot)
-
Method Summary
-
-
-
Field Detail
-
TYPE_TASK
public static final String TYPE_TASK
- See Also:
- Constant Field Values
-
TYPE_PROCESS_INSTANCE
public static final String TYPE_PROCESS_INSTANCE
- See Also:
- Constant Field Values
-
TYPE_CASE_INSTANCE
public static final String TYPE_CASE_INSTANCE
- See Also:
- Constant Field Values
-
TYPE_UNCATEGORIZED
public static final String TYPE_UNCATEGORIZED
- See Also:
- Constant Field Values
-
TASK_PREFIX
public static final String TASK_PREFIX
- See Also:
- Constant Field Values
-
PROCESS_INSTANCE_PREFIX
public static final String PROCESS_INSTANCE_PREFIX
- See Also:
- Constant Field Values
-
CASE_PREFIX
public static final String CASE_PREFIX
- See Also:
- Constant Field Values
-
UNCATEGORIZED_PREFIX
public static final String UNCATEGORIZED_PREFIX
- See Also:
- Constant Field Values
-
contentFolderRoot
protected File contentFolderRoot
-
taskFolder
protected File taskFolder
-
processInstanceFolder
protected File processInstanceFolder
-
caseFolder
protected File caseFolder
-
uncategorizedFolder
protected File uncategorizedFolder
-
-
Constructor Detail
-
SimpleFileSystemContentStorage
public SimpleFileSystemContentStorage(File contentFolderRoot)
-
-
Method Detail
-
validateOrCreateSubfolders
protected void validateOrCreateSubfolders()
-
createContentObject
public ContentObject createContentObject(InputStream contentStream, Map<String,Object> metadata)
- Specified by:
createContentObject
in interfaceContentStorage
-
createContentObject
public ContentObject createContentObject(InputStream contentStream, ContentObjectStorageMetadata metaData)
- Specified by:
createContentObject
in interfaceContentStorage
-
generateContentId
protected String generateContentId(String uuid, ContentObjectStorageMetadata metadata)
-
updateContentObject
public ContentObject updateContentObject(String id, InputStream contentStream, Map<String,Object> metaData)
- Specified by:
updateContentObject
in interfaceContentStorage
-
updateContentObject
public ContentObject updateContentObject(String id, InputStream contentStream, ContentObjectStorageMetadata metaData)
- Specified by:
updateContentObject
in interfaceContentStorage
-
getContentObject
public ContentObject getContentObject(String id)
- Specified by:
getContentObject
in interfaceContentStorage
-
getMetaData
public Map<String,Object> getMetaData()
- Specified by:
getMetaData
in interfaceContentStorage
-
deleteContentObject
public void deleteContentObject(String id)
- Specified by:
deleteContentObject
in interfaceContentStorage
-
getContentStoreName
public String getContentStoreName()
- Specified by:
getContentStoreName
in interfaceContentStorage
-
getContentFile
protected File getContentFile(ContentObjectStorageMetadata metaData, String contentId)
-
determineType
protected String determineType(ContentObjectStorageMetadata metaData)
-
createOrGetFolderBasedOnMetaData
protected File createOrGetFolderBasedOnMetaData(ContentObjectStorageMetadata metaData)
-
-