public class ScriptRenditionService extends BaseScopableProcessorExtension
| Constructor and Description |
|---|
ScriptRenditionService() |
| Modifier and Type | Method and Description |
|---|---|
ScriptRenditionDefinition |
createRenditionDefinition(java.lang.String renditionName,
java.lang.String renderingEngineName)
Creates a new
ScriptRenditionDefinition and sets the rendition name and
the rendering engine name to the specified values. |
ScriptNode |
getRenditionByName(ScriptNode node,
java.lang.String renditionName)
This method gets the rendition of the specified node identified by
the provided rendition name.
|
ScriptNode[] |
getRenditions(ScriptNode node)
This method gets all the renditions of the specified node.
|
ScriptNode[] |
getRenditions(ScriptNode node,
java.lang.String mimeTypePrefix)
This method gets all the renditions of the specified node filtered by
MIME-type prefix.
|
ScriptNode |
render(ScriptNode sourceNode,
ScriptRenditionDefinition scriptRenditionDef) |
ScriptNode |
render(ScriptNode sourceNode,
java.lang.String renditionDefQName)
This method renders the specified source node using the specified saved
rendition definition.
|
void |
setServiceRegistry(ServiceRegistry serviceRegistry)
Set the service registry
|
getScope, setScopegetExtensionName, register, setExtensionName, setProcessorpublic void setServiceRegistry(ServiceRegistry serviceRegistry)
serviceRegistry - the service registry.public ScriptRenditionDefinition createRenditionDefinition(java.lang.String renditionName, java.lang.String renderingEngineName)
ScriptRenditionDefinition and sets the rendition name and
the rendering engine name to the specified values.renditionName - A unique identifier used to specify the created
ScriptRenditionDefinition.renderingEngineName - The name of the rendering engine associated
with this ScriptRenditionDefinition.ScriptRenditionDefinition.RenditionService.createRenditionDefinition(QName, String)public ScriptNode render(ScriptNode sourceNode, java.lang.String renditionDefQName)
sourceNode - the source node to be rendered.renditionDefQName - the rendition definition to be used e.g. "cm:doclib" or
"{http://www.alfresco.org/model/content/1.0}imgpreview"RenditionService.render(org.alfresco.service.cmr.repository.NodeRef, RenditionDefinition)public ScriptNode render(ScriptNode sourceNode, ScriptRenditionDefinition scriptRenditionDef)
public ScriptNode[] getRenditions(ScriptNode node)
node - the source nodeRenditionService.getRenditions(org.alfresco.service.cmr.repository.NodeRef)public ScriptNode[] getRenditions(ScriptNode node, java.lang.String mimeTypePrefix)
node - the source node for the renditionsmimeTypePrefix - a prefix to check against the rendition MIME-types.
This must not be null and must not be an empty StringRenditionService.getRenditions(org.alfresco.service.cmr.repository.NodeRef)public ScriptNode getRenditionByName(ScriptNode node, java.lang.String renditionName)
node - the source node for the renditionsrenditionName - the renditionName used to identify a rendition. e.g. cm:doclib or
"{http://www.alfresco.org/model/content/1.0}imgpreview"null if there is no such rendition.RenditionService.getRenditionByName(org.alfresco.service.cmr.repository.NodeRef, QName)Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.