Class OOoContentTransformerHelper
- java.lang.Object
-
- org.alfresco.repo.content.transform.ContentTransformerHelper
-
- org.alfresco.repo.content.transform.OOoContentTransformerHelper
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
JodContentTransformer
@Deprecated public abstract class OOoContentTransformerHelper extends ContentTransformerHelper
Deprecated.The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.A class providing basic OOo-related functionality shared by bothContentTransformers andContentTransformerWorkers.
-
-
Field Summary
Fields Modifier and Type Field Description protected RemoteTransformerClientremoteTransformerClientDeprecated.protected TransformerDebugtransformerDebugDeprecated.-
Fields inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
transformerConfig
-
-
Constructor Summary
Constructors Constructor Description OOoContentTransformerHelper()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()Deprecated.protected abstract voidconvert(java.io.File tempFromFile, org.artofsolving.jodconverter.document.DocumentFormat sourceFormat, java.io.File tempToFile, org.artofsolving.jodconverter.document.DocumentFormat targetFormat)Deprecated.protected booleanencodeAsUtf8(java.lang.String sourceMimetype, java.lang.String encoding)Deprecated.Returnstrueif the input file should be transformed to UTF8 encoding.java.lang.StringgetComments(boolean available)Deprecated.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.LoggetLogger()Deprecated.protected abstract java.lang.StringgetTempFilePrefix()Deprecated.java.lang.StringgetVersionString()Deprecated.abstract booleanisAvailable()Deprecated.booleanisTransformable(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.protected booleanisTransformationBlocked(java.lang.String sourceMimetype, java.lang.String targetMimetype)Deprecated.There are some conversions that fail, despite the converter believing them possible.booleanremoteTransformerClientConfigured()Deprecated.voidsaveContentInFile(java.lang.String sourceMimetype, org.alfresco.service.cmr.repository.ContentReader reader, java.io.File file)Deprecated.Populates a file with the content in the reader.voidsetDocumentFormatsConfiguration(java.lang.String path)Deprecated.Set a non-default location from which to load the document format mappings.voidsetRemoteTransformerClient(RemoteTransformerClient remoteTransformerClient)Deprecated.Sets the optional remote transformer client which will be used in preference to a local command if available.voidsetTransformerDebug(TransformerDebug transformerDebug)Deprecated.Helper setter of the transformer debug.voidtransform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options)Deprecated.protected voidtransformLocal(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options, java.lang.String sourceMimetype, java.lang.String sourceExtension, java.lang.String targetExtension, org.artofsolving.jodconverter.document.DocumentFormat sourceFormat, org.artofsolving.jodconverter.document.DocumentFormat targetFormat)Deprecated.protected voidtransformRemote(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options, java.lang.String sourceMimetype, java.lang.String sourceExtension, java.lang.String targetExtension)Deprecated.-
Methods inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
deprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isExplicitTransformation, isSupportedTransformation, onlySupports, register, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformations, toString
-
-
-
-
Field Detail
-
transformerDebug
protected TransformerDebug transformerDebug
Deprecated.
-
remoteTransformerClient
protected RemoteTransformerClient remoteTransformerClient
Deprecated.
-
-
Method Detail
-
setDocumentFormatsConfiguration
public void setDocumentFormatsConfiguration(java.lang.String path)
Deprecated.Set a non-default location from which to load the document format mappings.- Parameters:
path- a resource location supporting the file: or classpath: prefixes
-
getLogger
protected abstract org.apache.commons.logging.Log getLogger()
Deprecated.
-
getTempFilePrefix
protected abstract java.lang.String getTempFilePrefix()
Deprecated.
-
isAvailable
public abstract boolean isAvailable()
Deprecated.
-
convert
protected abstract void convert(java.io.File tempFromFile, org.artofsolving.jodconverter.document.DocumentFormat sourceFormat, java.io.File tempToFile, org.artofsolving.jodconverter.document.DocumentFormat targetFormat)Deprecated.
-
setTransformerDebug
public void setTransformerDebug(TransformerDebug transformerDebug)
Deprecated.Helper setter of the transformer debug.- Parameters:
transformerDebug- TransformerDebug
-
setRemoteTransformerClient
public void setRemoteTransformerClient(RemoteTransformerClient remoteTransformerClient)
Deprecated.Sets the optional remote transformer client which will be used in preference to a local command if available.- Parameters:
remoteTransformerClient- may be null;
-
remoteTransformerClientConfigured
public boolean remoteTransformerClientConfigured()
Deprecated.
-
afterPropertiesSet
public void afterPropertiesSet()
Deprecated.
-
isTransformationBlocked
protected boolean isTransformationBlocked(java.lang.String sourceMimetype, java.lang.String targetMimetype)Deprecated.There are some conversions that fail, despite the converter believing them possible. This method can be used by subclasses to check if a targetMimetype or source/target Mimetype pair are blocked.- Parameters:
sourceMimetype- StringtargetMimetype- String- Returns:
trueif the mimetypes are blocked, elsefalse
-
isTransformable
public boolean isTransformable(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.- See Also:
DocumentFormatRegistry
-
getComments
public java.lang.String getComments(boolean available)
Deprecated.Description copied from class:ContentTransformerHelperOverridden to supply a comment or String of commented out transformation properties that specify any (hard coded or implied) supported transformations. Used when providing a list of properties to an administrators who may be setting other transformation properties, via JMX. Consider overriding if {linkAbstractContentTransformerLimits.isTransformableMimetype(String, String, TransformationOptions)orContentTransformerWorker.isTransformable(String, String, TransformationOptions)have been overridden. SeeContentTransformerHelper.getCommentsOnlySupports(List, List, boolean)which may be used to help construct a comment.- Overrides:
getCommentsin classContentTransformerHelper- Parameters:
available- indicates if the transformer has been registered and is available to be selected.falseindicates that the transformer is only available as a component of a complex transformer.- Returns:
- one line per property. The simple transformer name is returned by default as a comment.
-
getVersionString
public java.lang.String getVersionString()
Deprecated.
-
transform
public void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options) throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
transformLocal
protected void transformLocal(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options, java.lang.String sourceMimetype, java.lang.String sourceExtension, java.lang.String targetExtension, org.artofsolving.jodconverter.document.DocumentFormat sourceFormat, org.artofsolving.jodconverter.document.DocumentFormat targetFormat)Deprecated.
-
transformRemote
protected void transformRemote(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options, java.lang.String sourceMimetype, java.lang.String sourceExtension, java.lang.String targetExtension) throws java.lang.IllegalAccessExceptionDeprecated.- Throws:
java.lang.IllegalAccessException
-
saveContentInFile
public void saveContentInFile(java.lang.String sourceMimetype, org.alfresco.service.cmr.repository.ContentReader reader, java.io.File file) throws org.alfresco.service.cmr.repository.ContentIOExceptionDeprecated.Populates a file with the content in the reader.- Throws:
org.alfresco.service.cmr.repository.ContentIOException
-
encodeAsUtf8
protected boolean encodeAsUtf8(java.lang.String sourceMimetype, java.lang.String encoding)Deprecated.Returnstrueif 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.
-
-