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 for
DocumentAdapterFactory
.
Also provides the service interface BlobHolderAdapterService
- Author:
- tiry
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected static final Map<String,
ExternalBlobAdapter> protected final Map<String,
BlobHolderFactory> protected Map<String,
BlobHolderFactory> protected Map<String,
BlobHolderFactory> Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBlobHolderAdapter
(DocumentModel doc, String factoryName) Get a blob holder adapter instantiated by given factory name.Returns the external blob adapter registered for given prefix.Returns the external blob adapter parsed from given URI.Returns an external blob from given uri.void
registerContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) void
unregisterContribution
(Object contribution, String extensionPoint, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
BLOBHOLDERFACTORY_EP
- See Also:
-
EXTERNALBLOB_ADAPTER_EP
- See Also:
-
factories
-
factoriesByFacets
-
factoriesByName
-
externalBlobAdapters
-
-
Constructor Details
-
BlobHolderAdapterComponent
public BlobHolderAdapterComponent()
-
-
Method Details
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContribution
in classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContribution
in classDefaultComponent
-
getFactoryNames
-
getExternalBlobAdapterForPrefix
Description copied from interface:BlobHolderAdapterService
Returns the external blob adapter registered for given prefix.- Specified by:
getExternalBlobAdapterForPrefix
in interfaceBlobHolderAdapterService
- See Also:
-
getExternalBlobAdapterForUri
Description copied from interface:BlobHolderAdapterService
Returns the external blob adapter parsed from given URI.- Specified by:
getExternalBlobAdapterForUri
in interfaceBlobHolderAdapterService
- See Also:
-
getExternalBlobForUri
Description copied from interface:BlobHolderAdapterService
Returns an external blob from given uri.- Specified by:
getExternalBlobForUri
in interfaceBlobHolderAdapterService
- 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:
-
getBlobHolderAdapter
Description copied from interface:BlobHolderAdapterService
Get a blob holder adapter instantiated by given factory name.- Specified by:
getBlobHolderAdapter
in interfaceBlobHolderAdapterService
factoryName
- the factory name- Returns:
- a blob holder adapter
-
getBlobHolderAdapter
- Specified by:
getBlobHolderAdapter
in interfaceBlobHolderAdapterService
-