How to create a SVN revision link in workitem using plain Ja
Hi,
I tried to create a SVN revision link in workItem by using plain Java SDK.
I know that there is SVN bridge integration feature in RTC. however I'd like to do the same thing by using plain Java SDK.
In the code, what link type should be used for SVN revision type?
I checked the workitem which has a link to SVN revision via RESTClient, and then I found "com.ibm.team.scm.svn.linkType.workItem.s" link type in the XML body of the workItem.
however, I couldn't find it in the WorkItemLinkTypes.
my questions are:
1. what LinkType should I use for SVN revision? (com.ibm.team.scm.svn.linkType.workItem.s)
2. could you provide sample spinet codes?
Thank you
I tried to create a SVN revision link in workItem by using plain Java SDK.
I know that there is SVN bridge integration feature in RTC. however I'd like to do the same thing by using plain Java SDK.
In the code, what link type should be used for SVN revision type?
I checked the workitem which has a link to SVN revision via RESTClient, and then I found "com.ibm.team.scm.svn.linkType.workItem.s" link type in the XML body of the workItem.
however, I couldn't find it in the WorkItemLinkTypes.
my questions are:
1. what LinkType should I use for SVN revision? (com.ibm.team.scm.svn.linkType.workItem.s)
2. could you provide sample spinet codes?
Thank you
5 answers
Hi,
I tried to create a SVN revision link in workItem by using plain Java SDK.
I know that there is SVN bridge integration feature in RTC. however I'd like to do the same thing by using plain Java SDK.
In the code, what link type should be used for SVN revision type?
I checked the workitem which has a link to SVN revision via RESTClient, and then I found "com.ibm.team.scm.svn.linkType.workItem.s" link type in the XML body of the workItem.
however, I couldn't find it in the WorkItemLinkTypes.
my questions are:
1. what LinkType should I use for SVN revision? (com.ibm.team.scm.svn.linkType.workItem.s)
2. could you provide sample spinet codes?
Thank you
I think that we can add the references by using the following code.
but, I'm not sure what kind of link type should be specified for SVN revision type. so, could you pls let me know the linkType value (class).
WorkItemCopy.GetReferences().add(WorkItemEndPoints.xxxx, reference)
Thank you so much
Hi,
I tried to create a SVN revision link in workItem by using plain Java SDK.
I know that there is SVN bridge integration feature in RTC. however I'd like to do the same thing by using plain Java SDK.
In the code, what link type should be used for SVN revision type?
I checked the workitem which has a link to SVN revision via RESTClient, and then I found "com.ibm.team.scm.svn.linkType.workItem.s" link type in the XML body of the workItem.
however, I couldn't find it in the WorkItemLinkTypes.
my questions are:
1. what LinkType should I use for SVN revision? (com.ibm.team.scm.svn.linkType.workItem.s)
2. could you provide sample spinet codes?
Thank you
Hi
You can use the RTC Eclipse thick client to create link filters. The user interface displays the full list of filters. Clicking on an item adds it to the filter list. You can use the Web UI to view the filters.
From the Web UI the form of the links is
The link filter from SVN links is
com.ibm.team.scm.svn.linkType.workItem
You can use the RTC Eclipse thick client to create link filters. The user interface displays the full list of filters. Clicking on an item adds it to the filter list. You can use the Web UI to view the filters.
From the Web UI the form of the links is
The link filter from SVN links is
com.ibm.team.scm.svn.linkType.workItem
Hi
You can use the RTC Eclipse thick client to create link filters. The user interface displays the full list of filters. Clicking on an item adds it to the filter list. You can use the Web UI to view the filters.
From the Web UI the form of the links is
The link filter from SVN links is
com.ibm.team.scm.svn.linkType.workItem
Hi, Thank you for the reply.
but I'd like to create a link using Plain Java SDK (API) program.
Which class(package) should I used for svn link?
and if possible, could you please provide a sample code?
Thank you
ILinkType SVNELinkType = ILinkTypeRegistry.INSTANCE.getLinkType("com.ibm.team.scm.svn.linkType.workItem");
IReference targetEndpoint;
try {
targetEndpoint = IReferenceFactory.INSTANCE.createReferenceFromURI(new URI(currentConfigDownloadUrl), "<<"+current_componentName+">>--基线版本:"+current_baselineName);
IReferenceFactory refFactory = IReferenceFactory.INSTANCE;
IReference target = refFactory.createReferenceToItem(newWorkItem);
// get the link service to have access to the ILinkServiceLibrary
ILinkService linkService = getService(ILinkService.class);
// get the ILinkServiceLibary
ILinkServiceLibrary linkServiceLibrary = (ILinkServiceLibrary) linkService
.getServiceLibrary(ILinkServiceLibrary.class);
// Create the link
ILink link = linkServiceLibrary.createLink(
SVNELinkType , targetEndpoint, target);
// Save the link
linkServiceLibrary.saveLink(link);