It's all about the answers!

Ask a question

How to fetch baseline name from Component Handle from server extensions


Sudipto Sarkar (63536) | asked Aug 03 '15, 8:19 a.m.
edited Aug 03 '15, 9:16 a.m. by Ralph Schoon (59.7k23643)
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.5k6184201) | 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 (63536) | 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.