Package org.xwiki.officeimporter
Class OfficeImporterVelocityBridge
- java.lang.Object
-
- org.xwiki.officeimporter.OfficeImporterVelocityBridge
-
@Deprecated public class OfficeImporterVelocityBridge extends Object
Deprecated.since 4.1M1 use theScriptService
with hint "officeimporter" insteadA bridge between velocity and office importer.- Since:
- 1.8M1
- Version:
- $Id: 0901f1dfb8e9ae21ac8cfc4ced93cc4627a23b29 $
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description OfficeImporterVelocityBridge(org.xwiki.component.manager.ComponentManager componentManager)
Deprecated.Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getErrorMessage()
Deprecated.XDOMOfficeDocument
officeToXDOM(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)
Deprecated.Imports the given office document into anXDOMOfficeDocument
.XHTMLOfficeDocument
officeToXHTML(InputStream officeFileStream, String officeFileName, String referenceDocument, boolean filterStyles)
Deprecated.Imports the given office document into anXHTMLOfficeDocument
.boolean
save(XDOMOfficeDocument doc, String target, String syntaxId, String parent, String title, boolean append)
Deprecated.Attempts to save the givenXDOMOfficeDocument
into the target wiki page specified by arguments.Map<TargetDocumentDescriptor,XDOMOfficeDocument>
split(XDOMOfficeDocument xdomDocument, String[] headingLevels, String namingCriterionHint, String rootDocumentName)
Deprecated.Splits the givenXDOMOfficeDocument
into multipleXDOMOfficeDocument
instances according to the specified criterion.XDOMOfficeDocument
xhtmlToXDOM(XHTMLOfficeDocument xhtmlOfficeDocument)
Deprecated.Imports the givenXHTMLOfficeDocument
into anXDOMOfficeDocument
.
-
-
-
Field Detail
-
PRESENTATION_FORMAT_EXTENSIONS
public static final List<String> PRESENTATION_FORMAT_EXTENSIONS
Deprecated.File extensions corresponding to slide presentations.
-
OFFICE_IMPORTER_ERROR
public static final String OFFICE_IMPORTER_ERROR
Deprecated.The key used to place any error messages while importing office documents.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OfficeImporterVelocityBridge
public OfficeImporterVelocityBridge(org.xwiki.component.manager.ComponentManager componentManager) throws OfficeImporterException
Deprecated.Default constructor.- Parameters:
componentManager
- used to lookup for other necessary components.- Throws:
OfficeImporterException
- if an error occurs while looking up for other required components.
-
-
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 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.- Returns:
XHTMLOfficeDocument
containing xhtml result of the import operation or null if an error occurs.- Since:
- 2.2M1
-
xhtmlToXDOM
public XDOMOfficeDocument xhtmlToXDOM(XHTMLOfficeDocument xhtmlOfficeDocument)
Deprecated.Imports the givenXHTMLOfficeDocument
into anXDOMOfficeDocument
.- Parameters:
xhtmlOfficeDocument
-XHTMLOfficeDocument
to be imported.- Returns:
XDOMOfficeDocument
containingXDOM
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 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.- Returns:
XDOMOfficeDocument
containingXDOM
result of the import operation or null if an error occurs.- Since:
- 2.2M1
-
split
public Map<TargetDocumentDescriptor,XDOMOfficeDocument> split(XDOMOfficeDocument xdomDocument, String[] headingLevels, String namingCriterionHint, String rootDocumentName)
Deprecated.Splits the givenXDOMOfficeDocument
into multipleXDOMOfficeDocument
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 rootDocumentNameTargetDocumentDescriptor
entry.- Parameters:
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 rootDocumentNameTargetDocumentDescriptor
will hold an auto-generated TOC structure.- Returns:
- a map holding
XDOMOfficeDocument
fragments against correspondingTargetDocumentDescriptor
instances or null if an error occurs. - Since:
- 2.2M1
-
save
public boolean save(XDOMOfficeDocument doc, String target, String syntaxId, String parent, String title, boolean append)
Deprecated.Attempts to save the givenXDOMOfficeDocument
into the target wiki page specified by arguments.- Parameters:
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.- Returns:
- true if the operation completes successfully, false otherwise.
-
getErrorMessage
public String getErrorMessage()
Deprecated.- Returns:
- an error message set inside current execution (during import process) or null.
-
-