Interface RenditionService2

  • All Known Implementing Classes:
    RenditionService2Impl

    public interface RenditionService2
    The Async Rendition service. Replaces the original rendition services which included synchronous renditions and asynchronous methods with Java call backs.

    Renditions are defined as RenditionDefinition2s and may be registered and looked by the associated RenditionDefinitionRegistry2.

    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.ChildAssociationRef getRenditionByName​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, java.lang.String renditionName)
      This method gets the rendition of the sourceNodeRef identified by its name.
      RenditionDefinitionRegistry2 getRenditionDefinitionRegistry2()  
      java.util.List<org.alfresco.service.cmr.repository.ChildAssociationRef> getRenditions​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
      This method gets all the renditions of the sourceNodeRef.
      boolean isEnabled()
      Indicates if renditions are enabled.
      void render​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, java.lang.String renditionName)
      This method asynchronously renders content as specified by the renditionName.
    • Method Detail

      • render

        @NotAuditable
        void render​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                    java.lang.String renditionName)
        This method asynchronously renders content as specified by the renditionName. The content to be rendered is provided by sourceNodeRef.
        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 the sourceNodeRef.
        Returns:
        a list of ChildAssociationRefs which link the sourceNodeRef to 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 the sourceNodeRef identified by its name.
        Parameters:
        sourceNodeRef - 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 rendition or it is not up to date.
      • isEnabled

        boolean isEnabled()
        Indicates if renditions are enabled. Set using the system.thumbnail.generate value.