public class AlfrescoPdfRendererContentTransformerWorker extends ContentTransformerHelper implements ContentTransformerWorker, org.springframework.beans.factory.InitializingBean
transformerConfig
Constructor and Description |
---|
AlfrescoPdfRendererContentTransformerWorker() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
String |
getComments(boolean available)
Overridden to supply a comment or String of commented out transformation properties
that specify any (hard coded or implied) supported transformations.
|
String |
getVersionString()
Gets a string returning product and version information.
|
boolean |
isAvailable()
Checks if this worker is available.
|
boolean |
isTransformable(String sourceMimetype,
String targetMimetype,
TransformationOptions options)
Unlike
ContentTransformer.isTransformable(String, String, TransformationOptions)
should not include the transformer name, as that is added by the ContentTransformer in
the parent context. |
protected void |
setAvailable(boolean available)
Make the transformer available
|
void |
setCheckCommand(org.alfresco.util.exec.RuntimeExec checkCommand)
Sets the command that must be executed in order to retrieve version information from the 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 alfresco-pdf-renderer.
|
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options) |
deprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isExplicitTransformation, isSupportedTransformation, onlySupports, register, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformations, toString
public AlfrescoPdfRendererContentTransformerWorker()
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.
alfresco-pdf-renderer ${source} ${target}
executer
- the system command executerpublic void setCheckCommand(org.alfresco.util.exec.RuntimeExec checkCommand)
checkCommand
- command executer to retrieve version informationpublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public boolean isAvailable()
ContentTransformerWorker
isAvailable
in interface ContentTransformerWorker
protected void setAvailable(boolean available)
available
- booleanpublic String getVersionString()
ContentTransformerWorker
getVersionString
in interface ContentTransformerWorker
public boolean isTransformable(String sourceMimetype, String targetMimetype, TransformationOptions options)
ContentTransformerWorker
ContentTransformer.isTransformable(String, String, TransformationOptions)
should not include the transformer name, as that is added by the ContentTransformer in
the parent context.isTransformable
in interface ContentTransformerWorker
public void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options) throws Exception
transform
in interface ContentTransformerWorker
Exception
ContentTransformer.transform(ContentReader, ContentWriter, TransformationOptions)
public String getComments(boolean available)
ContentTransformerHelper
AbstractContentTransformerLimits.isTransformableMimetype(String, String, TransformationOptions)
or ContentTransformerWorker.isTransformable(String, String, TransformationOptions)
have been overridden.
See ContentTransformerHelper.getCommentsOnlySupports(List, List, boolean)
which may be used to help construct a comment.getComments
in interface ContentTransformerWorker
getComments
in class ContentTransformerHelper
available
- indicates if the transformer has been registered and is available to be selected.
false
indicates that the transformer is only available as a component of a
complex transformer.ContentTransformer.getComments(boolean)
Copyright © 2005–2017 Alfresco Software. All rights reserved.