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 |
Accepted answer
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
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, Atul Kumar selected this answer as the correct answer
|
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.