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 inPathConverter
public ContentObject createContentObject(InputStream contentStream, Long lengthHint)
createContentObject
in interface ContentStorage
public ContentObject getContentObject(String id)
getContentObject
in interface ContentStorage
public ContentObject updateContentObject(String id, InputStream contentStream, Long lengthHint)
updateContentObject
in interface ContentStorage
public void deleteContentObject(String id)
deleteContentObject
in interface ContentStorage
protected File getFileForId(String id, boolean shouldExist)
protected BigInteger fetchNewId()
protected File getFirstAvailableFolder(int maxRetries)
Copyright © 2014–2015 Alfresco. All rights reserved.