Show last authors
1 = XWiki Integration with OpenOffice =
3 == Features from the user point of view: ==
5 The project is an extension for OpenOffice, which allows users to:
7 * view the wiki server structure (spaces,pages,attachments)
8 * create new wiki pages
9 * edit existing wiki pages
10 * open wiki pages in browser
11 * upload and download attachments
12 * edit attachments supported by OpenOffice
14 == Architecture structure: ==
16 === OpenOffice software architecture ===
18 OpenOffice is a complex and big software system. It has been designed as a client-server application system, which communicates via TCP/IP sockets. An installation of OOo implies installing the client and the server components on the same computer and the client would use the server component on the same system.
20 [[image:ArchOverview.jpg]]
22 The component model of OOo is called "Universal Network Objects" (UNO), where each component is described in an interface description language (IDL) module. The is made from sets of UNO components, which communicate in order to provide the functionalities of the applications. This architecture allows different applications to share the same components. [[image:OOoArch.jpg]]
24 Each UNO component (defined as an IDL type in a module) usually represents a specific "service", consisting of additional services, and possessing properties and interfaces (usual offering methods and properties to a specific aspect of the UNO component) to it. Properties allow the storing of information appertunant to services.
26 To create instances of service components one employs a "Service Manager", using either its method "createInstance()" or "createInstanceWithArguments()", supplying the fully qualified name of the UNO component. The returned object is called a "service object". Because service managers are used to create service objects, they are also called "factories".
28 The client-server communication between UNOs is performed using UNO remote protocol(this is similar with OMG from CORBA). At the transport layer it uses TCP/IP sockets.
30 **Programming languages**
32 The UNO components are implemented mostly by C++ programs that adhere to the type descriptions defined in the UNO IDL modules. After Sun bought StarOffice the UNO component technology was made available to the Java language by creating an appropriate proxy/adapter infrastructure into the runtime environment. The Java support for UNO allows the addressing of UNO components such as if they were native Java components. In addition the Java UNO infrastructure allows for creating and implementing UNO components fully in Java as well. OOo comes also with a specific programming language that is meant for scripting OOo components: OOo Basic. This language is modeled after Microsoft's Visual Basic.
34 === How to develop an extension for OpenOffice? ===
36 enables third party tools creation through UNO bridges, allowing using many languages. The principle is to create UNO packages that can be listed in the Extensions repository.
38 In order to write an UNO, the programmer should specify the basic UNO components:
40 * **Specification**: definition in a common language of what the component should do. For UNO, this language is called UNO-IDL and is more or less similar to Corba IDL.
41 * **Implementation**: is the code that will realize what is described in the component specifications. This programming language can either be C++, Java, Python or others. This is the internal part of the component and will not be accessible from another component.
43 The extension file is an archive which has name that ends in .oxt (formerly .uno.pkg or .zip). It can contain UNO components, type libraries,resources (like pictures for example), configuration files, dialog or basic libraries, etc. UNO components will provide services, and Services implement interfaces. For the XOO, a UNO service for example will implement XJob or XAsyncJob, in order to handle the OpenOffice events like saving a document, open a new document etc.
45 From the user's point of view the extension will be integrated in the using Extension Manager (OpenOffice Writer ->Tools->Extension Manager->Add (browse to to XWiki.oxt file))
47 ===== Tools: =====
49 * Netbeans plugin
50 * Eclipse plugin (compatibility problems with OO 3.0 SDK - Cedric Bosdonnat is working on it [[]])
52 === XOO Architecture ===
54 [[image:XOOArch.jpg]]
56 == User interface: ==
58 [[image:Mockup.jpg]]
60 == Implementation details: ==
62 The main modules of the component should be:
64 * The communication with the sever (this functions are provided by XWikiXmlRpcClient class)
65 * The abstractization of the XWiki objects (spaces, pages, attachments etc) - these are provided by the Xwiki core API
66 * The core module (the back-end of the XOO). This should include: A ConversionManager which converts files between the two formats (for XWiki and for OpenOffice), the integration with a html cleaner, a StorageManager which manages the folders where the editing and the new temporal files will be saved, a StateManager who knows what files are opened for editing etc , a URL Manager that gives to every page and every attachment a complete name, and creates new names for the new pages.
67 * The graphical user interface. There are two approaches:
68 ** using OOo SDK API( )
69 ** integrate Java Swing (
71 The main functionalities of the application should be:
73 * A wizard for connecting to an XWiki server
74 ** Some dialog boxes where the user enters the server URL, the user and the password
75 ** Calls login() method from XWiki XmlRpcClient which invokes the login server's method
76 ** If the authentification is successfully done, calls getSpaces() method in order to get the spaces summaries from the server
77 ** The application should maintain a file with the authentification settings, in order to automatic connect to the specified server
78 * A navigation panel for browsing the documents inside the wiki
79 ** Displays the wiki structure as a tree
80 ** At onClick Event on a space - it is called getPages() method
81 ** At onClick Event on a page - it is called getAttachments() method
82 ** An option to view the entire structure (for every space, every document)
83 ** If there are some protected pages, they should be detected and deleted from the local wiki structure
84 ** Uses a timer which checks if the client is still connected to the server. If there is a connection it should be checked if there are some differences in the wiki structure
85 ** In the contextual menu, there should be an option (view the page in browser).This can be easy done from java.
86 * Downloading and uploading attachments
87 ** Upload:
88 *** Tests if the user can upload (is logged in, has salected a space etc)
89 *** Calls the method addAttachment() from XWikiRpcClient
90 ** Download:
91 *** DialogBox for the user to specify the folder there the document should be saved
92 *** Invokes the server function getAttachmentData()
93 *** Writes the received buffer in a file to local disc
94 * Editing attachments supported by OpenOffice
95 ** Verifies if the attachment is supported by openoffice
96 ** The user edits his document on the local disk and when he saves it (Save to XWiki button), the document is sent to the server
97 ** It can be added an option of saving the attachment in the entire XWiki every time when the user presses Ctrl+S for example
98 * Editing wiki documents in OpenOffice Writer
99 ** Verifies if the user can edit that page ( it is logged in, the page is not already opened etc)
100 ** Invokes the renderContent() method and the client receives the page in html
101 ** Converts the page from the its XWiki form to proper form for OpenOffice
102 ** Opens the page from OpenOffice Writter (OpenOffice SDK has a method loadComponentFromURL )
103 * Creating new documents
104 ** The user has to mention the space for the new page, the name and the title
105 ** A new document is opened in OpenOffice Writer (an URLManager should make sure that the document will receive a unique name
106 ** When the user saves the page,the page is converted in a format for XWiki and then invokes the server' s function storePage()

Get Connected