access to dataset definitions, language definitions, ... through java API based on UUID
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:
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
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
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.
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