Package org.xwiki.officeimporter.builder
Interface XDOMOfficeDocumentBuilder
-
@Role public interface XDOMOfficeDocumentBuilder
Component responsible for buildingXDOMOfficeDocument
objects from binary office files orXHTMLOfficeDocument
objects.- Since:
- 2.1M1
- Version:
- $Id: a0133489a2f2cd2e82ffbe1897e66b55470bbfce $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XDOMOfficeDocument
build(InputStream officeFileStream, String officeFileName, org.xwiki.model.reference.DocumentReference reference, boolean filterStyles)
Builds aXDOMOfficeDocument
corresponding to the given office document.XDOMOfficeDocument
build(XHTMLOfficeDocument xhtmlOfficeDocument)
Builds aXDOMOfficeDocument
from the givenXHTMLOfficeDocument
.
-
-
-
Method Detail
-
build
XDOMOfficeDocument build(InputStream officeFileStream, String officeFileName, org.xwiki.model.reference.DocumentReference reference, boolean filterStyles) throws OfficeImporterException
Builds aXDOMOfficeDocument
corresponding to the given office document.- Parameters:
officeFileStream
-InputStream
corresponding to the office documentofficeFileName
- name of the office document (used to determine input document format)reference
- reference document w.r.t which HTML cleaning is performed. If the office file contains images or other binary artifacts, HTML cleaning will be performed assuming that those artifacts are present as attachments to the reference documentfilterStyles
- whether to filter CSS styles present in the HTML content produced by the office server- Returns:
- an
XDOMOfficeDocument
corresponding to the office document - Throws:
OfficeImporterException
- if an error occurs while performing the import operation- Since:
- 2.2M1
-
build
XDOMOfficeDocument build(XHTMLOfficeDocument xhtmlOfficeDocument) throws OfficeImporterException
Builds aXDOMOfficeDocument
from the givenXHTMLOfficeDocument
.- Parameters:
xhtmlOfficeDocument
-XHTMLOfficeDocument
already built usingXHTMLOfficeDocumentBuilder
- Returns:
- an
XDOMOfficeDocument
corresponding to the givenXHTMLOfficeDocument
- Throws:
OfficeImporterException
- if an error occurs while parsing XHTML into XDOM
-
-