It's all about the answers!

Ask a question

access to dataset definitions, language definitions, ... through java API based on UUID


Bernd van Oostrum (21725371) | asked Jul 31 '13, 9:28 a.m.
edited Jul 31 '13, 9:30 a.m.
Hi,

How can I, based on  the UUID, get access to its object when the object is for instance a dataset definition?
Here is what I have so far and what seems to work for everything except for the artifacts created in enterprise extensions:

IItemHandle handle = IComponent.ITEM_TYPE.createItemHandle(UUID.valueOf(uuid), null);
IItem item;
try {
    item = repo.itemManager().fetchCompleteItem(handle, IItemManager.DEFAULT, monitor);
   IItemType type = item.getItemType();
    System.out.println("Simple type name: " + type.getName());
    System.out.println("Type's namespace: " + type.getNamespaceURI());
} catch (TeamRepositoryException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}


One answer



permanent link
Hung Lam (2911915) | answered Aug 01 '13, 10:01 a.m.
JAZZ DEVELOPER
 Hi Bernd van Oostrum,
You haven't told me the RTC version that you are using, so I assume it's 4.0 or latest.  Looking at your current code, it looks like you are doing this from client side using ITeamRepository.  Here is an example code to retrieve dataset definition using client side methods.  Note: this is not documented method, so it is subject to change. 

ISystemDefinitionClient systemDefinitionClient = (ISystemDefinitionClient) repo.getClientLibrary(ISystemDefinitionClient.class);

IResourceDefinition dsd = systemDefinitionClient.getResourceDefinition(dsdUuid, monitor);


Hope that helps. 


Comments
Bernd van Oostrum commented Aug 01 '13, 11:43 a.m.

Thanks hungvlam.
I'm using 4.0.3

Do I need some additional jars from somewhere? I'm currently using the plain java client libraries...

Regards,
Bernd.


Kevin Doyle commented Aug 02 '13, 9:28 a.m.
JAZZ DEVELOPER

Hi Bernd,

The Enterprise Extensions capabilities are not part of the java client libraries or the RTC SDK.  This is why Hung was mentioning using the API is unsupported.  You would have to pickup various plug-ins from an RTC Eclipse Client install to add to your plain java client libraries.

Regards,
Kevin

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.