public abstract class OOoContentTransformerHelper extends ContentTransformerHelper
ContentTransformers and ContentTransformerWorkers.| Modifier and Type | Field and Description |
|---|---|
protected TransformerDebug |
transformerDebug |
transformerConfig| Constructor and Description |
|---|
OOoContentTransformerHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected abstract void |
convert(java.io.File tempFromFile,
net.sf.jooreports.converter.DocumentFormat sourceFormat,
java.io.File tempToFile,
net.sf.jooreports.converter.DocumentFormat targetFormat) |
protected boolean |
encodeAsUtf8(java.lang.String sourceMimetype,
java.lang.String encoding)
Returns
true if the input file should be transformed to UTF8 encoding. |
java.lang.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.
|
protected abstract org.apache.commons.logging.Log |
getLogger() |
protected abstract java.lang.String |
getTempFilePrefix() |
java.lang.String |
getVersionString() |
abstract boolean |
isAvailable() |
boolean |
isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options) |
protected boolean |
isTransformationBlocked(java.lang.String sourceMimetype,
java.lang.String targetMimetype)
There are some conversions that fail, despite the converter believing them possible.
|
void |
saveContentInFile(java.lang.String sourceMimetype,
org.alfresco.service.cmr.repository.ContentReader reader,
java.io.File file)
Populates a file with the content in the reader.
|
void |
setDocumentFormatsConfiguration(java.lang.String path)
Set a non-default location from which to load the document format mappings.
|
void |
setTransformerDebug(TransformerDebug transformerDebug)
Helper setter of the transformer debug.
|
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, toStringprotected TransformerDebug transformerDebug
public void setDocumentFormatsConfiguration(java.lang.String path)
path - a resource location supporting the file: or classpath: prefixesprotected abstract org.apache.commons.logging.Log getLogger()
protected abstract java.lang.String getTempFilePrefix()
public abstract boolean isAvailable()
protected abstract void convert(java.io.File tempFromFile,
net.sf.jooreports.converter.DocumentFormat sourceFormat,
java.io.File tempToFile,
net.sf.jooreports.converter.DocumentFormat targetFormat)
public void setTransformerDebug(TransformerDebug transformerDebug)
transformerDebug - public void afterPropertiesSet()
throws java.lang.Exception
java.lang.Exceptionprotected boolean isTransformationBlocked(java.lang.String sourceMimetype,
java.lang.String targetMimetype)
sourceMimetype - targetMimetype - true if the mimetypes are blocked, else falsepublic boolean isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
DocumentFormatRegistrypublic java.lang.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 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.public java.lang.String getVersionString()
public void transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
throws java.lang.Exception
java.lang.Exceptionpublic void saveContentInFile(java.lang.String sourceMimetype,
org.alfresco.service.cmr.repository.ContentReader reader,
java.io.File file)
throws org.alfresco.service.cmr.repository.ContentIOException
org.alfresco.service.cmr.repository.ContentIOExceptionprotected boolean encodeAsUtf8(java.lang.String sourceMimetype,
java.lang.String encoding)
true if the input file should be transformed to UTF8 encoding.OpenOffice/LibreOffice is unable to support the import of text files that are SHIFT JIS encoded (and others: windows-1252...) so transformed to UTF-8.
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.