Class OfficeImporterVelocityBridge


  • @Deprecated
    public class OfficeImporterVelocityBridge
    extends Object
    Deprecated.
    since 4.1M1 use the ScriptService with hint "officeimporter" instead
    A bridge between velocity and office importer.
    Since:
    1.8M1
    Version:
    $Id: 0901f1dfb8e9ae21ac8cfc4ced93cc4627a23b29 $
    • Field Detail

      • PRESENTATION_FORMAT_EXTENSIONS

        public static final List<String> PRESENTATION_FORMAT_EXTENSIONS
        Deprecated.
        File extensions corresponding to slide presentations.
      • OFFICE_IMPORTER_ERROR

        public static final String OFFICE_IMPORTER_ERROR
        Deprecated.
        The key used to place any error messages while importing office documents.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OfficeImporterVelocityBridge

        public OfficeImporterVelocityBridge​(org.xwiki.component.manager.ComponentManager componentManager)
                                     throws OfficeImporterException
        Deprecated.
        Default constructor.
        Parameters:
        componentManager - used to lookup for other necessary components.
        Throws:
        OfficeImporterException - if an error occurs while looking up for other required components.
    • Method Detail

      • officeToXHTML

        public XHTMLOfficeDocument officeToXHTML​(InputStream officeFileStream,
                                                 String officeFileName,
                                                 String referenceDocument,
                                                 boolean filterStyles)
        Deprecated.
        Imports the given office document into an XHTMLOfficeDocument.
        Parameters:
        officeFileStream - binary data stream corresponding to input office document.
        officeFileName - name of the input office document, this argument is mainly used for determining input document format where necessary.
        referenceDocument - reference wiki document w.r.t which import process is carried out. This argument affects the attachment URLs generated during the import process where all references to attachments will be calculated assuming that the attachments are contained on the reference document.
        filterStyles - whether to filter styling information associated with the office document's content or not.
        Returns:
        XHTMLOfficeDocument containing xhtml result of the import operation or null if an error occurs.
        Since:
        2.2M1
      • officeToXDOM

        public XDOMOfficeDocument officeToXDOM​(InputStream officeFileStream,
                                               String officeFileName,
                                               String referenceDocument,
                                               boolean filterStyles)
        Deprecated.
        Imports the given office document into an XDOMOfficeDocument.
        Parameters:
        officeFileStream - binary data stream corresponding to input office document.
        officeFileName - name of the input office document, this argument is mainly is used for determining input document format where necessary.
        referenceDocument - reference wiki document w.r.t which import process is carried out. This srgument affects the attachment URLs generated during the import process where all references to attachments will be calculated assuming that the attachments are contained on the reference document.
        filterStyles - whether to filter styling information associated with the office document's content or not.
        Returns:
        XDOMOfficeDocument containing XDOM result of the import operation or null if an error occurs.
        Since:
        2.2M1
      • save

        public boolean save​(XDOMOfficeDocument doc,
                            String target,
                            String syntaxId,
                            String parent,
                            String title,
                            boolean append)
        Deprecated.
        Attempts to save the given XDOMOfficeDocument into the target wiki page specified by arguments.
        Parameters:
        doc - XDOMOfficeDocument to be saved.
        target - name of the target wiki page.
        syntaxId - syntax of the target wiki page.
        parent - name of the parent wiki page or null.
        title - title of the target wiki page or null.
        append - whether to append content if the target wiki page exists.
        Returns:
        true if the operation completes successfully, false otherwise.
      • getErrorMessage

        public String getErrorMessage()
        Deprecated.
        Returns:
        an error message set inside current execution (during import process) or null.