Class ImageMagickContentTransformerWorker
- java.lang.Object
-
- org.alfresco.repo.content.transform.ContentTransformerHelper
-
- org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker
-
- org.alfresco.repo.content.transform.magick.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
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker
MIMETYPE_IMAGE_PREFIX, remoteTransformerClient
-
Fields inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
transformerConfig
-
-
Constructor Summary
Constructors Constructor Description ImageMagickContentTransformerWorker()Deprecated.Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()Deprecated.Checks for the JMagick and ImageMagick dependencies, using the commontransformation methodto check that the sample image can be converted.protected java.lang.StringgetImageMagickVersionNumber()Deprecated.java.lang.StringgetVersionString()Deprecated.Gets the version string captured from the check command.protected booleanisAlphaOptionSupported()Deprecated.voidsetCheckCommand(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.voidsetEnabled(boolean enabled)Deprecated.voidsetExecuter(org.alfresco.util.exec.RuntimeExec executer)Deprecated.Set the runtime command executer that must be executed in order to run ImageMagick.protected voidtransformInternal(java.io.File sourceFile, java.lang.String sourceMimetype, java.io.File targetFile, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Transform the image content from the source file to the target fileprotected voidtransformRemote(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)Deprecated.-
Methods inherited from class org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker
getComments, isAvailable, isSupported, isTransformable, remoteTransformerClientConfigured, setAvailable, setRemoteTransformerClient, transform
-
Methods inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
deprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isExplicitTransformation, isSupportedTransformation, onlySupports, register, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformations, toString
-
-
-
-
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
-
afterPropertiesSet
public void afterPropertiesSet()
Deprecated.Checks for the JMagick and ImageMagick dependencies, using the commontransformation methodto check that the sample image can be converted.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractImageMagickContentTransformerWorker
-
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.ExceptionDeprecated.Transform the image content from the source file to the target file- Specified by:
transformInternalin classAbstractImageMagickContentTransformerWorker- Parameters:
sourceFile- the source of the transformationsourceMimetype- the mimetype of the source of the transformationtargetFile- the target of the transformationtargetMimetype- the mimetype of the target of the transformationoptions- 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.IllegalAccessExceptionDeprecated.- Specified by:
transformRemotein classAbstractImageMagickContentTransformerWorker- Throws:
java.lang.IllegalAccessException
-
getImageMagickVersionNumber
protected java.lang.String getImageMagickVersionNumber()
Deprecated.
-
isAlphaOptionSupported
protected boolean isAlphaOptionSupported()
Deprecated.
-
-