Package org.nuxeo.ecm.core.convert.cache
Class SimpleCachableBlobHolder
- java.lang.Object
-
- org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
-
- org.nuxeo.ecm.core.api.blobholder.SimpleBlobHolder
-
- org.nuxeo.ecm.core.convert.cache.SimpleCachableBlobHolder
-
- All Implemented Interfaces:
BlobHolder,CachableBlobHolder
- Direct Known Subclasses:
ZipCachableBlobHolder
public class SimpleCachableBlobHolder extends SimpleBlobHolder implements CachableBlobHolder
Cachable implementation of theSimpleBlobHolder.- Author:
- tiry
-
-
Field Summary
-
Fields inherited from class org.nuxeo.ecm.core.api.blobholder.SimpleBlobHolder
blobs, creationDate
-
-
Constructor Summary
Constructors Constructor Description SimpleCachableBlobHolder()SimpleCachableBlobHolder(String path)SimpleCachableBlobHolder(List<Blob> blobs)SimpleCachableBlobHolder(Blob blob)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDirectoryToList(File directory, String prefix)voidload(String path)Reloads theBlobHolderfrom a file.protected voidorderIndexPageFirst(List<Blob> blobs)Rearrange blobs to have smallest index.html page as the first blob.Stringpersist(String basePath)Persists the blobHolder to disk.-
Methods inherited from class org.nuxeo.ecm.core.api.blobholder.SimpleBlobHolder
getBasePath, getBlob, getBlobs, getModificationDate, getProperties, getProperty, init, setBlob
-
Methods inherited from class org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
getFilePath, getHash, getMD5Digest
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.api.blobholder.BlobHolder
getBlob, getBlobs, getFilePath, getHash, getModificationDate, getProperties, getProperty, setBlob
-
-
-
-
Method Detail
-
load
public void load(String path) throws IOException
Description copied from interface:CachableBlobHolderReloads theBlobHolderfrom a file.- Specified by:
loadin interfaceCachableBlobHolder- Throws:
IOException
-
addDirectoryToList
public void addDirectoryToList(File directory, String prefix) throws IOException
- Throws:
IOException
-
persist
public String persist(String basePath) throws IOException
Description copied from interface:CachableBlobHolderPersists the blobHolder to disk.- Specified by:
persistin interfaceCachableBlobHolder- Parameters:
basePath- the base path (existing directory) as determined by the caller- Returns:
- the full path of the newly created FileSystem resource
- Throws:
IOException
-
-