Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

 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

0 votes



One answer

Permanent link

 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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,940

Question asked: Sep 06 '17, 2:26 a.m.

Question was seen: 1,768 times

Last updated: Sep 11 '17, 12:26 a.m.

Confirmation Cancel Confirm