see answers inline

Joerg Barfurth wrote:
> Hi Christian,
> 
>> from what I understand this stuff can only be done in c++ right now, not
>> java.
>>
> 
> Not so. The backends are accessed as UNO services and can be written in
> any language suitable for writing UNO components. This includes Java and
> even Python.

My information about this is a little bit dated I think the last time we
checked if we could use java was on the 1.1.x series of OOo, not 2.0.x
series. I've searched the mailiong list but cannot find the mail
regarding this, so I might be totally wrong.
Anyway, if it now works in OOo 2.0.x that is a great benefit for me,
since I don't have to learn c++ :-)

> The only premise is that the UNO language binding does not access the
> configuration database for its own startup configuration. IIRC that used
> to be a problem with Java in OOo 1.1.x, but shouldn't be the case any
> more in OOo 2.

hopefully it does not need to, since the url from where it needs to
download the files are specified in the configmgrrc file..

> We did create a modified version of the Configuration chapter in the
> developer's guide that explains the services and interfaces involved in
> this. Unfortunately it seems to have not made it into the OOo 2.0
> version of the guide. I'll check if I can find it somewhere and get it
> up onto the website.

That would be very much appreciated. and if you could telt us the url of
this document when/if you find it and have it uploaded :-)


> The short summary is: You need to create a UNO service that implements
> one of the abstract services
> com.sun.star.configuration.backend.SingleLayerStratum [1] or
> com.sun.star.configuration.backend.MultiLayerStratum [2].
> 
> This essentially amounts to implementing the methods of the
> XSingleLayerStratum or XMultiLayerStratum interface to return a Layer
> object whose XLayer::readData method reads and parses from your data store.
> 
> If you store your data in the 'xcu' XML format, you can use the existing
>  com.sun.star.configuration.backend.xml.LayerParser service to implement
> the Layer object. All you need to do is provide an XInputStream to read
> the data.

ok, this sounds doable, adn I'm looking forward to start testing it next
week :-)

> 
>> If I manage to write my own configurationreader can this then be
>> installed using unopkg? or do I have to compile it within my own version
>> of OpenOffice.org?
>>
> 
> You can install such a backend using unopkg add --shared. That will not
> automatically enable its use for the standard configuration stack
> though. To activate it for that purpose, you need to add it to the
> CFG_Strata entry in $officeinstall/program/bootstrap.
don't you mean $officeinstall/program/configmgr[rc|.ini] ?`because that
is where I have changed CFG_Strata variable before? and looking in
bootstrap now, it shows no such variable..


> Alternatively you can have your SingleLayerStratum register itself as an
> instance of service com.sun.star.configuration.backend.PlatformBackend.
> In that case it will be used automatically through the special
> 'SystemIntegration' backend service.
> Warning: this service is still declared 'unpublished' and thus is
> subject to change in a future version. (I do think that is unlikely,
> though and changes will be announced using the interface-announce
> mailing list.)

well, if this is as well-documented in the developersguide as the rest
of the configuration system, I'll probably try to add it to the
configmgr file :-)


-- 
Christian Andersson - [EMAIL PROTECTED]

Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to