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(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(RuntimeExec executer)
Set the runtime command executer that must be executed in order to run alfresco-pdf-renderer.
|
void |
setRemoteTransformerClient(RemoteTransformerClient remoteTransformerClient)
Sets the optional remote transformer client which will be used in preference to a local command if available.
|
void |
transform(ContentReader reader,
ContentWriter writer,
TransformationOptions options) |
deprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isExplicitTransformation, isSupportedTransformation, onlySupports, register, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformations, toStringpublic AlfrescoPdfRendererContentTransformerWorker()
public void setExecuter(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 setRemoteTransformerClient(RemoteTransformerClient remoteTransformerClient)
remoteTransformerClient - may be null;public void setCheckCommand(RuntimeExec checkCommand)
checkCommand - command executer to retrieve version informationpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic boolean isAvailable()
ContentTransformerWorkerisAvailable in interface ContentTransformerWorkerprotected void setAvailable(boolean available)
available - booleanpublic String getVersionString()
ContentTransformerWorkergetVersionString in interface ContentTransformerWorkerpublic boolean isTransformable(String sourceMimetype, String targetMimetype, TransformationOptions options)
ContentTransformerWorkerContentTransformer.isTransformable(String, String, TransformationOptions)
should not include the transformer name, as that is added by the ContentTransformer in
the parent context.isTransformable in interface ContentTransformerWorkerpublic void transform(ContentReader reader, ContentWriter writer, TransformationOptions options) throws Exception
transform in interface ContentTransformerWorkerExceptionContentTransformer.transform(ContentReader, ContentWriter, TransformationOptions)public String getComments(boolean available)
ContentTransformerHelperAbstractContentTransformerLimits.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 ContentTransformerWorkergetComments in class ContentTransformerHelperavailable - 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–2021 Alfresco Software. All rights reserved.