It's all about the answers!

Ask a question

Creating External Repository Connection programmatically


Atul Kumar (1872329) | asked May 22 '12, 7:13 a.m.
Hi,

I want to create external repository connections programmatically. I am able to fetch all the connections and iterate through their properties to validate them, but the com.ibm.team.interop.common.service.IInteropService and IExternalRepositoryConnection APIs don't allow me to create a new connection.

Should I try debugging the "Create External Repository Connection" wizard to find the API calls for creating external repository connections ?

Thanks,
Atul

Accepted answer


permanent link
John Vasta (2.6k15) | answered May 23 '12, 1:13 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
You don't say whether your code is running in the server, or in a client, so you can use either IInteropService.saveExternalRepositoryConnection() (if running in the server) or IItemConnectorAdminClient.saveExternalRepositoryConnection() (if running in a client). The first few lines of javadoc for each method are


* Save a new or updated external repository connection. The incoming object
* must be either a new item or a working copy of an existing item.


This is the standard pattern for creating new items - first you would create an in-memory item using

IExternalRepositoryConnection.ITEM_TYPE.createItem()


Then set the attributes on the item the way you want, and save it.

Hi,

I want to create external repository connections programmatically. I am able to fetch all the connections and iterate through their properties to validate them, but the com.ibm.team.interop.common.service.IInteropService and IExternalRepositoryConnection APIs don't allow me to create a new connection.

Should I try debugging the "Create External Repository Connection" wizard to find the API calls for creating external repository connections ?

Thanks,
Atul
Atul Kumar selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.