Interface RenditionService
- All Superinterfaces:
RenditionDefinitionPersister
- All Known Implementing Classes:
RenditionServiceImpl
@Deprecated
@AlfrescoPublicApi
public interface RenditionService
extends RenditionDefinitionPersister
Deprecated.
The RenditionService is being replace by the simpler async RenditionService2.
The Rendition service.
- Author:
- Nick Smith, Neil McErlean
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.This optionalStringparameter indicates where the rendition will be created.static final StringDeprecated.This optional boolean parameter specified whether the rendition is a component within a composite rendition.static final StringDeprecated.This optionalBooleanflag parameter determines whether an existing rendition is moved or orphaned.static final StringDeprecated.This optionalQNameparameter specifies what the node type of the created rendition will be. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelRenditions(NodeRef sourceNode) Deprecated.Cancels all known cancellable running renditions for the givenNodeRefvia theActionTrackingService.voidcancelRenditions(NodeRef sourceNode, String type) Deprecated.Cancels all known cancellable running renditions for the givenNodeRefand type via theActionTrackingService.createCompositeRenditionDefinition(QName renditionName) Deprecated.Creates a newCompositeRenditionDefinitionand sets the rendition name and the rendering engine name to the specified values.createRenditionDefinition(QName renditionName, String renderingEngineName) Deprecated.Creates a newRenditionDefinitionand sets the rendition name and the rendering engine name to the specified values.Deprecated.Returns theRenderingEngineDefinitionassociated with the specified rendering engine name.Deprecated.getRenditionByName(NodeRef node, QName renditionName) Deprecated.This method gets the rendition of the specified node identified by the provided rendition name.getRenditions(NodeRef node) Deprecated.This method gets all the renditions of the specified node.getRenditions(NodeRef node, String mimeTypePrefix) Deprecated.This method gets all the renditions of the specified node filtered by MIME-type prefix.getSourceNode(NodeRef renditionNode) Deprecated.This method gets the source node for the specified rendition node.booleanisRendition(NodeRef node) Deprecated.This method returnstrueif the specified NodeRef is a valid rendition node, elsefalse.render(NodeRef sourceNode, RenditionDefinition renditionDefinition) Deprecated.This method synchronously renders content as specified by the givenRenditionDefinition.voidrender(NodeRef sourceNode, RenditionDefinition renditionDefinition, RenderCallback callback) Deprecated.This method asynchronously renders content as specified by the givenRenditionDefinition.Deprecated.This method synchronously renders content as specified by the givenrendition name.voidrender(NodeRef sourceNode, QName renditionDefinitionQName, RenderCallback callback) Deprecated.This method asynchronously renders content as specified by the givenrendition definition name.booleanusingRenditionService2(NodeRef sourceNodeRef, RenditionDefinition rendDefn) Deprecated.If a rendition has been created by the newer RenditionService2, this method will return true.Methods inherited from interface org.alfresco.repo.rendition.RenditionDefinitionPersister
loadRenditionDefinition, loadRenditionDefinitions, loadRenditionDefinitions, saveRenditionDefinition
-
Field Details
-
PARAM_DESTINATION_NODE
Deprecated.This optionalNodeRefparameter specifies an existingNodeRefto 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:
-
PARAM_DESTINATION_PATH_TEMPLATE
Deprecated.This optionalStringparameter 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:
-
PARAM_RENDITION_NODETYPE
Deprecated.This optionalQNameparameter specifies what the node type of the created rendition will be. If no type is specified then this defaults to cm:content.- See Also:
-
PARAM_ORPHAN_EXISTING_RENDITION
Deprecated.This optionalBooleanflag parameter determines whether an existing rendition is moved or orphaned. If the source node already has a rendition and this parameter isfalsethe old rendition will be moved to the new destination location and updated appropriately. If this parameter is set totruethen 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:
-
PARAM_IS_COMPONENT_RENDITION
Deprecated.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:
-
-
Method Details
-
getRenderingEngineDefinition
Deprecated.Returns theRenderingEngineDefinitionassociated with the specified rendering engine name.- Parameters:
name- The rendering engine name.- Returns:
- The
RenderingEngineDefinitionor null.
-
getRenderingEngineDefinitions
Deprecated.- Returns:
- A
Listof all availableRenderingEngineDefinitions.
-
createRenditionDefinition
@NotAuditable RenditionDefinition createRenditionDefinition(QName renditionName, String renderingEngineName) Deprecated.Creates a newRenditionDefinitionand sets the rendition name and the rendering engine name to the specified values.- Parameters:
renditionName- A unique identifier used to specify the createdRenditionDefinition.renderingEngineName- The name of the rendering engine associated with thisRenditionDefinition.- Returns:
- the created
RenditionDefinition.
-
createCompositeRenditionDefinition
Deprecated.Creates a newCompositeRenditionDefinitionand sets the rendition name and the rendering engine name to the specified values.- Parameters:
renditionName- A unique identifier used to specify the createdRenditionDefinition.- Returns:
- the created
CompositeRenditionDefinition.
-
getRenditions
Deprecated.This method gets all the renditions of the specified node.- Returns:
- a list of ChildAssociationRefs which link the source node to the renditions.
-
getRenditions
Deprecated.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 renditionsmimeTypePrefix- 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
Deprecated.This method gets the rendition of the specified node identified by the provided rendition name.- Parameters:
node- the source node for the renditionsrenditionName- the renditionName used to identify a rendition.- Returns:
- the ChildAssociationRef which links the source node to the rendition or
nullif there is no such rendition.
-
isRendition
Deprecated.This method returnstrueif the specified NodeRef is a valid rendition node, elsefalse. A nodeRef is a rendition node if it has the rn:rendition aspect (or sub-aspect) applied.- Parameters:
node- NodeRef- Returns:
trueif a rendition, elsefalse
-
getSourceNode
Deprecated.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
nullif there is no source node. - See Also:
-
render
@NotAuditable ChildAssociationRef render(NodeRef sourceNode, RenditionDefinition renditionDefinition) Deprecated.This method synchronously renders content as specified by the givenRenditionDefinition. 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, RenderCallback callback) Deprecated.This method asynchronously renders content as specified by the givenRenditionDefinition. 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
Deprecated.This method synchronously renders content as specified by the givenrendition 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, RenderCallback callback) Deprecated.This method asynchronously renders content as specified by the givenrendition 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
Deprecated.Cancels all known cancellable running renditions for the givenNodeRefvia theActionTrackingService.- Parameters:
sourceNode- theNodeRefthe action is acting on- Since:
- 4.1.6
-
cancelRenditions
Deprecated.Cancels all known cancellable running renditions for the givenNodeRefand type via theActionTrackingService.- Parameters:
sourceNode- theNodeRefthe action is acting ontype- the rendition type (rending engine name)- Since:
- 4.1.6
-
usingRenditionService2
Deprecated.If a rendition has been created by the newer RenditionService2, this method will return true. In this case the original RenditionService should not be used to update an existing rendition if the content changes. These renditions can be identified by the existence of the rendition2 aspect. RenditionService2 also listens for content changes and will perform the rendition. If RenditionService2 has a definition with the same name (matched on the local part of the supplied rendDef's name) and the target mimetype matches, RenditionService2 will also be used. This is being done to help with the conversion of custom transformers and renditions. The basic definitions (called "medium", "doclib", "imgpreview", "avatar", "avatar32", "webpreview", "pdf") already exist. Rather than writing a converter form one definition to the newer one, it is suggested that a newer RenditionDefinition2 is simply defined to avoid having to worry about any complexities in converting TransformationOptions into a simple flat Map structure.
-