public class RenditionServiceImpl extends DefaultComponent implements RenditionService
RenditionService.| Modifier and Type | Field and Description | 
|---|---|
| static String | RENDITION_DEFINITIONS_EP | 
| Constructor and Description | 
|---|
| RenditionServiceImpl() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | activate(ComponentContext context)Activates the component. | 
| void | deactivate(ComponentContext context)Deactivates the component. | 
| List<RenditionDefinition> | getAvailableRenditionDefinitions(DocumentModel doc)Returns a  ListofRenditionDefinitionavailable on the
 given Document. | 
| List<Rendition> | getAvailableRenditions(DocumentModel doc)Returns a  ListofRenditionavailable on the given
 Document. | 
| List<RenditionDefinition> | getDeclaredRenditionDefinitions()Returns a  Listof registeredRenditionDefinition. | 
| List<RenditionDefinition> | getDeclaredRenditionDefinitionsForProviderType(String providerType)Returns a  Listof registeredRenditionDefinitionmatching
 a given provider type | 
| Rendition | getRendition(DocumentModel doc,
            String renditionName)Return the  Renditionobject for the givenDocumentModeland a rendition definition name. | 
| Rendition | getRendition(DocumentModel doc,
            String renditionName,
            boolean store)Return the  Renditionobject for the givenDocumentModeland a rendition definition name. | 
| void | registerContribution(Object contribution,
                    String extensionPoint,
                    ComponentInstance contributor) | 
| DocumentRef | storeRendition(DocumentModel source,
              String renditionDefinitionName)Render a document based on the given rendition definition name and
 returns the stored Rendition  DocumentRef. | 
| void | unregisterContribution(Object contribution,
                      String extensionPoint,
                      ComponentInstance contributor) | 
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtensionpublic static final String RENDITION_DEFINITIONS_EP
public void activate(ComponentContext context) throws Exception
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextException - if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate in class DefaultComponentcontext - the runtime contextException - if an error occurs during activationpublic List<RenditionDefinition> getDeclaredRenditionDefinitions()
RenditionServiceList of registered RenditionDefinition. The
 order of the List does not depend on the registering order.getDeclaredRenditionDefinitions in interface RenditionServicepublic List<RenditionDefinition> getDeclaredRenditionDefinitionsForProviderType(String providerType)
RenditionServiceList of registered RenditionDefinition matching
 a given provider typegetDeclaredRenditionDefinitionsForProviderType in interface RenditionServicepublic List<RenditionDefinition> getAvailableRenditionDefinitions(DocumentModel doc)
RenditionServiceList of RenditionDefinition available on the
 given Document. The order of the List does not depend on the registering
 order.getAvailableRenditionDefinitions in interface RenditionServicepublic DocumentRef storeRendition(DocumentModel source, String renditionDefinitionName) throws RenditionException
RenditionServiceDocumentRef.
 Only the user launching the render operation has the Read right on the returned document.
storeRendition in interface RenditionServicesource - the document to renderrenditionDefinitionName - the rendition definition to useDocumentRef of the newly created Rendition document.RenditionExceptionpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution in class DefaultComponentExceptionpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution in class DefaultComponentExceptionpublic Rendition getRendition(DocumentModel doc, String renditionName) throws RenditionException
RenditionServiceRendition object for the given DocumentModel
 and a rendition definition name.
 A stored rendition is returned if found and up to date, a new Rendition is created otherwise.
getRendition in interface RenditionServicedoc - the document to renderrenditionName - the name of the rendition definitionRendition objectRenditionExceptionpublic Rendition getRendition(DocumentModel doc, String renditionName, boolean store) throws RenditionException
RenditionServiceRendition object for the given DocumentModel
 and a rendition definition name.
 A stored rendition is returned if found and up to date, a new (live) Rendition is created otherwise.
If store parameter is true, the new created rendition is stored too and returned
getRendition in interface RenditionServicedoc - the document to renderrenditionName - the name of the rendition definitionstore - indicates if the rendition must be storedRendition objectRenditionExceptionpublic List<Rendition> getAvailableRenditions(DocumentModel doc) throws RenditionException
RenditionServiceList of Rendition available on the given
 Document.
 The order of the List does not depend on the registering order.
The returned rendition may be live or stored
getAvailableRenditions in interface RenditionServiceRenditionExceptionCopyright © 2014 Nuxeo SA. All rights reserved.