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

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?

0 votes



One answer

Permanent link

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

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,943

Question asked: Oct 10 '16, 7:11 p.m.

Question was seen: 1,705 times

Last updated: Sep 04 '17, 9:09 a.m.

Confirmation Cancel Confirm