| View previous topic :: View next topic |
| Author |
Message |
kaps General User

Joined: 04 Dec 2003 Posts: 5
|
Posted: Thu Dec 04, 2003 9:21 am Post subject: ODMAContentProvider |
|
|
Hi,
I am trying to create a macro that uses ODMA connections to a Document Management System. I believe ODMAContentProvider is the service to use but I can't get any useful info/code snippets on this.
Has anyone tried this before? Please help.
Thanks,
Kaps |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Dec 05, 2003 4:12 pm Post subject: |
|
|
I am trying to make ODMA work as well on OpenOffice. I am working with iManage as a Document Management Provider.
I have run a macro that allows OpenOffice to "check in" documents to iManage. I first create and store the documents using Excel, then exit from the documents. I have set OO as the default handler for Excel 97 documents, however, so when I later open the document through Mailsite by double-clicking it in the directory, it opens into OpenOffice Calc, not Excel.
When I exited from OO, the documents still would not "check in" to iManage. I had to "check in" the documents manually using iManage.
I then copied and pasted the following macros from OpenOffice.org site into standard macros in my copy of Open Office:
REM ***** BASIC *****
' Option Explicit
Sub RegisterUcpOdma
Dim aConfigProvider As Object
Dim aConfiguration As Object
Dim aFilters as Object
Dim aNewNode as Object
Dim nResponse as Integer
Dim bAddNode as Boolean
' access the global configuration provider
aConfigProvider = createUnoService( "com.sun.star.configuration.ConfigurationProvider" )
' create an access object for TypeDetection module
Dim aParams(0) As new com.sun.star.beans.PropertyValue
aParams(0).Name = "nodepath"
aParams(0).Value = "/org.openoffice.ucb.Configuration"
aConfiguration = aConfigProvider.createInstanceWithArguments( _
"com.sun.star.configuration.ConfigurationUpdateAccess", _
aParams() )
' open the set node for the types
aContentProviders = aConfiguration.getByName( "ContentProviders" )
aContentProvidersDataPrimaryKeys = aContentProviders.getByName( "Local" )
aSecondaryKeys = aContentProvidersDataPrimaryKeys.getByName( "SecondaryKeys" )
aContentProvidersDataSecondaryKeys = aSecondaryKeys.getByName( "Office" )
aProviderData = aContentProvidersDataSecondaryKeys.getByName( "ProviderData" )
' existence check
bAddNode = TRUE
dim xx() as string
xx() = aProviderData.getElementNames
for i=LBOUND(xx) to UBOUND(xx)
aContentProviderData = aProviderData.getByName( xx(i) )
if ( aContentProviderData.ServiceName = "com.sun.star.ucb.OdmaContentProvider" ) Then
nResponse = MsgBox( "The type is already present in the configuration! Overwrite?", 4 )
if ( 6 = nResponse ) Then
aProviderData.removeByName( xx(i) )
Else
bAddNode = FALSE
End If
End If
next i
if ( bAddNode ) Then
' create a new node for the new type
aContentProviderData = aProviderData.createInstance( )
' fill this new type node
aContentProviderData.ServiceName = "com.sun.star.ucb.OdmaContentProvider"
aContentProviderData.URLTemplate = "vnd.sun.star.odma"
' insert this new type
aProviderData.insertByName( "Provider" + (UBOUND(xx) - LBOUND(xx) + 2), aContentProviderData )
End If
' commit the changes done
aConfiguration.commitChanges( )
' register the component implementing the filter
' RegisterFilterComponent( )
End Sub
Sub RegisterFilterComponent
Dim oRegistry as Object
Dim oImplReg as Object
oRegistry = createUnoService( "com.sun.star.registry.SimpleRegistry" )
oImplReg = createUnoService( "com.sun.star.registry.ImplementationRegistration" )
if ( IsNull( oRegistry ) Or IsNull( oImplReg ) ) Then
MsgBox "could not create the components necessary for registering the component!"
Exit Sub
End If
On Local Error Resume Next
oRegistry.open( "applicat.rdb", FALSE, FALSE )
if ( Not oRegistry.IsValid() ) Then
MsgBox "could not open the registry!"
Exit Sub
End If
On Local Error Goto 0
oImplReg.registerImplementation( "com.sun.star.loader.SharedLibrary", "ucpodma1.dll", oRegistry )
End Sub
After running the RegisterUCBODMA macro, OpenOffice calc was obviously communicating with iManage because exiting from a document would automatically "check in" the document to iManage.
The second macro gave me a "could not open the registry" error.
I am stumped at this point. I want to have enough information to have OO calc start the "open document" dialog in iManage, but the rest of the information is beyond my understanding.
The most complete description I have seen so far of what to do is:
From: Kai Sommerfeld <kai.sommerfeld@sun.com>
Date: Fri, 27 Sep 2002 09:28:15 GMT
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [dev] ODMA Content Provider
Hi,
please find my comments inline.
>Hello everybody,
>
>I'm new to Open Office and I have a question regarding ODMA integration.
>One of our customers is using GroupWise as DMS. He wants the same
>functionality with Open Office as with Microsoft Office.
>As far as I know, Open Office doesn't provide a standard ODMA
>integration.
That's right, currently OpenOffice has no ODMA support out of the box.
The good news is that actually there is a feature complete but not
extensively tested implemantation for OpenOffice ODMA support.
We do not include it because we had no chance to test this in a real
life environment so far. Without testing there is of course no way to
get it into the product.
So you're very welcome to test OO's ODMA support against GroupWise. If
it turns out that our implementation is correct and robust we can discuss
about putting it into the OO product.
>I found a Visual Basic Macro on
>http://ucb.openoffice.org/docs/ucp-ref/odma-ucp.html
>To be honest I don't really understand what it does since I don't know
VB.
>When I run the Macro I get an error. ( I don't have the needed
ucpodma.dll )
The library is missing because ODMA support is not part of OpenOffice
yet.
You need to build it by your own. The sources are located in
/ucb/source/ucp/odma.
Once you have the library put it in <officeinstpath>/program and run the
macro again. After this you should have ODMA support in OpenOffice. You
can
test this by opening the file open dialog (not the Windows dialog, which
is
activated by default, but OO's own – you can activate it using
"Tools->Options->General") and entering a ODMA-URL. The syntax is
described
in http://ucb.openoffice.org/docs/ucp-ref/odma-ucp.html.
- list the documents stored in the DMS (file open dialog)
- load documents from DMS (file open dialog/URL bar)
- store documents to DMS (implicitely if it was loaded from a DMS or
explicitely using file save dialog)
Note that this is currently a Windows-only feature. It uses "ODMA 2.0
Connection Manager", which is only available for Windows (Needs
odma32.dll: http://www.infonuovo.com/odma/downloads/). Information on
how to install and configure Connection Manager is available here:
http://www.infonuovo.com/odma/downloads/odma20-2.htm. It might be
possible
that the GroupWise Client installation program itself installs odma32.dll
and does all required registry changes, but I don't know this.
>I also tried to download the ODMA Content Provider but the link is
broken. (
>http://api.openoffice.org/common/ref/com/sun/star/ucb/ODMAContentProvid
er.html)
This link should point to the interface specification of the ODMA
Content
Provider. The HTML documentation seems to be outdated. You may address
this
issue in api@openoffice.org.
>Is the content provider the ODMA Integration?
Yes, it is.
>Ist hard to not panic when you have one week to get the answers and you
>have to work with three technologies, you don't have a clue about.
>(ODMA, Open Office, VB)
Feel free to ask in case of problems.
>If this question is out of place her please redirect me to another
>mailing list or, even better, a newsgroup.
We should switch to ucb@openoffice.org ...
>Thanks a lot in advance,
>Christoph
Again, your feedback regarding OO's ODMA support would be very welcome.
- Kai.
The following URLs have been most helpful so far:
api.openoffice.org/docs/common/ref/ com/sun/star/ucb/module-ix.html
api.openoffice.org/docs/common/ref/com/ sun/star/ucb/ODMAContentProvider.html
ucb.openoffice.org/docs/ucp-ref/odma-ucp.html
ucb.openoffice.org/docs/ucp-ref.html
I also called Sun support, and they suggested I try the following url to try when the openofice.org site is back up again on Monday:
ucb.openoffice.org/docs/ucp-ref/odma-ucp.html?JServSessionIdservlets=drzhyc61
I suspect that is just a search engine result when he got a "hit" on the url I cited earlier -- but I am not going to turn down offers of help at this point!
My impression is that I am missing a library I need.
If you get any leads yourself on additional information, please let me know. |
|
| Back to top |
|
 |
tputney Newbie

Joined: 05 Dec 2003 Posts: 1
|
Posted: Fri Dec 05, 2003 4:17 pm Post subject: ODMAContentProvider |
|
|
| I am the person who is shown above as "guest." I must not have logged in properly before posting the message. |
|
| Back to top |
|
 |
kaps General User

Joined: 04 Dec 2003 Posts: 5
|
Posted: Mon Dec 08, 2003 9:06 am Post subject: |
|
|
Thanks for your inputs. I was so excited to try this but when I try and run the macro RegisterFilterComponent , I get a message "Unable to open registry". I could not locate the applicat.rdb though I found services.rdb,setup_service.rdb, and types.rdb. Can someone tell me where I can get this from?
| Code: |
oRegistry.open( "applicat.rdb", FALSE, FALSE )
if ( Not oRegistry.IsValid() ) Then
MsgBox "could not open the registry!"
Exit Sub
End If
|
Also, you mentioned in your post that we need to build ucpodma.dll from the sources located at in /ucb/source/ucp/odma. I could not find this path in my Installation location. Could it be because I am using StarOffice? |
|
| Back to top |
|
 |
kribit Newbie

Joined: 07 Dec 2005 Posts: 1
|
Posted: Wed Dec 07, 2005 8:02 am Post subject: |
|
|
| Anonymous wrote: |
That's right, currently OpenOffice has no ODMA support out of the box.
The good news is that actually there is a feature complete but not
extensively tested implemantation for OpenOffice ODMA support.
We do not include it because we had no chance to test this in a real
life environment so far. Without testing there is of course no way to
get it into the product.
So you're very welcome to test OO's ODMA support against GroupWise. If
it turns out that our implementation is correct and robust we can discuss
about putting it into the OO product. |
This post is from two years ago but it was the only one I could find on iManage integration. Is there any new info on whether OpenOffice inclues ODMA support? |
|
| Back to top |
|
 |
adam_j_bradley Newbie

Joined: 16 Apr 2006 Posts: 4
|
Posted: Sun Apr 16, 2006 7:52 am Post subject: ODMA - ucpodma1.dll built! |
|
|
I've been following this thread for some time so I thought I'd put my mind to building the ODMA module under OO2.
Success!
Where to from here? I've followed the advice on this thread and of the http://ucb.openoffice.org/docs/ucp-ref/odma-ucp.html thread but get errors when attempting to run the Basic Script.
I rudely changed the line from
aProviderData.insertByName( "Provider" + (UBOUND(xx) - LBOUND(xx) + 2), aContentProviderData )
to
aProviderData.insertByName( "Provider" + (UBOUND(xx) - LBOUND(xx) + 3), aContentProviderData )
and managed to get the ODMA provider registered
Help! Thanks!
Adam |
|
| Back to top |
|
 |
adam_j_bradley Newbie

Joined: 16 Apr 2006 Posts: 4
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|