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 |
Constructor and Description |
---|
BlobHolderAdapterComponent() |
Modifier and Type | Method and Description |
---|---|
BlobHolder |
getBlobHolderAdapter(DocumentModel doc) |
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, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtension
public static final String BLOBHOLDERFACTORY_EP
public static final String EXTERNALBLOB_ADAPTER_EP
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 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)
getBlobHolderAdapter
in interface BlobHolderAdapterService
Copyright © 2015 Nuxeo SA. All rights reserved.