It's all about the answers!

Ask a question

How to set custom attribute values of artifact using Eclipse lyo : OSLC + JAVA


Shriram Punde (111) | asked Dec 04 '21, 7:28 a.m.
Hello,

I have defined structure in DNG server.  Now  I am trying to add artifact in that structure.
I am able to add artifact with system artifacts (name, description, etc.)

My question is how to set custom attributes ?

I have tried by setting extendedProperties and updating the same (using correct urls of attribute types). but no luck .

Please suggest how we can add custom attributes in artifact by using eclipse lyo.

Comments
David Honey commented Dec 06 '21, 4:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Have you been able to do so using a web browser plugin like Postman/RESTED etc?
I'd try that first to make sure your HTTP PUT request is correct.

One answer



permanent link
S C (133) | answered Dec 07 '21, 4:55 a.m.

You should be able to do it by updating the extended properties. 

It was helpful for me. Keep in mind to:
  1. Make sure that the right QName is set i.e. the namespace URI, local part and prefix. You can verify this from the rdf+xml response that we get by fetch the resource/artifact or by checking in the Component properties in DNG in the browser.
  2. Next step would be to add this <QName, Object> pair to the extended properties and UPDATE the resource.

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.