Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api.blobholder
Class BlobHolderAdapterComponent

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.core.api.blobholder.BlobHolderAdapterComponent
All Implemented Interfaces:
BlobHolderAdapterService, Adaptable, Component, Extensible

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
static String BLOBHOLDERFACTORY_EP
           
static String EXTERNALBLOB_ADAPTER_EP
           
 
Constructor Summary
BlobHolderAdapterComponent()
           
 
Method Summary
 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)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, applicationStarted, deactivate, getAdapter, registerExtension, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOBHOLDERFACTORY_EP

public static final String BLOBHOLDERFACTORY_EP
See Also:
Constant Field Values

EXTERNALBLOB_ADAPTER_EP

public static final String EXTERNALBLOB_ADAPTER_EP
See Also:
Constant Field Values
Constructor Detail

BlobHolderAdapterComponent

public BlobHolderAdapterComponent()
Method Detail

registerContribution

public void registerContribution(Object contribution,
                                 String extensionPoint,
                                 ComponentInstance contributor)
                          throws Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
Exception

unregisterContribution

public void unregisterContribution(Object contribution,
                                   String extensionPoint,
                                   ComponentInstance contributor)
                            throws Exception
Overrides:
unregisterContribution in class DefaultComponent
Throws:
Exception

getFactoryNames

public static Set<String> getFactoryNames()

getExternalBlobAdapterForPrefix

public ExternalBlobAdapter getExternalBlobAdapterForPrefix(String prefix)
Description copied from interface: BlobHolderAdapterService
Returns the external blob adapter registered for given prefix.

Specified by:
getExternalBlobAdapterForPrefix in interface BlobHolderAdapterService
See Also:
ExternalBlobAdapter

getExternalBlobAdapterForUri

public ExternalBlobAdapter getExternalBlobAdapterForUri(String uri)
Description copied from interface: BlobHolderAdapterService
Returns the external blob adapter parsed from given URI.

Specified by:
getExternalBlobAdapterForUri in interface BlobHolderAdapterService
See Also:
ExternalBlobAdapter

getExternalBlobForUri

public Blob getExternalBlobForUri(String uri)
                           throws PropertyException
Description copied from interface: BlobHolderAdapterService
Returns an external blob from given uri.

Specified by:
getExternalBlobForUri in 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)
See Also:
ExternalBlobAdapter

getBlobHolderAdapter

public BlobHolder getBlobHolderAdapter(DocumentModel doc)
Specified by:
getBlobHolderAdapter in interface BlobHolderAdapterService

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.