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

How to programmatically construct the absolute URI for an object like snapshot?

Team,
this is a self-answered question.

Problem: Needing to construct a Related Artifact link to the absolute URI of a snapshot.
Given are:
IBaselineSet snapshot
ITeamRepository teamRepository

Needed:
URI snapshotUri

0 votes



One answer

Permanent link
This code snipped will solve the above scenario:

import com.ibm.team.repository.common.Location;

Location location = Location.itemLocation(snapshot, teamRepository.getRepositoryURI());                                         
URI snapURI = location.toAbsoluteUri();

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

Question asked: Jul 11 '14, 4:49 p.m.

Question was seen: 4,884 times

Last updated: Jul 11 '14, 4:52 p.m.

Confirmation Cancel Confirm