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

How do I get the build work space

Using SDK, I am trying to read the build work space corresponding to a build definition. 

From Build definition using the property "team.scm.workspaceUUID" I am able to get the work space UUID using the following code

   ITeamBuildClient buildClient = (ITeamBuildClient) this.teamRepository.getClientLibrary( ITeamBuildClient.class );
   IBuildDefinition buildDef = buildClient.getBuildDefinition( "ADM Metrics Build", this.progressMonitor );
  String workSpaceUUID = buildDef.getProperty( "team.scm.workspaceUUID" ).getValue();

Now I need to find the workspace object (IWorkspaceHandle).

Any idea how do I get the workspace handle from work space UUID.  

0 votes



One answer

Permanent link
Handles can be created by calling the ITEM_TYPE on the type.

For IWorkspaceHandle, you call the IWorkspace.ITEM_TYPE to create the item handle:
IWorkspace.ITEM_TYPE.createItemHandle(itemId, optionalStateId)
Fill in the workspace UUID for the item ID and you can use null for the state ID.

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 25 '13, 3:17 a.m.

Question was seen: 4,636 times

Last updated: Jul 25 '13, 10:48 a.m.

Confirmation Cancel Confirm