Class TransformServiceRegistryImpl

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

public abstract class TransformServiceRegistryImpl extends org.alfresco.transform.registry.AbstractTransformRegistry implements org.springframework.beans.factory.InitializingBean
Used by clients to work out if a transformation is supported by the Transform Service.
  • Field Details

    • enabled

      protected boolean enabled
  • Constructor Details

    • TransformServiceRegistryImpl

      public TransformServiceRegistryImpl()
  • Method Details

    • setJsonObjectMapper

      public void setJsonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper)
    • getCronExpression

      public org.quartz.CronExpression getCronExpression()
    • setCronExpression

      public void setCronExpression(org.quartz.CronExpression cronExpression)
    • getInitialAndOnErrorCronExpression

      public org.quartz.CronExpression getInitialAndOnErrorCronExpression()
    • setInitialAndOnErrorCronExpression

      public void setInitialAndOnErrorCronExpression(org.quartz.CronExpression initialAndOnErrorCronExpression)
    • setShutdownIndicator

      public void setShutdownIndicator(ShutdownIndicator shutdownIndicator)
    • afterPropertiesSet

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

      public TransformServiceRegistryImpl.Data createData()
    • getData

      Specified by:
      getData in class org.alfresco.transform.registry.AbstractTransformRegistry
    • readConfig

      public abstract boolean readConfig() throws IOException
      Throws:
      IOException
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • setFirstTime

      protected void setFirstTime(boolean firstTime)
    • getFirstTime

      protected boolean getFirstTime()
    • getLog

      protected abstract org.apache.commons.logging.Log getLog()
    • logError

      protected void logError(String msg)
      Specified by:
      logError in class org.alfresco.transform.registry.AbstractTransformRegistry
    • logWarn

      protected void logWarn(String msg)
      Overrides:
      logWarn in class org.alfresco.transform.registry.AbstractTransformRegistry
    • findTransformerName

      public String findTransformerName(String sourceMimetype, long sourceSizeInBytes, String targetMimetype, Map<String,String> actualOptions, String renditionName)
      Specified by:
      findTransformerName in interface org.alfresco.transform.registry.TransformServiceRegistry
      Overrides:
      findTransformerName in class org.alfresco.transform.registry.AbstractTransformRegistry
    • findMaxSize

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

      public List<org.alfresco.transform.registry.SupportedTransform> findTransformers(String sourceMimetype, String targetMimetype, Map<String,String> actualOptions, String renditionName)
      Works out an ordered list of transformer that will be used to transform content of a given source mimetype into a target mimetype given a list of actual transform option names and values (Strings) plus the data contained in the Transform objects registered with this class. These are ordered by size and priority.
      Parameters:
      sourceMimetype - the mimetype of the source content
      targetMimetype - the mimetype of the target
      actualOptions - the actual name value pairs available that could be passed to the Transform Service.
      renditionName - (optional) name for the set of options and target mimetype. If supplied is used to cache results to avoid having to work out if a given transformation is supported a second time. The sourceMimetype and sourceSizeInBytes may still change. In the case of ACS this is the rendition name.