It's all about the answers!

Ask a question

How to fetch baseline name from Component Handle from server extensions


Sudipto Sarkar (631443) | asked Aug 03 '15, 8:19 a.m.
edited Aug 03 '15, 9:16 a.m. by Ralph Schoon (63.7k33648)
Hello,
I am having component handle, based on the component handle or component name, i need to fetch list of baseline.
Please let me know how to do it from server side extensions

Regards,
Sudipto

2 answers



permanent link
sam detweiler (12.5k6195201) | answered Aug 03 '15, 9:05 a.m.
like on client side SCMPlatform, you will need to use the SCMService class on the server

find that in the sdk.  there is no doc for server side classes.

permanent link
Sudipto Sarkar (631443) | answered Aug 03 '15, 9:27 a.m.

Hello Sam,

Till this much we got.

Able to get component name and component handle.

Please let me know how to get baseline for a changeset/component

IChangeSetHandle changeSetHandle = (IChangeSetHandle) link.getSourceRef().resolve();

      IChangeSet changeSet =

          (IChangeSet) repositoryItemService.fetchItem(changeSetHandle, IRepositoryItemService.COMPLETE);

 

 

      // Get the Component-Name(s) for respective Change-Set(s)

      IComponentHandle componentHandle = changeSet.getComponent();

 

      IComponent componentRepoService =

          (IComponent) repositoryItemService.fetchItem(componentHandle, IRepositoryItemService.COMPLETE);

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.