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 void
addDirectoryToList(File directory, String prefix)
void
load(String path)
Reloads theBlobHolder
from a file.protected void
orderIndexPageFirst(List<Blob> blobs)
Rearrange blobs to have smallest index.html page as the first blob.String
persist(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:CachableBlobHolder
Reloads theBlobHolder
from a file.- Specified by:
load
in 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:CachableBlobHolder
Persists the blobHolder to disk.- Specified by:
persist
in 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
-
-