Class LocalTransformClient

java.lang.Object
org.alfresco.repo.rendition2.LocalTransformClient
All Implemented Interfaces:
TransformClient, org.springframework.beans.factory.InitializingBean

public class LocalTransformClient extends Object implements TransformClient, org.springframework.beans.factory.InitializingBean
Requests rendition transforms take place using transforms available on the local machine (based on LocalTransform. The transform and consumption of the resulting content is linked into a single operation that will take place at some point in the future on the local machine.
Author:
adavis
  • Constructor Details

    • LocalTransformClient

      public LocalTransformClient()
  • Method Details

    • setLocalTransformServiceRegistry

      public void setLocalTransformServiceRegistry(LocalTransformServiceRegistry localTransformServiceRegistry)
    • setTransactionService

      public void setTransactionService(TransactionService transactionService)
    • setContentService

      public void setContentService(ContentService contentService)
    • setRenditionService2

      public void setRenditionService2(RenditionService2Impl renditionService2)
    • setDirectAccessUrlEnabled

      public void setDirectAccessUrlEnabled(boolean directAccessUrlEnabled)
    • setThreadPoolSize

      public void setThreadPoolSize(int threadPoolSize)
    • setExecutorService

      public void setExecutorService(ExecutorService executorService)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • checkSupported

      public void checkSupported(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String sourceMimetype, long sourceSizeInBytes, String contentUrl)
      Description copied from interface: TransformClient
      Checks the transformation required for the rendition is supported.
      Specified by:
      checkSupported in interface TransformClient
      Parameters:
      sourceNodeRef - the source node
      renditionDefinition - which rendition to perform
      sourceMimetype - the mometype of the source
      sourceSizeInBytes - the size in bytes of the source
      contentUrl - the url of the source (used in debug).
    • transform

      public void transform(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String user, int sourceContentHashCode)
      Description copied from interface: TransformClient
      Requests an asynchronous transform and the subsequent linkage of that transform as a rendition. The call to this method MUST be proceeded by a successful call to TransformClient.checkSupported(NodeRef, RenditionDefinition2, String, long, String) in the SAME Thread.
      Specified by:
      transform in interface TransformClient
      Parameters:
      sourceNodeRef - the source node
      renditionDefinition - which rendition to perform
      user - that requested the transform.
      sourceContentHashCode - the hash code of the source node's content URL. Used to check the transform result