Class SimpleFileSystemContentStorage
- java.lang.Object
-
- com.flowable.content.engine.impl.AbstractContentStorage
-
- com.flowable.content.engine.impl.fs.SimpleFileSystemContentStorage
-
- All Implemented Interfaces:
ContentStorage
public class SimpleFileSystemContentStorage extends AbstractContentStorage 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/interfaces inherited from class com.flowable.content.engine.impl.AbstractContentStorage
AbstractContentStorage.MapBasedContentObjectStorageMetadata
-
-
Field Summary
Fields Modifier and Type Field Description protected File
caseFolder
protected File
contentFolderRoot
protected File
processInstanceFolder
protected File
taskFolder
protected File
uncategorizedFolder
-
Fields inherited from class com.flowable.content.engine.impl.AbstractContentStorage
CASE_PREFIX, PROCESS_INSTANCE_PREFIX, TASK_PREFIX, TYPE_CASE_INSTANCE, TYPE_PROCESS_INSTANCE, TYPE_TASK, TYPE_UNCATEGORIZED, UNCATEGORIZED_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SimpleFileSystemContentStorage(File contentFolderRoot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentObject
createContentObject(InputStream contentStream, ContentObjectStorageMetadata metaData)
protected File
createOrGetFolderBasedOnMetaData(ContentObjectStorageMetadata metaData)
void
deleteContentObject(String id)
protected File
getContentFile(String id)
protected File
getContentFile(ContentObjectStorageMetadata metaData, String contentId)
ContentObject
getContentObject(String id)
String
getContentStoreName()
Map<String,Object>
getMetaData()
protected File
internalCreateOrGetFolder(File parentFolder, String id)
ContentObject
updateContentObject(String id, InputStream contentStream, ContentObjectStorageMetadata metaData)
protected File
validateOrCreateFolder(String folderName)
protected void
validateOrCreateSubfolders()
-
Methods inherited from class com.flowable.content.engine.impl.AbstractContentStorage
convertMetaDataToMap, createContentObject, determineType, generateContentId, updateContentObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.flowable.content.api.ContentStorage
createContentObject, updateContentObject
-
-
-
-
Constructor Detail
-
SimpleFileSystemContentStorage
public SimpleFileSystemContentStorage(File contentFolderRoot)
-
-
Method Detail
-
validateOrCreateSubfolders
protected void validateOrCreateSubfolders()
-
createContentObject
public ContentObject createContentObject(InputStream contentStream, ContentObjectStorageMetadata metaData)
- Specified by:
createContentObject
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)
-
createOrGetFolderBasedOnMetaData
protected File createOrGetFolderBasedOnMetaData(ContentObjectStorageMetadata metaData)
-
-