How to set multi-values for an enumeration list in a RTC defect using OSLC?
One answer
Hi All,
Kindly request someone to help me on setting the values for enumeration attribute in RTC defect form.
I'm trying to use the below code from Java REST API.Please guide me.
Property Variant_ID_Property = shape.getProperty(new URI("http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/"+"vehicle_type"));
if(Variant_ID_Property != null) {
URI allowedValuesRef3=Variant_ID_Property.getAllowedValuesRef();
ClientResponse allowedValuesResponse3= client.getResource(allowedValuesRef3.toString(),OslcMediaType.APPLICATION_XML);
AllowedValues allowedValues3 = allowedValuesResponse3.getEntity(AllowedValues.class);
Object[] values3 = allowedValues3.getValues().toArray();
defect1.getExtendedProperties().put(new QName(RTC_NAMESPACE,"vehicle_type", "rtc_ext"), (URI) values3[1]);
}
Thanks,
Sujith Babu