Class TransformServiceRegistryImpl

  • All Implemented Interfaces:
    org.alfresco.transform.client.registry.TransformServiceRegistry, org.springframework.beans.factory.InitializingBean
    Direct Known Subclasses:
    LocalTransformServiceRegistry

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

      Fields 
      Modifier and Type Field Description
      protected boolean enabled  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      TransformServiceRegistryImpl.Data createData()  
      java.util.List<org.alfresco.transform.client.registry.SupportedTransform> findTransformers​(java.lang.String sourceMimetype, java.lang.String targetMimetype, java.util.Map<java.lang.String,​java.lang.String> actualOptions, java.lang.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.
      org.quartz.CronExpression getCronExpression()  
      TransformServiceRegistryImpl.Data getData()  
      protected boolean getFirstTime()  
      org.quartz.CronExpression getInitialAndOnErrorCronExpression()  
      protected abstract org.apache.commons.logging.Log getLog()  
      boolean isEnabled()  
      protected void logError​(java.lang.String msg)  
      abstract boolean readConfig()  
      void setCronExpression​(org.quartz.CronExpression cronExpression)  
      void setEnabled​(boolean enabled)  
      protected void setFirstTime​(boolean firstTime)  
      void setInitialAndOnErrorCronExpression​(org.quartz.CronExpression initialAndOnErrorCronExpression)  
      void setJsonObjectMapper​(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper)  
      void setShutdownIndicator​(org.alfresco.util.ShutdownIndicator shutdownIndicator)  
      • Methods inherited from class org.alfresco.transform.client.registry.AbstractTransformRegistry

        findMaxSize, findTransformerName, register, registerAll
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.alfresco.transform.client.registry.TransformServiceRegistry

        isSupported
    • Field Detail

      • enabled

        protected boolean enabled
    • Constructor Detail

      • TransformServiceRegistryImpl

        public TransformServiceRegistryImpl()
    • Method Detail

      • 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​(org.alfresco.util.ShutdownIndicator shutdownIndicator)
      • afterPropertiesSet

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

        public abstract boolean readConfig()
                                    throws java.io.IOException
        Throws:
        java.io.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​(java.lang.String msg)
        Specified by:
        logError in class org.alfresco.transform.client.registry.AbstractTransformRegistry
      • findTransformers

        public java.util.List<org.alfresco.transform.client.registry.SupportedTransform> findTransformers​(java.lang.String sourceMimetype,
                                                                                                          java.lang.String targetMimetype,
                                                                                                          java.util.Map<java.lang.String,​java.lang.String> actualOptions,
                                                                                                          java.lang.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.