Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Creating External Repository Connection programmatically

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

0 votes


Accepted answer

Permanent link
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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939

Question asked: May 22 '12, 7:13 a.m.

Question was seen: 5,091 times

Last updated: May 22 '12, 7:13 a.m.

Confirmation Cancel Confirm