Class ScriptRenditionService2
java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.jscript.BaseScopableProcessorExtension
org.alfresco.repo.rendition2.script.ScriptRenditionService2
- All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension,Scopeable
The
ScriptRenditionService2 class provides a scripting interface for working with Rendition Service 2. It allows rendering source nodes with specified rendition definitions and retrieving renditions associated with a node.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRenditionByName(ScriptNode node, String renditionName) Retrieves aScriptNodeobject representing the rendition with the specified name associated with the given node.getRenditions(ScriptNode node) Retrieves an array ofScriptNodeobjects representing renditions associated with the specified node.voidrender(ScriptNode sourceNode, String renditionName) Renders the specified source node with the given rendition definition.voidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets theServiceRegistryto be used by this script object.Methods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScopeMethods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
-
Constructor Details
-
ScriptRenditionService2
public ScriptRenditionService2()
-
-
Method Details
-
setServiceRegistry
Sets theServiceRegistryto be used by this script object.- Parameters:
serviceRegistry- The ServiceRegistry to be set.
-
render
Renders the specified source node with the given rendition definition. Since renditionService2 is designed to asynchronous, no result is returned.- Parameters:
sourceNode- The source node to be rendered.renditionName- The name of the rendition definition, like "pdf".
-
getRenditions
Retrieves an array ofScriptNodeobjects representing renditions associated with the specified node.- Parameters:
node- The node for which to retrieve renditions.- Returns:
- An array of
ScriptNodeobjects representing renditions.
-
getRenditionByName
Retrieves aScriptNodeobject representing the rendition with the specified name associated with the given node.- Parameters:
node- The node for which to retrieve the rendition.renditionName- The name of the rendition.- Returns:
- A
ScriptNodeobject representing the specified rendition, ornullif not found.
-