How to read rtc work item's resource's attributes using lyo for java?
Hi,
|
Accepted answer
Eclipse/Lyo, maven project oslc-java-samples (folder org.eclipse.lyo.client.java.sample) in The org.eclipse.lyo.client repo has a number of sample java client applications including RTCFormSample.java. Note that the simple resource classes in org.eclipse.lyo.client.oslc.resources may not have the extended Jazz properties. You can however use the Toolchain Modeler and Code Generator to generate a web application that supports extended properties on domain classes. Ralph Schoon selected this answer as the correct answer
|
4 other answers
Hello,
If anyone has better shapes for the RTC resources, we would be happy to review pull requests: https://github.com/eclipse/lyo.client/pulls
Cheers,
Andrew
(Eclipse Lyo project lead)
|
If you're using Lyo, you are coding Java. If you're coding Java, you should use the Team Concert client API. Lyo is a great API for accessing DOORs data, not for Team Concert.
Ralph Schoon has an excellent site that details how to get started with the API.
What API’s are Available for RTC and What Can You Extend?Comments Lyo is for OSLC, so you sould be able to run it against RTC and I know others do.
|
It has been a long time since I last tested with Lyo. IIRC, you need to extend quite a few classes for this to happen. If you use the sample code, you will see that when you first parse the RDF/XML response to a Java class, many attributes are lost since they are defined in the class. If you try to retrieve such attributes after that, you will get null value.
|
The Java classes in eclipse/Lyo Java client that represent OSLC domain resources are intentionally simple and reflect what was defined in the OSLC 2.0 domain specifications.
RTC (now EWM) provides a set of extensions to OSLC Change Management resources, and allows customers to further define their own data extensions.
So there are no fixed ResourceShapes that specify a fixed structure for EWM change requests. Rather you should discover the shapes based on accessing the instanceShape property of any given work item to dynamically calculate its properties.
|
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.