Interface TransformClient

All Known Implementing Classes:
LocalTransformClient, SwitchingTransformClient

public interface TransformClient
Request asynchronous transforms and rendition transforms.
Author:
adavis
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    checkSupported(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String sourceMimetype, long sourceSizeInBytes, String contentUrl)
    Checks the transformation required for the rendition is supported.
    void
    transform(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String user, int sourceContentHashCode)
    Requests an asynchronous transform and the subsequent linkage of that transform as a rendition.
  • Method Details

    • checkSupported

      void checkSupported(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String sourceMimetype, long sourceSizeInBytes, String contentUrl)
      Checks the transformation required for the rendition is supported.
      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).
      Throws:
      UnsupportedOperationException - if the transform is not supported.
    • transform

      void transform(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String user, int sourceContentHashCode) throws UnsupportedTransformationException, ContentIOException
      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 checkSupported(NodeRef, RenditionDefinition2, String, long, String) in the SAME Thread.
      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
      Throws:
      UnsupportedTransformationException - if there is an unexpected failure to transform, normally in a pipeline, where an intermediate transform may not be performed after all because an intermediate conversion is too big.
      ContentIOException - there is an unexpected communication or transformation failure.