Class 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 both ContentTransformers and ContentTransformerWorkers.
    • Constructor Detail

      • OOoContentTransformerHelper

        public OOoContentTransformerHelper()
        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 - String
        targetMimetype - String
        Returns:
        true if the mimetypes are blocked, else false
      • isTransformable

        public boolean isTransformable​(java.lang.String sourceMimetype,
                                       java.lang.String targetMimetype,
                                       TransformationOptions options)
        Deprecated.
        See Also:
        DocumentFormatRegistry
      • 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.Exception
        Deprecated.
        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.IllegalAccessException
        Deprecated.
        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.ContentIOException
        Deprecated.
        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.
        Returns 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.