Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
XHTMLOfficeDocumentBuilder | 36 | 0 | - | 0 | 0 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | package org.xwiki.officeimporter.builder; | |
21 | ||
22 | import java.io.InputStream; | |
23 | ||
24 | import org.xwiki.component.annotation.Role; | |
25 | import org.xwiki.model.reference.DocumentReference; | |
26 | import org.xwiki.officeimporter.OfficeImporterException; | |
27 | import org.xwiki.officeimporter.document.XHTMLOfficeDocument; | |
28 | ||
29 | /** | |
30 | * Component responsible for building {@link XHTMLOfficeDocument} objects from binary office files. | |
31 | * | |
32 | * @version $Id: c83a21ba84584dc8e23041949161abb7d6933567 $ | |
33 | * @since 2.1M1 | |
34 | */ | |
35 | @Role | |
36 | public interface XHTMLOfficeDocumentBuilder | |
37 | { | |
38 | /** | |
39 | * Builds a {@link XHTMLOfficeDocument} corresponding to the specified office document. | |
40 | * | |
41 | * @param officeFileStream {@link InputStream} corresponding to the office document | |
42 | * @param officeFileName name of the office document (used to determine input document format) | |
43 | * @param reference reference document w.r.t which HTML cleaning is performed. If the office file contains images or | |
44 | * other binary artifacts, HTML cleaning will be performed assuming that those artifacts are present as | |
45 | * attachments to the reference document | |
46 | * @param filterStyles whether to filter CSS styles present in the HTML content produced by office server | |
47 | * @return an {@link XHTMLOfficeDocument} corresponding to the office document | |
48 | * @throws OfficeImporterException if an error occurs while performing the import operation | |
49 | * @since 2.2M1 | |
50 | */ | |
51 | XHTMLOfficeDocument build(InputStream officeFileStream, String officeFileName, DocumentReference reference, | |
52 | boolean filterStyles) throws OfficeImporterException; | |
53 | } |