It's all about the answers!

Ask a question

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?

Megha Nair (116) | asked Mar 01 '18, 4:02 a.m.

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
        IItemReference workItemRef = IReferenceFactory.INSTANCE
        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
            IChangeSet changeSet = (IChangeSet) repositoryItemService
                    .fetchItem(changeSetHandle, IRepositoryItemService.COMPLETE);
        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

permanent link
Ralph Schoon (63.3k33646) | answered Mar 01 '18, 4:50 a.m.
edited Mar 01 '18, 5:00 a.m.

You might want to start here

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. 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 and related past would likely be most valuable.

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.