public class FileSystemContentStorage extends Object implements ContentStorage
| Constructor and Description |
|---|
FileSystemContentStorage(File contentFolderRoot,
int blockSize,
int depth) |
| Modifier and Type | Method and Description |
|---|---|
ContentObject |
createContentObject(InputStream contentStream,
Long lengthHint) |
void |
deleteContentObject(String id) |
protected BigInteger |
fetchNewId() |
ContentObject |
getContentObject(String id) |
protected File |
getFileForId(String id,
boolean shouldExist) |
protected File |
getFirstAvailableFolder(int maxRetries) |
protected File |
getMaxChild(File file) |
ContentObject |
updateContentObject(String id,
InputStream contentStream,
Long lengthHint) |
public FileSystemContentStorage(File contentFolderRoot, int blockSize, int depth)
contentFolderRoot - root folder where all content will be stored inblockSize - max size of a single folder's childrendepth - depth of the tree created to store content inPathConverterpublic ContentObject createContentObject(InputStream contentStream, Long lengthHint)
createContentObject in interface ContentStoragepublic ContentObject getContentObject(String id)
getContentObject in interface ContentStoragepublic ContentObject updateContentObject(String id, InputStream contentStream, Long lengthHint)
updateContentObject in interface ContentStoragepublic void deleteContentObject(String id)
deleteContentObject in interface ContentStorageprotected File getFileForId(String id, boolean shouldExist)
protected BigInteger fetchNewId()
protected File getFirstAvailableFolder(int maxRetries)
Copyright © 2014–2015 Alfresco. All rights reserved.