RTC 6, OSLC, how to create WI with enumerations using getExtendedProperties().put(new QName..
Hello,
I'm developing a java client for create WI using OSLC and lyo and I'm passing the values through getExtendedProperties().put(new QName, but for the case that I need to specify values of attributes that are part of enumeration, it doesn't work, so I would like to know the use of getExtendedProperties().put(new QName for enumerations and literals or values of this types of attributes?
One answer
Hi Rafael,
Please try to implement similarly,so that you can fill the enumeration attribute.
//Look at the allowed values for Priority. This is generally a required field for defects.
Property PriorityProperty = shape.getProperty(new URI("http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/"+"vehicle_build_phase_new"));
if(null !=PriorityProperty) {
URI allowedValuesRef2=PriorityProperty.getAllowedValuesRef();
ClientResponse allowedValuesResponse2= client.getResource(allowedValuesRef2.toString(),OslcMediaType.APPLICATION_XML);
AllowedValues allowedValues2 = allowedValuesResponse2.getEntity(AllowedValues.class);
Object[] values2 = allowedValues2.getValues().toArray();
defect1.getExtendedProperties().put(new QName("http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/","vehicle_build_phase_new", "rtc_ext"), (URI) values2[1]);
}
Thanks,
Sujith Babu