Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.convert.plugins
Class ZipCachableBlobHolder

java.lang.Object
  extended by org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
      extended by org.nuxeo.ecm.core.api.blobholder.SimpleBlobHolder
          extended by org.nuxeo.ecm.core.convert.cache.SimpleCachableBlobHolder
              extended by org.nuxeo.ecm.platform.convert.plugins.ZipCachableBlobHolder
All Implemented Interfaces:
BlobHolder, CachableBlobHolder

public class ZipCachableBlobHolder
extends SimpleCachableBlobHolder

Cachable implementation of a zip file.

Author:
Laurent Doguin

Constructor Summary
ZipCachableBlobHolder()
           
ZipCachableBlobHolder(Blob zipBlob)
           
 
Method Summary
 void addDirectoryToList(File directory, String prefix)
           
 Blob getBlob()
          Returns the Blob held inside the object.
 Blob getBlob(String path)
           
 List<Blob> getBlobs()
          Returns a list of blobs, if holder implementation supports multiple blobs.
 String getMimeType(File file)
           
 MimetypeRegistry getMimeTypeService()
           
 void load(String path)
          Reloads the BlobHolder from a file.
 String persist(String basePath)
          Persists the blobHolder to disk.
 
Methods inherited from class org.nuxeo.ecm.core.api.blobholder.SimpleBlobHolder
getModificationDate, getProperties, getProperty
 
Methods inherited from class org.nuxeo.ecm.core.api.blobholder.AbstractBlobHolder
getFilePath, getHash, setBlob
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.core.api.blobholder.BlobHolder
getFilePath, getHash, getModificationDate, getProperties, getProperty, setBlob
 

Constructor Detail

ZipCachableBlobHolder

public ZipCachableBlobHolder()

ZipCachableBlobHolder

public ZipCachableBlobHolder(Blob zipBlob)
Method Detail

getBlob

public Blob getBlob(String path)
             throws IOException,
                    MimetypeNotFoundException,
                    MimetypeDetectionException,
                    ConversionException
Throws:
IOException
MimetypeNotFoundException
MimetypeDetectionException
ConversionException

getBlob

public Blob getBlob()
             throws ClientException
Description copied from interface: BlobHolder
Returns the Blob held inside the object.

Specified by:
getBlob in interface BlobHolder
Overrides:
getBlob in class SimpleBlobHolder
Throws:
ClientException

getBlobs

public List<Blob> getBlobs()
                    throws ClientException
Description copied from interface: BlobHolder
Returns a list of blobs, if holder implementation supports multiple blobs.

Specified by:
getBlobs in interface BlobHolder
Overrides:
getBlobs in class SimpleBlobHolder
Throws:
ClientException

load

public void load(String path)
Description copied from interface: CachableBlobHolder
Reloads the BlobHolder from a file.

Specified by:
load in interface CachableBlobHolder
Overrides:
load in class SimpleCachableBlobHolder

addDirectoryToList

public void addDirectoryToList(File directory,
                               String prefix)
                        throws ConversionException
Overrides:
addDirectoryToList in class SimpleCachableBlobHolder
Throws:
ConversionException

persist

public String persist(String basePath)
               throws Exception
Description copied from interface: CachableBlobHolder
Persists the blobHolder to disk.

Specified by:
persist in interface CachableBlobHolder
Overrides:
persist in class SimpleCachableBlobHolder
Parameters:
basePath - the base path (existing directory) as determined by the caller
Returns:
the full path of the newly created FileSystem resource
Throws:
Exception

getMimeType

public String getMimeType(File file)
                   throws ConversionException
Throws:
ConversionException

getMimeTypeService

public MimetypeRegistry getMimeTypeService()
                                    throws ConversionException
Throws:
ConversionException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.