public abstract class OOoContentTransformerHelper extends ContentTransformerHelper
ContentTransformers and ContentTransformerWorkers.| 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. |
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 |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options) |
getMimetype, getMimetypeService, isExplicitTransformation, isSupportedTransformation, setExplicitTransformations, setMimetypeService, setSupportedTransformationspublic 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 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 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 - 2010 Alfresco Software, Inc. All Rights Reserved.