Thank you very much Mathias.  I will review the information that you
suggested about the Dispatcher.  If any examples come to mind, I would
appreciate it if you send them my way.

By the way, wrapping the streams is quite amenable to java coding so I
foresee an easy implementation with that.  Besides, I just skimmed over the
DevGuide and there is a chapter on Database Access that may also be helpful:
One can presumably connect to databases through JDBC drivers and such and
there are classes to insert, update, and delete, records from XInputStreams.

"Mathias Bauer" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> Carlos wrote:
> 
> > Thank you very much Mathias.  This url worked just fine.
> > Perhpas you can help me with two other questions:
> > 1) Is there a class or service that would directly support loading and 
> > saving a document into a database?  I work with a database that supports

> > fileds of BLOB type and I can probably manage to create XInputStreams
and 
> > XOuputStreams to load and save a document to and fro the database.
> 
> No there isn't one. We wanted to keep the API simple and a stream is the
> least common deminator all document sources should be able to support.
> Of course we support also URLs as "sources" as we have the UCB service
> that can provide us with a stream created from a URL. Doing the same for
> databases would mean to develop a protocol how databases can be
> specified and how they could be asked for a particular stream. IOHO this
> is out of the OOo scope as well as outside of the database scope and so
> we recommend to create some wrapper code to create a stream from the
> BLOB or filling the BLOB from a stream that is taylored to the
> particular database in use.
> 
> > 2) Once a document is loaded from the database (XInputStream or
whatever) 
> > into a "local" desktop, can I "reprogram" the Save button of the local 
> > version of the writer so that it saves the document back into the
database 
> > (by launching the creation of a XStorable that sends the data to an 
> 
> Yes, this is possible by using a DispatchInterceptor. There is a chapter
> in the DevGuide that describes dispatching in general and intercepting
> in particular. In case you use the XStorable interface to save the
> document to your stream be aware that you need to handle possible
> exceptions thrown in case something goes wrong. You can use the
> "InteractionHandler" property filled with an object representing the
> service com.sun.star.task.InteractionHandler to handle most of them.
> 
> Best regards,
> Mathias
> 
> -- 
> Mathias Bauer - OpenOffice.org Application Framework Project Lead
> Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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

Reply via email to