What are the server side java API's for accessing RTC server and what are the specific classes for "IRepositoryItemService", "ILinkServiceLibrary" , " getService()" method in the below piece of code?
![](http://jazz.net/_images/myphoto/a2a3d0ae0a9c8ec40a6456375e05648b.jpg)
Iam trying to retreive the changesets associated with a workitem.This is my code.
public class get_changesets {
private List<IChangeSet> getChangeSets(IWorkItem wi)
throws TeamRepositoryException {
IRepositoryItemService repositoryItemService = getService(IRepositoryItemService.class);
ILinkService linkService = getService(ILinkService.class);
ILinkServiceLibrary linkLibrary = (ILinkServiceLibrary) linkService
.getServiceLibrary(ILinkService.class);
IItemReference workItemRef = IReferenceFactory.INSTANCE
.createReferenceToItem(wi);
ILinkQueryPage linkPage = linkLibrary.findLinks(
WorkItemLinkTypes.CHANGE_SET, workItemRef);
List<IChangeSet> changeSets = new ArrayList<IChangeSet>();
for (ILink link : linkPage.getAllLinksFromHereOn()) {
// Change set links should be item references
IChangeSetHandle changeSetHandle = (IChangeSetHandle) link
.getSourceRef().resolve();
IChangeSet changeSet = (IChangeSet) repositoryItemService
.fetchItem(changeSetHandle, IRepositoryItemService.COMPLETE);
changeSets.add(changeSet);
}
return changeSets;
}
}
what are the server side classes for "IRepositoryItemService", "ILinkServiceLibrary" , " getService()" method?
How do I access the server side API's of RTC server?
One answer
![](http://jazz.net/_images/myphoto/a2a3d0ae0a9c8ec40a6456375e05648b.jpg)
You might want to start here
https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/
And run the Extensions Workshop which actually shows how to get the services and also allows to search for source code once the SDK has been set up. You can then answer your own question.
https://rsjazz.wordpress.com/ has various easy to search for client and server API questions as well. I am pretty sure there are examples for most of the main server API services. In the area you are asking https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ and related past would likely be most valuable.