|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.content.transform.ContentTransformerHelper
org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker
org.alfresco.repo.content.transform.magick.ImageMagickContentTransformerWorker
public class ImageMagickContentTransformerWorker
Executes a statement to implement
Field Summary |
---|
Fields inherited from class org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker |
---|
MIMETYPE_IMAGE_PREFIX |
Constructor Summary | |
---|---|
ImageMagickContentTransformerWorker()
Default constructor |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Checks for the JMagick and ImageMagick dependencies, using the common transformation method to check
that the sample image can be converted. |
java.lang.String |
getVersionString()
Gets the version string captured from the check command. |
void |
setCheckCommand(org.alfresco.util.exec.RuntimeExec checkCommand)
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. |
void |
setExecuter(org.alfresco.util.exec.RuntimeExec executer)
Set the runtime command executer that must be executed in order to run ImageMagick. |
protected void |
transformInternal(java.io.File sourceFile,
java.io.File targetFile,
TransformationOptions options)
Transform the image content from the source file to the target file |
Methods inherited from class org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker |
---|
isAvailable, isSupported, isTransformable, setAvailable, transform |
Methods inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper |
---|
getMimetype, getMimetypeService, isExplicitTransformation, setExplicitTransformations, setMimetypeService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageMagickContentTransformerWorker()
Method Detail |
---|
public void setExecuter(org.alfresco.util.exec.RuntimeExec executer)
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}
executer
- the system command executerpublic void setCheckCommand(org.alfresco.util.exec.RuntimeExec checkCommand)
checkCommand
- command executer to retrieve version informationpublic java.lang.String getVersionString()
public void afterPropertiesSet()
transformation method
to check
that the sample image can be converted.
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractImageMagickContentTransformerWorker
protected void transformInternal(java.io.File sourceFile, java.io.File targetFile, TransformationOptions options) throws java.lang.Exception
transformInternal
in class AbstractImageMagickContentTransformerWorker
sourceFile
- the source of the transformationtargetFile
- the target of the transformationoptions
- the transformation options supported by ImageMagick
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |