Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.utils
Class BlobsExtractor

java.lang.Object
  extended by org.nuxeo.ecm.core.utils.BlobsExtractor

public class BlobsExtractor
extends Object

Extractor for all the blobs of a document.

Author:
Florent Guillaume, Benjamin Jalon

Constructor Summary
BlobsExtractor()
           
 
Method Summary
 Map<String,List<String>> getBlobFieldPathForDocumentType(String documentType)
          Get path list of properties that may contain a blob for the given document type.
 List<Blob> getBlobs(DocumentModel doc)
          Finds all the blobs of the document.
 List<Property> getBlobsProperties(DocumentModel doc)
          Get properties of the given document that contain a blob value.
 void invalidateCache()
           
 void invalidateDocumentTypeCache(String docType)
           
 void setExtractorProperties(Set<String> pathProps, Set<String> excludedPathProps, boolean indexBlobs)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobsExtractor

public BlobsExtractor()
Method Detail

getBlobsProperties

public List<Property> getBlobsProperties(DocumentModel doc)
                                  throws Exception
Get properties of the given document that contain a blob value. This method uses the cache engine to find these properties.

Throws:
Exception

getBlobFieldPathForDocumentType

public Map<String,List<String>> getBlobFieldPathForDocumentType(String documentType)
                                                         throws Exception
Get path list of properties that may contain a blob for the given document type.

Parameters:
documentType - document type name
Returns:
return the property names that contain blob
Throws:
Exception

invalidateDocumentTypeCache

public void invalidateDocumentTypeCache(String docType)

invalidateCache

public void invalidateCache()

getBlobs

public List<Blob> getBlobs(DocumentModel doc)
                    throws ClientException
Finds all the blobs of the document.

This method is not thread-safe.

Parameters:
doc - the document
Returns:
the list of blobs in the document
Throws:
ClientException

setExtractorProperties

public void setExtractorProperties(Set<String> pathProps,
                                   Set<String> excludedPathProps,
                                   boolean indexBlobs)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.