Package org.alfresco.repo.rendition2
Interface RenditionService2
-
- All Known Implementing Classes:
RenditionService2Impl
public interface RenditionService2The Async Rendition service. Replaces the original rendition services which included synchronous renditions and asynchronous methods with Java call backs. Renditions are defined asRenditionDefinition2s and may be registered and looked by the associatedRenditionDefinitionRegistry2. Unlike the original RenditionService this service, it:- Performs async renditions without a Java callback, as another node in the cluster may complete the rendition. The current node requests a transform, but another node might take the resulting transform and turn it into a rendition if the external Transform Service is used.
- Reduces the configurable options to do with with the associations of rendition nodes, their type. They are identical to 'hidden' (not normally seen as nodes in their own right in a UI) renditions produced by the original service. So, they are always directly under the source node connected by a rn:rendition association with the name of the rendition.
- The rendition nodes additionally have a rn:rendition2 aspect and a contentUrlHashCode property. This property contains a value that allows the service to work out if it holds a rendition of the source node's current content.
- Failures are handled by setting the rendition node's content to null.
- When a rendition is requested via the REST API, only the newer service is used.
- Where possible old service renditions migrate automatically over to the new service when content on a source node is updated.
- Author:
- adavis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.alfresco.service.cmr.repository.ChildAssociationRefgetRenditionByName(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, java.lang.String renditionName)This method gets the rendition of thesourceNodeRefidentified by its name.RenditionDefinitionRegistry2getRenditionDefinitionRegistry2()java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef>getRenditions(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)This method gets all the renditions of thesourceNodeRef.booleanisEnabled()Indicates if renditions are enabled.voidrender(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, java.lang.String renditionName)This method asynchronously renders content as specified by therenditionName.
-
-
-
Method Detail
-
getRenditionDefinitionRegistry2
RenditionDefinitionRegistry2 getRenditionDefinitionRegistry2()
- Returns:
- the
RenditionDefinitionRegistry2being used by the service.
-
render
@NotAuditable void render(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, java.lang.String renditionName)This method asynchronously renders content as specified by therenditionName. The content to be rendered is provided bysourceNodeRef.- Parameters:
sourceNodeRef- the node from which the content is retrieved.renditionName- the rendition to be performed.
-
getRenditions
@NotAuditable java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> getRenditions(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
This method gets all the renditions of thesourceNodeRef.- Returns:
- a list of
ChildAssociationRefs which link thesourceNodeRefto the renditions.
-
getRenditionByName
@NotAuditable org.alfresco.service.cmr.repository.ChildAssociationRef getRenditionByName(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, java.lang.String renditionName)This method gets the rendition of thesourceNodeRefidentified by its name.- Parameters:
sourceNodeRef- the source node for the renditionsrenditionName- the renditionName used to identify a rendition.- Returns:
- the
ChildAssociationRefwhich links the source node to the rendition ornullif there is no rendition or it is not up to date.
-
isEnabled
boolean isEnabled()
Indicates if renditions are enabled. Set using thesystem.thumbnail.generatevalue.
-
-