Package org.xwiki.officeimporter.builder
Interface XDOMOfficeDocumentBuilder
-
@Role public interface XDOMOfficeDocumentBuilderComponent responsible for buildingXDOMOfficeDocumentobjects from binary office files orXHTMLOfficeDocumentobjects.- Since:
- 2.1M1
- Version:
- $Id: a0133489a2f2cd2e82ffbe1897e66b55470bbfce $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XDOMOfficeDocumentbuild(InputStream officeFileStream, String officeFileName, org.xwiki.model.reference.DocumentReference reference, boolean filterStyles)Builds aXDOMOfficeDocumentcorresponding to the given office document.XDOMOfficeDocumentbuild(XHTMLOfficeDocument xhtmlOfficeDocument)Builds aXDOMOfficeDocumentfrom the givenXHTMLOfficeDocument.
-
-
-
Method Detail
-
build
XDOMOfficeDocument build(InputStream officeFileStream, String officeFileName, org.xwiki.model.reference.DocumentReference reference, boolean filterStyles) throws OfficeImporterException
Builds aXDOMOfficeDocumentcorresponding to the given office document.- Parameters:
officeFileStream-InputStreamcorresponding 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
XDOMOfficeDocumentcorresponding 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 aXDOMOfficeDocumentfrom the givenXHTMLOfficeDocument.- Parameters:
xhtmlOfficeDocument-XHTMLOfficeDocumentalready built usingXHTMLOfficeDocumentBuilder- Returns:
- an
XDOMOfficeDocumentcorresponding to the givenXHTMLOfficeDocument - Throws:
OfficeImporterException- if an error occurs while parsing XHTML into XDOM
-
-