public class BlobHolderAdapterComponent extends DefaultComponent implements BlobHolderAdapterService
DocumentAdapterFactory
.
Also provides the service interface BlobHolderAdapterService
Modifier and Type | Field and Description |
---|---|
static String |
BLOBHOLDERFACTORY_EP |
static String |
EXTERNALBLOB_ADAPTER_EP |
protected static Map<String,ExternalBlobAdapter> |
externalBlobAdapters |
protected Map<String,BlobHolderFactory> |
factories |
protected Map<String,BlobHolderFactory> |
factoriesByFacets |
protected Map<String,BlobHolderFactory> |
factoriesByName |
lastModified
Constructor and Description |
---|
BlobHolderAdapterComponent() |
Modifier and Type | Method and Description |
---|---|
BlobHolder |
getBlobHolderAdapter(DocumentModel doc) |
BlobHolder |
getBlobHolderAdapter(DocumentModel doc,
String factoryName)
Get a blob holder adapter instantiated by given factory name.
|
ExternalBlobAdapter |
getExternalBlobAdapterForPrefix(String prefix)
Returns the external blob adapter registered for given prefix.
|
ExternalBlobAdapter |
getExternalBlobAdapterForUri(String uri)
Returns the external blob adapter parsed from given URI.
|
Blob |
getExternalBlobForUri(String uri)
Returns an external blob from given uri.
|
static Set<String> |
getFactoryNames() |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, deactivate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public static final String BLOBHOLDERFACTORY_EP
public static final String EXTERNALBLOB_ADAPTER_EP
protected final Map<String,BlobHolderFactory> factories
protected Map<String,BlobHolderFactory> factoriesByFacets
protected Map<String,BlobHolderFactory> factoriesByName
protected static final Map<String,ExternalBlobAdapter> externalBlobAdapters
public BlobHolderAdapterComponent()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public static Set<String> getFactoryNames()
public ExternalBlobAdapter getExternalBlobAdapterForPrefix(String prefix)
BlobHolderAdapterService
getExternalBlobAdapterForPrefix
in interface BlobHolderAdapterService
ExternalBlobAdapter
public ExternalBlobAdapter getExternalBlobAdapterForUri(String uri)
BlobHolderAdapterService
getExternalBlobAdapterForUri
in interface BlobHolderAdapterService
ExternalBlobAdapter
public Blob getExternalBlobForUri(String uri) throws PropertyException, IOException
BlobHolderAdapterService
getExternalBlobForUri
in interface BlobHolderAdapterService
uri
- the uri describing what adapter handles the file and the needed info to retrieve it.PropertyException
- if the blob cannot be retrieved (if adapter cannot retrieve it or if file is not found
for instance)IOException
ExternalBlobAdapter
public BlobHolder getBlobHolderAdapter(DocumentModel doc, String factoryName)
BlobHolderAdapterService
getBlobHolderAdapter
in interface BlobHolderAdapterService
factoryName
- the factory namepublic BlobHolder getBlobHolderAdapter(DocumentModel doc)
getBlobHolderAdapter
in interface BlobHolderAdapterService
Copyright © 2018 Nuxeo. All rights reserved.