I'd also go with the streams based API.
I'd like to stay away from this decision and let you all decide :)
Thanks.
- Asiri
Thanks,
Marius
OfficeImporter::xhtmlToXDOM(XHTMLOfficeDocument
xhtmlOfficeDocument):XDOMOfficeDocument
OfficeImporter::officeToXDOM(byte[] officeFileData, DocumentName
referenceDocument, boolean filterStyles):XDOMOfficeDocument
OfficeImporter::buildPresentation(byte[]
officeFileData):XDOMOfficeDocument
OfficeImporter::splitImport(XDOMOfficeDocument
xdomOfficeDocument, int[]
headingLevelsToSplit, NamingCriterion namingCriterion, DocumentName
baseDocumentName):Map<TargetPageDescriptor, XDOMOfficeDocument>
</code>
As you can see, these methods are more granular and the responsibilities
are
well defined. Customizing the import process can
be done from the client
code. For an example:
1. Make the initial import from office to XHTMLOfficeDocument -
OfficeImporter::officeToXHTML()
2. Perform customizations on the XHTMLOfficeDocument - w3c DOM
manipulations.
3. Import the XHTMLOfficeDocument into XDOMOfficeDocument -
OfficeImporter::xhtmlToXDOM()
4. Perform customizations on the XDOMOfficeDocument (XDOM) - XDOM
manipulations.
5. Split the XDOMOfficeDocument into multiple XDOMOfficeDocument
instances -
OfficeImporter::splitImport()
6. Perform customizations on these child XDOMOfficeDocument instances -
XDOM
manipulations.
7. Render the XDOMOfficeDocument instances & save them into wiki pages -
XWiki rendering operations.
I think this interface will make it easy to extend & maintain
officeimporter
functionality in the future.
Along with this, I would also like to refactor the xwiki-refactoring
module
a bit to get rid of string based document names
from it.
This whole refactoring operation would take approximately one day to
complete. And since this operation is not adding any new features, I
think
it can be committed on both trunk and 2.0
branch.
Here's my +1 to all of above.
Thanks.
- Asiri
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org