openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <arie...@apache.org>
Subject Re: CMIS Universal Content Provider (UCP) for Apache OpenOffice
Date Wed, 01 May 2013 13:04:39 GMT
Hi Rajath,

On Wed, May 01, 2013 at 04:53:49PM +0530, Rajath Shashidhara wrote:
> Hello Juergen,
> 
> Thank you for your previous mail.
> 
> If I create a CMIS UCP for OpenOffice:
> What are the functions it is expected to have?

You have to design a UNO component that provides an implementation of
a com.sun.star.ucb.ContentProvider for CMIS.
http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/ContentProvider.html

In order to understand what this means, first you have to learn what a UNO component
is, and then study how the UCB works.

Writing UNO components:
http://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Writing_UNO_Components
UCB:
http://wiki.openoffice.org/wiki/Documentation/DevGuide/UCB/Universal_Content_Broker
UCPs:
http://wiki.openoffice.org/wiki/Documentation/DevGuide/AppendixC/Universal_Content_Providers

> As in open/close/modify are the basic functions it is supposed to have.
> But, modify to what extent?

Technically speaking, you have to implement a ContentProvider, this is
the main entry point. And you have to define in a configuration file
what kind of protocol this ContentProvider can handle, for example
cmis:<server/repo/resource>.

When the application need to access a content with a URL that starts
with cmis:, the UCB will search in the configuration, will find your
content provider component, will instantiate it, and will ask it if it
can provide the desired content.

You will return an instance of a class implementing
a http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/Content.html
It is the content who executes UCB commands, like "open", "delete",
"update", etc.

Use NetBeans to play with this skeleton
http://people.apache.org/~arielch/extensions/CMISContentProvider.zip
Debug the code in the target office, set a break point in
queryContent(), got to File - Open, and type cmis:///dummy (you may need
to select "Use OOo dialogs" from the Options dialog).

> My questions might be too basic. Sorry.
> I would like to access the source code of previously made UCP's.
> Where can I find them?

They are located in trunk/main/ucb/source/ucp. But this code uses lots
of helper classes in several modules. I'd suggest you start first with
plain/pure UNO, get an overview of how UCB works, and then look at the
C++ implementation only if necessary.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Mime
View raw message