|
|||||||||
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
public abstract class AbstractImageMagickContentTransformerWorker
Abstract helper for transformations based on ImageMagick
Field Summary | |
---|---|
static java.lang.String |
MIMETYPE_IMAGE_PREFIX
the prefix for mimetypes supported by the transformer |
Constructor Summary | |
---|---|
AbstractImageMagickContentTransformerWorker()
|
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. |
boolean |
isAvailable()
Checks if this worker is available. |
static boolean |
isSupported(java.lang.String mimetype)
Some image formats are not supported by ImageMagick, or at least appear not to work. |
boolean |
isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Supports image to image conversion, but only if the JMagick library and required libraries are available. |
protected void |
setAvailable(boolean available)
Make the transformer available |
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
|
protected abstract 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.ContentTransformerHelper |
---|
getMimetype, getMimetypeService, isExplicitTransformation, setExplicitTransformations, setMimetypeService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.alfresco.repo.content.transform.ContentTransformerWorker |
---|
getVersionString |
Field Detail |
---|
public static final java.lang.String MIMETYPE_IMAGE_PREFIX
Constructor Detail |
---|
public AbstractImageMagickContentTransformerWorker()
Method Detail |
---|
public boolean isAvailable()
ContentTransformerWorker
isAvailable
in interface ContentTransformerWorker
protected void setAvailable(boolean available)
available
- public void afterPropertiesSet()
transformation method
to check
that the sample image can be converted.
If initialization is successful, then autoregistration takes place.
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public static boolean isSupported(java.lang.String mimetype)
mimetype
- the mimetype to check
public boolean isTransformable(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
isTransformable
in interface ContentTransformerWorker
ContentTransformer.isTransformable(String, String, TransformationOptions)
public final void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options) throws java.lang.Exception
transform
in interface ContentTransformerWorker
java.lang.Exception
#transformInternal(File, File)
protected abstract void transformInternal(java.io.File sourceFile, java.io.File targetFile, TransformationOptions options) throws java.lang.Exception
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 |