Package org.nuxeo.ecm.core.api.thumbnail
Class ThumbnailServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.core.api.thumbnail.ThumbnailServiceImpl
-
- All Implemented Interfaces:
ThumbnailService
,Adaptable
,Component
,Extensible
,TimestampedService
public class ThumbnailServiceImpl extends DefaultComponent implements ThumbnailService
Thumbnail service providing 3 kind of factories: by facet, by doctype, and thumbnail default one- Since:
- 5.7
-
-
Field Summary
Fields Modifier and Type Field Description protected ThumbnailFactory
defaultFactory
protected Map<String,ThumbnailFactory>
factoriesByDocType
protected Map<String,ThumbnailFactory>
factoriesByFacets
static String
THUMBNAILFACTORY_EP
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description ThumbnailServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Blob
computeThumbnail(DocumentModel doc, CoreSession session)
Compute the thumbnail (related to the document type/facet)ThumbnailFactory
getDefaultFactory()
Set<String>
getFactoryByDocTypeNames()
Set<String>
getFactoryByFacetNames()
Blob
getThumbnail(DocumentModel doc, CoreSession session)
Get the document thumbnail (related to the doc type/facet)ThumbnailFactory
getThumbnailFactory(DocumentModel doc, CoreSession session)
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
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
THUMBNAILFACTORY_EP
public static final String THUMBNAILFACTORY_EP
- See Also:
- Constant Field Values
-
defaultFactory
protected ThumbnailFactory defaultFactory
-
factoriesByDocType
protected final Map<String,ThumbnailFactory> factoriesByDocType
-
factoriesByFacets
protected final Map<String,ThumbnailFactory> factoriesByFacets
-
-
Method Detail
-
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
-
getDefaultFactory
public ThumbnailFactory getDefaultFactory()
-
getThumbnail
public Blob getThumbnail(DocumentModel doc, CoreSession session)
Description copied from interface:ThumbnailService
Get the document thumbnail (related to the doc type/facet)- Specified by:
getThumbnail
in interfaceThumbnailService
-
computeThumbnail
public Blob computeThumbnail(DocumentModel doc, CoreSession session)
Description copied from interface:ThumbnailService
Compute the thumbnail (related to the document type/facet)- Specified by:
computeThumbnail
in interfaceThumbnailService
-
getThumbnailFactory
public ThumbnailFactory getThumbnailFactory(DocumentModel doc, CoreSession session)
-
-