Class BlobHolderAdapterComponent
- java.lang.Object
- 
- org.nuxeo.runtime.model.DefaultComponent
- 
- org.nuxeo.ecm.core.api.blobholder.BlobHolderAdapterComponent
 
 
- 
- All Implemented Interfaces:
- BlobHolderAdapterService,- Adaptable,- Component,- Extensible,- TimestampedService
 
 public class BlobHolderAdapterComponent extends DefaultComponent implements BlobHolderAdapterService Runtime component to manage the pluggable factory forDocumentAdapterFactory.Also provides the service interface BlobHolderAdapterService- Author:
- tiry
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringBLOBHOLDERFACTORY_EPstatic StringEXTERNALBLOB_ADAPTER_EPprotected static Map<String,ExternalBlobAdapter>externalBlobAdaptersprotected Map<String,BlobHolderFactory>factoriesprotected Map<String,BlobHolderFactory>factoriesByFacetsprotected Map<String,BlobHolderFactory>factoriesByName- 
Fields inherited from class org.nuxeo.runtime.model.DefaultComponentlastModified, name
 
- 
 - 
Constructor SummaryConstructors Constructor Description BlobHolderAdapterComponent()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobHoldergetBlobHolderAdapter(DocumentModel doc)BlobHoldergetBlobHolderAdapter(DocumentModel doc, String factoryName)Get a blob holder adapter instantiated by given factory name.ExternalBlobAdaptergetExternalBlobAdapterForPrefix(String prefix)Returns the external blob adapter registered for given prefix.ExternalBlobAdaptergetExternalBlobAdapterForUri(String uri)Returns the external blob adapter parsed from given URI.BlobgetExternalBlobForUri(String uri)Returns an external blob from given uri.static Set<String>getFactoryNames()voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)- 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponentactivate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.nuxeo.runtime.model.ComponentapplicationStarted, getApplicationStartedOrder
 
- 
 
- 
- 
- 
Field Detail- 
BLOBHOLDERFACTORY_EPpublic static final String BLOBHOLDERFACTORY_EP - See Also:
- Constant Field Values
 
 - 
EXTERNALBLOB_ADAPTER_EPpublic static final String EXTERNALBLOB_ADAPTER_EP - See Also:
- Constant Field Values
 
 - 
factoriesprotected final Map<String,BlobHolderFactory> factories 
 - 
factoriesByFacetsprotected Map<String,BlobHolderFactory> factoriesByFacets 
 - 
factoriesByNameprotected Map<String,BlobHolderFactory> factoriesByName 
 - 
externalBlobAdaptersprotected static final Map<String,ExternalBlobAdapter> externalBlobAdapters 
 
- 
 - 
Method Detail- 
registerContributionpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
- registerContributionin class- DefaultComponent
 
 - 
unregisterContributionpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
- unregisterContributionin class- DefaultComponent
 
 - 
getExternalBlobAdapterForPrefixpublic ExternalBlobAdapter getExternalBlobAdapterForPrefix(String prefix) Description copied from interface:BlobHolderAdapterServiceReturns the external blob adapter registered for given prefix.- Specified by:
- getExternalBlobAdapterForPrefixin interface- BlobHolderAdapterService
- See Also:
- ExternalBlobAdapter
 
 - 
getExternalBlobAdapterForUripublic ExternalBlobAdapter getExternalBlobAdapterForUri(String uri) Description copied from interface:BlobHolderAdapterServiceReturns the external blob adapter parsed from given URI.- Specified by:
- getExternalBlobAdapterForUriin interface- BlobHolderAdapterService
- See Also:
- ExternalBlobAdapter
 
 - 
getExternalBlobForUripublic Blob getExternalBlobForUri(String uri) throws PropertyException, IOException Description copied from interface:BlobHolderAdapterServiceReturns an external blob from given uri.- Specified by:
- getExternalBlobForUriin interface- BlobHolderAdapterService
- Parameters:
- uri- the uri describing what adapter handles the file and the needed info to retrieve it.
- Returns:
- the resolved blob.
- Throws:
- PropertyException- if the blob cannot be retrieved (if adapter cannot retrieve it or if file is not found for instance)
- IOException
- See Also:
- ExternalBlobAdapter
 
 - 
getBlobHolderAdapterpublic BlobHolder getBlobHolderAdapter(DocumentModel doc, String factoryName) Description copied from interface:BlobHolderAdapterServiceGet a blob holder adapter instantiated by given factory name.- Specified by:
- getBlobHolderAdapterin interface- BlobHolderAdapterService
- factoryName- the factory name
- Returns:
- a blob holder adapter
 
 - 
getBlobHolderAdapterpublic BlobHolder getBlobHolderAdapter(DocumentModel doc) - Specified by:
- getBlobHolderAdapterin interface- BlobHolderAdapterService
 
 
- 
 
-