It's all about the answers!

Ask a question

How to set multi-values for an enumeration list in a RTC defect using OSLC?


Sujith Babu Bandla (265) | asked Sep 06 '17, 2:26 a.m.

 Hi,


Please help me on setting multi-values for an enumeration list in a RTC defect using OSLC Java code.

Thanks in advance!

Thanks,
Sujith Babu

One answer



permanent link
Sujith Babu Bandla (265) | answered Sep 11 '17, 12:26 a.m.

 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

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.