Class LocalTransformServiceRegistry

java.lang.Object
org.alfresco.transform.registry.AbstractTransformRegistry
org.alfresco.transform.registry.TransformServiceRegistryImpl
org.alfresco.repo.content.transform.LocalTransformServiceRegistry
All Implemented Interfaces:
org.alfresco.transform.registry.TransformServiceRegistry, org.springframework.beans.factory.InitializingBean

public class LocalTransformServiceRegistry extends TransformServiceRegistryImpl implements org.springframework.beans.factory.InitializingBean
Implements TransformServiceRegistry providing a mechanism of validating if a local transformation (based on LocalTransform request is supported.
Author:
adavis
  • Field Details

  • Constructor Details

    • LocalTransformServiceRegistry

      public LocalTransformServiceRegistry()
  • Method Details

    • getHttpClientConfig

      public org.alfresco.httpclient.HttpClientConfig getHttpClientConfig()
    • setNodeService

      public void setNodeService(NodeService nodeService)
    • setHttpClientConfig

      public void setHttpClientConfig(org.alfresco.httpclient.HttpClientConfig httpClientConfig)
    • setPipelineConfigDir

      public void setPipelineConfigDir(String pipelineConfigDir)
    • getPipelineConfigDir

      public String getPipelineConfigDir()
    • setProperties

      public void setProperties(Properties properties)
      The Alfresco global properties.
    • setMimetypeService

      public void setMimetypeService(MimetypeService mimetypeService)
    • getMimetypeService

      public MimetypeService getMimetypeService()
    • setTransformerDebug

      public void setTransformerDebug(TransformerDebug transformerDebug)
    • setStrictMimeTypeCheck

      public void setStrictMimeTypeCheck(boolean strictMimeTypeCheck)
    • setRetryTransformOnDifferentMimeType

      public void setRetryTransformOnDifferentMimeType(boolean retryTransformOnDifferentMimeType)
    • afterPropertiesSet

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

      public boolean readConfig() throws IOException
      Specified by:
      readConfig in class TransformServiceRegistryImpl
      Throws:
      IOException
    • getData

      Overrides:
      getData in class TransformServiceRegistryImpl
    • createData

      public TransformServiceRegistryImpl.Data createData()
      Overrides:
      createData in class TransformServiceRegistryImpl
    • register

      protected void register(org.alfresco.transform.config.Transformer transformer, Map<String,Set<org.alfresco.transform.config.TransformOption>> transformOptions, String baseUrl, String readFrom)
      Overrides:
      register in class org.alfresco.transform.registry.AbstractTransformRegistry
    • getLog

      protected org.apache.commons.logging.Log getLog()
      Specified by:
      getLog in class TransformServiceRegistryImpl
    • getProperty

      protected String getProperty(String name, String defaultValue)
      Gets a property from an alfresco global property but falls back to a System property with the same name to allow dynamic creation of transformers without having to have an AMP to add the alfresco global property.
    • findMaxSize

      public long findMaxSize(String sourceMimetype, String targetMimetype, Map<String,String> options, String renditionName)
      Specified by:
      findMaxSize in interface org.alfresco.transform.registry.TransformServiceRegistry
      Overrides:
      findMaxSize in class TransformServiceRegistryImpl
    • getLocalTransform

      public LocalTransform getLocalTransform(String sourceMimetype, long sourceSizeInBytes, String targetMimetype, Map<String,String> actualOptions, String renditionName)
    • isSupported

      public boolean isSupported(org.alfresco.transform.config.CoreFunction function, LocalTransform transform)
      Returns true if the function is supported by the transform. Not all transforms are able to support all functionality, as newer features may have been introduced into the core t-engine code since it was released.
      Parameters:
      function - to be checked.
      transform - the local transform.
      Returns:
      true is supported, false otherwise.