public class BlobManagerComponent extends DefaultComponent implements BlobManager
Blobs, through internally-registered
BlobProviders.| Modifier and Type | Class and Description |
|---|---|
protected static class |
BlobManagerComponent.BlobProviderDescriptorRegistry |
BlobManager.UsageHint| Modifier and Type | Field and Description |
|---|---|
protected BlobManagerComponent.BlobProviderDescriptorRegistry |
blobProviderDescriptorsRegistry |
protected Map<String,BlobProvider> |
blobProviders |
protected static String |
XP |
lastModified| Constructor and Description |
|---|
BlobManagerComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeOldBlobProvider(String id)
We're about to change something about a contributed blob provider.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
Map<String,URI> |
getAvailableConversions(Blob blob,
BlobManager.UsageHint hint)
Gets a map of available MIME type conversions and corresponding
URI for a blob. |
BlobProvider |
getBlobProvider(Blob blob)
Gets the blob provider for the given blob.
|
BlobProvider |
getBlobProvider(String providerId)
Gets the blob provider with the given id.
|
Map<String,BlobProvider> |
getBlobProviders()
Get the map of blob providers
|
InputStream |
getStream(Blob blob)
INTERNAL - Gets an
InputStream for the data of a managed blob. |
InputStream |
getThumbnail(Blob blob)
Gets an
InputStream for a thumbnail of a blob. |
URI |
getURI(Blob blob,
BlobManager.UsageHint hint,
javax.servlet.http.HttpServletRequest servletRequest)
Gets an
URI for the content of a blob. |
void |
registerBlobProvider(BlobProviderDescriptor descr) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterBlobProvider(BlobProviderDescriptor descr) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderprotected static final String XP
protected BlobManagerComponent.BlobProviderDescriptorRegistry blobProviderDescriptorsRegistry
protected Map<String,BlobProvider> blobProviders
public BlobManagerComponent()
public void deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic void registerBlobProvider(BlobProviderDescriptor descr)
public void unregisterBlobProvider(BlobProviderDescriptor descr)
protected void closeOldBlobProvider(String id)
public BlobProvider getBlobProvider(String providerId)
BlobManagergetBlobProvider in interface BlobManagerproviderId - the blob provider idpublic BlobProvider getBlobProvider(Blob blob)
BlobManagergetBlobProvider in interface BlobManagerpublic InputStream getStream(Blob blob) throws IOException
BlobManagerInputStream for the data of a managed blob. Used by internal implementations, regular
callers should call Blob.getStream().getStream in interface BlobManagerblob - the blobIOExceptionpublic InputStream getThumbnail(Blob blob) throws IOException
BlobManagerInputStream for a thumbnail of a blob.
Like all InputStream, the result must be closed when done with it to avoid resource leaks.
getThumbnail in interface BlobManagerblob - the blobIOExceptionpublic URI getURI(Blob blob, BlobManager.UsageHint hint, javax.servlet.http.HttpServletRequest servletRequest) throws IOException
BlobManagerURI for the content of a blob.getURI in interface BlobManagerblob - the blobhint - BlobManager.UsageHintservletRequest - the servlet request, or nullURI, or null if none availableIOExceptionpublic Map<String,URI> getAvailableConversions(Blob blob, BlobManager.UsageHint hint) throws IOException
BlobManagerURI for a blob.getAvailableConversions in interface BlobManagerURI, which may be emptyIOExceptionpublic Map<String,BlobProvider> getBlobProviders()
BlobManagergetBlobProviders in interface BlobManagerCopyright © 2018 Nuxeo. All rights reserved.