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

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?

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?
        

0 votes



One answer

Permanent link

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.

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,954

Question asked: Mar 01 '18, 4:02 a.m.

Question was seen: 2,823 times

Last updated: Mar 01 '18, 5:00 a.m.

Confirmation Cancel Confirm