How to get ProviderFactory on client ?
![]()
Team,
<self-answered question> Suppose you want to get ChangeSetLinks programmatically on a client. You found ChangeSetLinks.findLinks(providerFactory, changeSetHandle, linkTypeIds, monitor) You have a changeSetHandle, get the linkTypeIds by: new String[] { ILinkConstants.CHANGESET_WORKITEM_LINKTYPE_ID } (as seen in Ralph Schoons Blog) But how to obtain a providerFactory on the client? |
One answer
![]()
Arne Bister (2.6k●1●28●32)
| answered Mar 22 '14, 3:56 a.m.
JAZZ DEVELOPER edited Mar 22 '14, 3:58 a.m.
The providerFactory can be obtained by:
(ProviderFactory) teamRepository.getClientLibrary(ProviderFactory.class) Thus, List<ILink> links ChangeSetLinks .findLinks( (ProviderFactory) teamRepository.getClientLibrary(ProviderFactory.class), changeSetHandle, new String[] { ILinkConstants.CHANGESET_WORKITEM_LINKTYPE_ID }, monitor); will get you all work item links from a change set handle. Comments very cool. thanks Arne!
Sam, I have not dabbled with link creation too much yet, but once I do and I find an easy way, I will share.
|