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 theContentStoragethat 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 returnedContentObjectindicates 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 FilecaseFolderprotected FilecontentFolderRootprotected FileprocessInstanceFolderprotected FiletaskFolderprotected FileuncategorizedFolder-
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 ContentObjectcreateContentObject(InputStream contentStream, ContentObjectStorageMetadata metaData)protected FilecreateOrGetFolderBasedOnMetaData(ContentObjectStorageMetadata metaData)voiddeleteContentObject(String id)protected FilegetContentFile(String id)protected FilegetContentFile(ContentObjectStorageMetadata metaData, String contentId)ContentObjectgetContentObject(String id)StringgetContentStoreName()Map<String,Object>getMetaData()protected FileinternalCreateOrGetFolder(File parentFolder, String id)ContentObjectupdateContentObject(String id, InputStream contentStream, ContentObjectStorageMetadata metaData)protected FilevalidateOrCreateFolder(String folderName)protected voidvalidateOrCreateSubfolders()-
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:
createContentObjectin interfaceContentStorage
-
updateContentObject
public ContentObject updateContentObject(String id, InputStream contentStream, ContentObjectStorageMetadata metaData)
- Specified by:
updateContentObjectin interfaceContentStorage
-
getContentObject
public ContentObject getContentObject(String id)
- Specified by:
getContentObjectin interfaceContentStorage
-
getMetaData
public Map<String,Object> getMetaData()
- Specified by:
getMetaDatain interfaceContentStorage
-
deleteContentObject
public void deleteContentObject(String id)
- Specified by:
deleteContentObjectin interfaceContentStorage
-
getContentStoreName
public String getContentStoreName()
- Specified by:
getContentStoreNamein interfaceContentStorage
-
getContentFile
protected File getContentFile(ContentObjectStorageMetadata metaData, String contentId)
-
createOrGetFolderBasedOnMetaData
protected File createOrGetFolderBasedOnMetaData(ContentObjectStorageMetadata metaData)
-
-