Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.service.cmr.rendition
Interface RenditionService
All Superinterfaces:
org.alfresco.repo.rendition.RenditionDefinitionPersister

@org.alfresco.api.AlfrescoPublicApi
public interface RenditionService
extends org.alfresco.repo.rendition.RenditionDefinitionPersister
The Rendition service.
Author:
Nick Smith, Neil McErlean

Field Summary
PARAM_DESTINATION_NODE
          This optional NodeRef parameter specifies an existing NodeRef to use as the rendition node.
PARAM_DESTINATION_PATH_TEMPLATE
          This optional String parameter indicates where the rendition will be created.
PARAM_IS_COMPONENT_RENDITION
          This optional boolean parameter specified whether the rendition is a component within a composite rendition.
PARAM_ORPHAN_EXISTING_RENDITION
          This optional Boolean flag parameter determines whether an existing rendition is moved or orphaned.
PARAM_RENDITION_NODETYPE
          This optional QName parameter specifies what the node type of the created rendition will be.
Method Summary
void
cancelRenditions(NodeRef sourceNode)
          Cancels all known cancellable running renditions for the given NodeRef via the org.alfresco.service.cmr.action.ActionTrackingService.
void
cancelRenditions(NodeRef sourceNode, String type)
          Cancels all known cancellable running renditions for the given NodeRef and type via the org.alfresco.service.cmr.action.ActionTrackingService.
org.alfresco.service.cmr.rendition.CompositeRenditionDefinition
createCompositeRenditionDefinition(QName renditionName)
          Creates a new CompositeRenditionDefinition and sets the rendition name and the rendering engine name to the specified values.
createRenditionDefinition(QName renditionName, String renderingEngineName)
          Creates a new RenditionDefinition and sets the rendition name and the rendering engine name to the specified values.
org.alfresco.service.cmr.rendition.RenderingEngineDefinition
getRenderingEngineDefinition(String name)
          Returns the RenderingEngineDefinition associated with the specified rendering engine name.
List<org.alfresco.service.cmr.rendition.RenderingEngineDefinition>
getRenderingEngineDefinitions()
getRenditionByName(NodeRef node, QName renditionName)
          This method gets the rendition of the specified node identified by the provided rendition name.
getRenditions(NodeRef node)
          This method gets all the renditions of the specified node.
getRenditions(NodeRef node, String mimeTypePrefix)
          This method gets all the renditions of the specified node filtered by MIME-type prefix.
getSourceNode(NodeRef renditionNode)
          This method gets the source node for the specified rendition node.
boolean
isRendition(NodeRef node)
          This method returns true if the specified NodeRef is a valid rendition node, else false.
render(NodeRef sourceNode, QName renditionDefinitionQName)
          This method synchronously renders content as specified by the given rendition name.
void
render(NodeRef sourceNode, QName renditionDefinitionQName, org.alfresco.service.cmr.rendition.RenderCallback callback)
          This method asynchronously renders content as specified by the given rendition definition name.
render(NodeRef sourceNode, RenditionDefinition renditionDefinition)
          This method synchronously renders content as specified by the given RenditionDefinition.
void
render(NodeRef sourceNode, RenditionDefinition renditionDefinition, org.alfresco.service.cmr.rendition.RenderCallback callback)
          This method asynchronously renders content as specified by the given RenditionDefinition.
Methods inherited from interface org.alfresco.repo.rendition.RenditionDefinitionPersister
loadRenditionDefinition, loadRenditionDefinitions, loadRenditionDefinitions, saveRenditionDefinition
Field Detail
PARAM_DESTINATION_NODE
public static final String PARAM_DESTINATION_NODE
This optional NodeRef parameter specifies an existing NodeRef to use as the rendition node. Properties on this node (including the content property cm:content) will be updated as required but the location and name of the node will not change. This parameter takes precedence over PARAM_DESTINATION_PATH_TEMPLATE.
See Also:
Constant Field Values

PARAM_DESTINATION_PATH_TEMPLATE
public static final String PARAM_DESTINATION_PATH_TEMPLATE
This optional String parameter indicates where the rendition will be created. The parameter may specify either the actual file path to the rendition or it may specify a Freemarker template which can be resolved to a file path. In either case the path is relative to the root node of the store in which the source node exists. If the parameter PARAM_DESTINATION_NODE has been set then this parameter will be ignored.
See Also:
Constant Field Values

PARAM_IS_COMPONENT_RENDITION
public static final String PARAM_IS_COMPONENT_RENDITION
This optional boolean parameter specified whether the rendition is a component within a composite rendition. Such component renditions should not execute the standard pre- and post-rendition behaviour as it will be taken care of by the CompositeRenderingEngine's execution.
See Also:
Constant Field Values

PARAM_ORPHAN_EXISTING_RENDITION
public static final String PARAM_ORPHAN_EXISTING_RENDITION
This optional Boolean flag parameter determines whether an existing rendition is moved or orphaned. If the source node already has a rendition and this parameter is false the old rendition will be moved to the new destination location and updated appropriately. If this parameter is set to true then the old rendition will be left in its current location and the rold rendition association from the source node to the old rendition will be deleted.
See Also:
Constant Field Values

PARAM_RENDITION_NODETYPE
public static final String PARAM_RENDITION_NODETYPE
This optional QName parameter specifies what the node type of the created rendition will be. If no type is specified then this defaults to cm:content.
See Also:
Constant Field Values
Method Detail
getRenderingEngineDefinition
@NotAuditable
org.alfresco.service.cmr.rendition.RenderingEngineDefinition getRenderingEngineDefinition(String name)
Returns the RenderingEngineDefinition associated with the specified rendering engine name.
Parameters:
name - The rendering engine name.
Returns:
The RenderingEngineDefinition or null.

getRenderingEngineDefinitions
@NotAuditable
List<org.alfresco.service.cmr.rendition.RenderingEngineDefinition> getRenderingEngineDefinitions()
Returns:
A List of all available RenderingEngineDefinition s.

createRenditionDefinition
@NotAuditable
RenditionDefinition createRenditionDefinition(QName renditionName,
                                              String renderingEngineName)
Creates a new RenditionDefinition and sets the rendition name and the rendering engine name to the specified values.
Parameters:
renditionName - A unique identifier used to specify the created RenditionDefinition.
renderingEngineName - The name of the rendering engine associated with this RenditionDefinition.
Returns:
the created RenditionDefinition.

createCompositeRenditionDefinition
@NotAuditable
org.alfresco.service.cmr.rendition.CompositeRenditionDefinition createCompositeRenditionDefinition(QName renditionName)
Creates a new CompositeRenditionDefinition and sets the rendition name and the rendering engine name to the specified values.
Parameters:
renditionName - A unique identifier used to specify the created RenditionDefinition.
Returns:
the created CompositeRenditionDefinition.

getRenditions
@NotAuditable
List<ChildAssociationRefgetRenditions(NodeRef node)
This method gets all the renditions of the specified node.
Returns:
a list of ChildAssociationRefs which link the source node to the renditions.

getRenditions
@NotAuditable
List<ChildAssociationRefgetRenditions(NodeRef node,
                                        String mimeTypePrefix)
This method gets all the renditions of the specified node filtered by MIME-type prefix. Renditions whose MIME-type string startsWith the prefix will be returned.
Parameters:
node - the source node for the renditions
mimeTypePrefix - a prefix to check against the rendition MIME-types. This must not be null and must not be an empty String
Returns:
a list of ChildAssociationRefs which link the source node to the filtered renditions.

getRenditionByName
@NotAuditable
ChildAssociationRef getRenditionByName(NodeRef node,
                                       QName renditionName)
This method gets the rendition of the specified node identified by the provided rendition name.
Parameters:
node - the source node for the renditions
renditionName - the renditionName used to identify a rendition.
Returns:
the ChildAssociationRef which links the source node to the rendition or null if there is no such rendition.

isRendition
@NotAuditable
boolean isRendition(NodeRef node)
This method returns true if the specified NodeRef is a valid rendition node, else false. A nodeRef is a rendition node if it has the rn:rendition aspect (or sub-aspect) applied.
Parameters:
node - NodeRef
Returns:
true if a rendition, else false

getSourceNode
@NotAuditable
ChildAssociationRef getSourceNode(NodeRef renditionNode)
This method gets the source node for the specified rendition node. There should only be one source node for any given rendition node.
Parameters:
renditionNode - the nodeRef holding the rendition.
Returns:
the ChildAssociationRef whose parentNodeRef is the source node, or null if there is no source node.
See Also:
isRendition(NodeRef)

render
@NotAuditable
ChildAssociationRef render(NodeRef sourceNode,
                           RenditionDefinition renditionDefinition)
This method synchronously renders content as specified by the given RenditionDefinition. The content to be rendered is provided by the specified source node.
Parameters:
sourceNode - the node from which the content is retrieved.
renditionDefinition - this fully specifies the rendition which is to be performed.
Returns:
a child association reference which is the link from the source node to the newly rendered content.
Throws:
RenditionServiceException - if there is a problem in rendering the given sourceNode

render
@NotAuditable
void render(NodeRef sourceNode,
            RenditionDefinition renditionDefinition,
            org.alfresco.service.cmr.rendition.RenderCallback callback)
This method asynchronously renders content as specified by the given RenditionDefinition. The content to be rendered is provided by the specified source node.
Parameters:
sourceNode - the node from which the content is retrieved.
renditionDefinition - this fully specifies the rendition which is to be performed.
callback - a callback object to handle the ultimate result of the rendition.

render
@NotAuditable
ChildAssociationRef render(NodeRef sourceNode,
                           QName renditionDefinitionQName)
This method synchronously renders content as specified by the given rendition name. The content to be rendered is provided by the specified source node.

The Rendition Definition will be loaded from the standard location as system thus allowing rendition definitions to be used even when the Data Dictionary has restricted read access.

Parameters:
sourceNode - the node from which the content is retrieved.
renditionDefinitionQName - the rendition definition which is to be performed.
Returns:
a child association reference which is the link from the source node to the newly rendered content.
Throws:
RenditionServiceException - if there is a problem in rendering the given sourceNode
Since:
3.4.2

render
@NotAuditable
void render(NodeRef sourceNode,
            QName renditionDefinitionQName,
            org.alfresco.service.cmr.rendition.RenderCallback callback)
This method asynchronously renders content as specified by the given rendition definition name. The content to be rendered is provided by the specified source node.

The Rendition Definition will be loaded from the standard location as system thus allowing rendition definitions to be used even when the Data Dictionary has restricted read access.

Parameters:
sourceNode - the node from which the content is retrieved.
renditionDefinitionQName - the rendition definition which is to be performed.
callback - a callback object to handle the ultimate result of the rendition.
Since:
3.4.2

cancelRenditions
@NotAuditable
void cancelRenditions(NodeRef sourceNode)
Cancels all known cancellable running renditions for the given NodeRef via the org.alfresco.service.cmr.action.ActionTrackingService.
Parameters:
sourceNode - the NodeRef the action is acting on
Since:
4.1.6

cancelRenditions
@NotAuditable
void cancelRenditions(NodeRef sourceNode,
                      String type)
Cancels all known cancellable running renditions for the given NodeRef and type via the org.alfresco.service.cmr.action.ActionTrackingService.
Parameters:
sourceNode - the NodeRef the action is acting on
type - the rendition type (rending engine name)
Since:
4.1.6

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.