ScriptService
with hint "officeimporter" instead@Deprecated public class OfficeImporterVelocityBridge extends Object
Modifier and Type | Field and Description |
---|---|
static String |
OFFICE_IMPORTER_ERROR
Deprecated.
The key used to place any error messages while importing office documents.
|
static List<String> |
PRESENTATION_FORMAT_EXTENSIONS
Deprecated.
File extensions corresponding to slide presentations.
|
Constructor and Description |
---|
OfficeImporterVelocityBridge(org.xwiki.component.manager.ComponentManager componentManager)
Deprecated.
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorMessage()
Deprecated.
|
XDOMOfficeDocument |
officeToXDOM(InputStream officeFileStream,
String officeFileName,
String referenceDocument,
boolean filterStyles)
Deprecated.
Imports the given office document into an
XDOMOfficeDocument . |
XHTMLOfficeDocument |
officeToXHTML(InputStream officeFileStream,
String officeFileName,
String referenceDocument,
boolean filterStyles)
Deprecated.
Imports the given office document into an
XHTMLOfficeDocument . |
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. |
Map<TargetDocumentDescriptor,XDOMOfficeDocument> |
split(XDOMOfficeDocument xdomDocument,
String[] headingLevels,
String namingCriterionHint,
String rootDocumentName)
Deprecated.
Splits the given
XDOMOfficeDocument into multiple XDOMOfficeDocument instances according to the
specified criterion. |
XDOMOfficeDocument |
xhtmlToXDOM(XHTMLOfficeDocument xhtmlOfficeDocument)
Deprecated.
Imports the given
XHTMLOfficeDocument into an XDOMOfficeDocument . |
public static final List<String> PRESENTATION_FORMAT_EXTENSIONS
public static final String OFFICE_IMPORTER_ERROR
public OfficeImporterVelocityBridge(org.xwiki.component.manager.ComponentManager componentManager) throws OfficeImporterException
componentManager
- used to lookup for other necessary components.OfficeImporterException
- if an error occurs while looking up for other required components.public XHTMLOfficeDocument officeToXHTML(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)
XHTMLOfficeDocument
.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.XHTMLOfficeDocument
containing xhtml result of the import operation or null if an error occurs.public XDOMOfficeDocument xhtmlToXDOM(XHTMLOfficeDocument xhtmlOfficeDocument)
XHTMLOfficeDocument
into an XDOMOfficeDocument
.xhtmlOfficeDocument
- XHTMLOfficeDocument
to be imported.XDOMOfficeDocument
containing XDOM
result of the import
operation or null if an error occurs.public XDOMOfficeDocument officeToXDOM(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)
XDOMOfficeDocument
.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.XDOMOfficeDocument
containing XDOM
result of the import
operation or null if an error occurs.public Map<TargetDocumentDescriptor,XDOMOfficeDocument> split(XDOMOfficeDocument xdomDocument, String[] headingLevels, String namingCriterionHint, String rootDocumentName)
XDOMOfficeDocument
into multiple XDOMOfficeDocument
instances 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 rootDocumentName
TargetDocumentDescriptor
entry.xdomDocument
- XDOMOfficeDocument
to 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 rootDocumentName TargetDocumentDescriptor
will hold an auto-generated
TOC structure.XDOMOfficeDocument
fragments against corresponding TargetDocumentDescriptor
instances or null if an error occurs.public boolean save(XDOMOfficeDocument doc, String target, String syntaxId, String parent, String title, boolean append)
XDOMOfficeDocument
into the target wiki page specified by arguments.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.public String getErrorMessage()
Copyright © 2004–2017 XWiki. All rights reserved.