Package org.xwiki.officeimporter
Class OfficeImporterVelocityBridge
- java.lang.Object
-
- org.xwiki.officeimporter.OfficeImporterVelocityBridge
-
@Deprecated public class OfficeImporterVelocityBridge extends Object
Deprecated.since 4.1M1 use theScriptServicewith hint "officeimporter" insteadA bridge between velocity and office importer.- Since:
- 1.8M1
- Version:
- $Id: 0901f1dfb8e9ae21ac8cfc4ced93cc4627a23b29 $
-
-
Field Summary
Fields Modifier and Type Field Description static StringOFFICE_IMPORTER_ERRORDeprecated.The key used to place any error messages while importing office documents.static List<String>PRESENTATION_FORMAT_EXTENSIONSDeprecated.File extensions corresponding to slide presentations.
-
Constructor Summary
Constructors Constructor Description OfficeImporterVelocityBridge(org.xwiki.component.manager.ComponentManager componentManager)Deprecated.Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetErrorMessage()Deprecated.XDOMOfficeDocumentofficeToXDOM(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)Deprecated.Imports the given office document into anXDOMOfficeDocument.XHTMLOfficeDocumentofficeToXHTML(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)Deprecated.Imports the given office document into anXHTMLOfficeDocument.booleansave(XDOMOfficeDocument doc, String target, String syntaxId, String parent, String title, boolean append)Deprecated.Attempts to save the givenXDOMOfficeDocumentinto the target wiki page specified by arguments.Map<TargetDocumentDescriptor,XDOMOfficeDocument>split(XDOMOfficeDocument xdomDocument, String[] headingLevels, String namingCriterionHint, String rootDocumentName)Deprecated.Splits the givenXDOMOfficeDocumentinto multipleXDOMOfficeDocumentinstances according to the specified criterion.XDOMOfficeDocumentxhtmlToXDOM(XHTMLOfficeDocument xhtmlOfficeDocument)Deprecated.Imports the givenXHTMLOfficeDocumentinto anXDOMOfficeDocument.
-
-
-
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 OfficeImporterExceptionDeprecated.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 anXHTMLOfficeDocument.- 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:
XHTMLOfficeDocumentcontaining xhtml result of the import operation or null if an error occurs.- Since:
- 2.2M1
-
xhtmlToXDOM
public XDOMOfficeDocument xhtmlToXDOM(XHTMLOfficeDocument xhtmlOfficeDocument)
Deprecated.Imports the givenXHTMLOfficeDocumentinto anXDOMOfficeDocument.- Parameters:
xhtmlOfficeDocument-XHTMLOfficeDocumentto be imported.- Returns:
XDOMOfficeDocumentcontainingXDOMresult 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 anXDOMOfficeDocument.- 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:
XDOMOfficeDocumentcontainingXDOMresult of the import operation or null if an error occurs.- Since:
- 2.2M1
-
split
public Map<TargetDocumentDescriptor,XDOMOfficeDocument> split(XDOMOfficeDocument xdomDocument, String[] headingLevels, String namingCriterionHint, String rootDocumentName)
Deprecated.Splits the givenXDOMOfficeDocumentinto multipleXDOMOfficeDocumentinstances according to the specified criterion. This method is useful when a single office document has to be imported and split into multiple wiki pages. An auto generated TOC structure will be returned associated to rootDocumentNameTargetDocumentDescriptorentry.- Parameters:
xdomDocument-XDOMOfficeDocumentto be split.headingLevels- heading levels defining the split points on the original document.namingCriterionHint- hint indicating the child pages naming criterion.rootDocumentName- name of the root document w.r.t which splitting will occur. In the results set the entry corresponding to rootDocumentNameTargetDocumentDescriptorwill hold an auto-generated TOC structure.- Returns:
- a map holding
XDOMOfficeDocumentfragments against correspondingTargetDocumentDescriptorinstances 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 givenXDOMOfficeDocumentinto the target wiki page specified by arguments.- Parameters:
doc-XDOMOfficeDocumentto 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.
-
-