Class ImageMagickContentTransformerWorker

  • All Implemented Interfaces:
    ContentTransformerWorker, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

    @Deprecated
    public class ImageMagickContentTransformerWorker
    extends AbstractImageMagickContentTransformerWorker
    Deprecated.
    The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
    Executes a statement to implement
    Author:
    Derek Hulley
    • Constructor Detail

      • ImageMagickContentTransformerWorker

        public ImageMagickContentTransformerWorker()
        Deprecated.
        Default constructor
    • Method Detail

      • setExecuter

        public void setExecuter​(org.alfresco.util.exec.RuntimeExec executer)
        Deprecated.
        Set the runtime command executer that must be executed in order to run ImageMagick. Whether or not this is the full path to the convertCommand or just the convertCommand itself depends the environment setup.

        The command must contain the variables ${source} and ${target}, which will be replaced by the names of the file to be transformed and the name of the output file respectively.

            convert ${source} ${target}
         
        Parameters:
        executer - the system command executer
      • setEnabled

        public void setEnabled​(boolean enabled)
        Deprecated.
      • setCheckCommand

        public void setCheckCommand​(org.alfresco.util.exec.RuntimeExec checkCommand)
        Deprecated.
        Sets the command that must be executed in order to retrieve version information from the converting executable and thus test that the executable itself is present.
        Parameters:
        checkCommand - command executer to retrieve version information
      • getVersionString

        public java.lang.String getVersionString()
        Deprecated.
        Gets the version string captured from the check command.
        Returns:
        the version string
      • transformInternal

        protected void transformInternal​(java.io.File sourceFile,
                                         java.lang.String sourceMimetype,
                                         java.io.File targetFile,
                                         java.lang.String targetMimetype,
                                         TransformationOptions options)
                                  throws java.lang.Exception
        Deprecated.
        Transform the image content from the source file to the target file
        Specified by:
        transformInternal in class AbstractImageMagickContentTransformerWorker
        Parameters:
        sourceFile - the source of the transformation
        sourceMimetype - the mimetype of the source of the transformation
        targetFile - the target of the transformation
        targetMimetype - the mimetype of the target of the transformation
        options - the transformation options supported by ImageMagick
        Throws:
        java.lang.Exception
      • transformRemote

        protected void transformRemote​(org.alfresco.service.cmr.repository.ContentReader reader,
                                       org.alfresco.service.cmr.repository.ContentWriter writer,
                                       TransformationOptions options,
                                       java.lang.String sourceMimetype,
                                       java.lang.String targetMimetype,
                                       java.lang.String sourceExtension,
                                       java.lang.String targetExtension)
                                throws java.lang.IllegalAccessException
        Deprecated.
        Specified by:
        transformRemote in class AbstractImageMagickContentTransformerWorker
        Throws:
        java.lang.IllegalAccessException
      • getImageMagickVersionNumber

        protected java.lang.String getImageMagickVersionNumber()
        Deprecated.
      • isAlphaOptionSupported

        protected boolean isAlphaOptionSupported()
        Deprecated.