Package org.xwiki.officeimporter.script
Class LegacyOfficeImporterScriptService
- java.lang.Object
-
- org.xwiki.officeimporter.script.OfficeImporterScriptService
-
- org.xwiki.officeimporter.script.LegacyOfficeImporterScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Named("officeimporter") @Singleton public class LegacyOfficeImporterScriptService extends OfficeImporterScriptServiceLegacy version ofOfficeImporterScriptService, holding deprecated methods.- Since:
- 14.10.2, 15.0RC1
- Version:
- $Id: 3f0a0057d6ff4065603dbcce3625e4d74345c2f5 $
-
-
Field Summary
-
Fields inherited from class org.xwiki.officeimporter.script.OfficeImporterScriptService
OFFICE_IMPORTER_ERROR
-
-
Constructor Summary
Constructors Constructor Description LegacyOfficeImporterScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description XDOMOfficeDocumentofficeToXDOM(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)Deprecated.XHTMLOfficeDocumentofficeToXHTML(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)Deprecated.booleansave(XDOMOfficeDocument doc, String target, String syntaxId, String parent, String title, boolean append)Map<TargetDocumentDescriptor,XDOMOfficeDocument>split(XDOMOfficeDocument xdomDocument, String[] headingLevels, String namingCriterionHint, String rootDocumentName)Deprecated.-
Methods inherited from class org.xwiki.officeimporter.script.OfficeImporterScriptService
getErrorMessage, officeToXDOM, officeToXHTML, save, save, save, split, split, xhtmlToXDOM
-
-
-
-
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 documentofficeFileName- name of the input office document, this argument is mainly used for determining input document format where necessaryreferenceDocument- 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 documentfilterStyles- 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
-
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 documentofficeFileName- name of the input office document, this argument is mainly is used for determining input document format where necessaryreferenceDocument- 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 documentfilterStyles- 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
-
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 savedtarget- name of the target wiki pagesyntaxId- syntax of the target wiki pageparent- name of the parent wiki page or nulltitle- title of the target wiki page or nullappend- whether to append content if the target wiki page exists- Returns:
- true if the operation completes successfully, false otherwise
-
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 splitheadingLevels- heading levels defining the split points on the original documentnamingCriterionHint- hint indicating the child pages naming criterionrootDocumentName- 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
-
-