public class SimpleFileSystemContentStorage extends Object implements org.flowable.content.api.ContentStorage
ContentStorage
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 returned ContentObject
indicates in which folder it is stored.Modifier and Type | Field and 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 and Description |
---|
SimpleFileSystemContentStorage(File contentFolderRoot) |
Modifier and Type | Method and Description |
---|---|
org.flowable.content.api.ContentObject |
createContentObject(InputStream contentStream,
Map<String,Object> metaData) |
protected File |
createOrGetFolderBasedOnMetaData(Map<String,Object> metaData) |
void |
deleteContentObject(String id) |
protected String |
determineType(Map<String,Object> metaData) |
protected String |
generateContentId(String uuid,
Map<String,Object> metaData) |
protected File |
getContentFile(Map<String,Object> metaData,
String contentId) |
protected File |
getContentFile(String id) |
org.flowable.content.api.ContentObject |
getContentObject(String id) |
String |
getContentStoreName() |
Map<String,Object> |
getMetaData() |
protected File |
internalCreateOrGetFolder(File parentFolder,
String id) |
org.flowable.content.api.ContentObject |
updateContentObject(String id,
InputStream contentStream,
Map<String,Object> metaData) |
protected File |
validateOrCreateFolder(String folderName) |
protected void |
validateOrCreateSubfolders() |
public static final String TYPE_TASK
public static final String TYPE_PROCESS_INSTANCE
public static final String TYPE_CASE_INSTANCE
public static final String TYPE_UNCATEGORIZED
public static final String TASK_PREFIX
public static final String PROCESS_INSTANCE_PREFIX
public static final String CASE_PREFIX
public static final String UNCATEGORIZED_PREFIX
protected File contentFolderRoot
protected File taskFolder
protected File processInstanceFolder
protected File caseFolder
protected File uncategorizedFolder
public SimpleFileSystemContentStorage(File contentFolderRoot)
protected void validateOrCreateSubfolders()
public org.flowable.content.api.ContentObject createContentObject(InputStream contentStream, Map<String,Object> metaData)
createContentObject
in interface org.flowable.content.api.ContentStorage
public org.flowable.content.api.ContentObject updateContentObject(String id, InputStream contentStream, Map<String,Object> metaData)
updateContentObject
in interface org.flowable.content.api.ContentStorage
public org.flowable.content.api.ContentObject getContentObject(String id)
getContentObject
in interface org.flowable.content.api.ContentStorage
public Map<String,Object> getMetaData()
getMetaData
in interface org.flowable.content.api.ContentStorage
public void deleteContentObject(String id)
deleteContentObject
in interface org.flowable.content.api.ContentStorage
public String getContentStoreName()
getContentStoreName
in interface org.flowable.content.api.ContentStorage
protected File createOrGetFolderBasedOnMetaData(Map<String,Object> metaData)
Copyright © 2019. All rights reserved.