public class RenditionServiceImpl extends DefaultComponent implements RenditionService
RenditionService
.Modifier and Type | Class and Description |
---|---|
static class |
RenditionServiceImpl.RenditionCreator |
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()
Returns a
List of registered RenditionDefinition . |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
DocumentRef |
render(DocumentModel source,
String renditionDefinitionName)
Render a document based on the given rendition definition name
and returns the Rendition document.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
applicationStarted, getAdapter, registerExtension, unregisterExtension
public static final String RENDITION_DEFINITIONS_EP
public void activate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic void deactivate(ComponentContext context) throws Exception
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextException
- if an error occurs during activationpublic List<RenditionDefinition> getAvailableRenditionDefinitions()
RenditionService
List
of registered RenditionDefinition
. The
order of the List does not depend on the registering order.getAvailableRenditionDefinitions
in interface RenditionService
public DocumentRef render(DocumentModel source, String renditionDefinitionName) throws RenditionException
RenditionService
Only the user launching the render operation has the Read right on the returned document.
render
in interface RenditionService
source
- the document to renderrenditionDefinitionName
- the rendition definition to useDocumentRef
of the newly created Rendition document.RenditionException
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
Copyright © 2011 Nuxeo SA. All Rights Reserved.