It's all about the answers!

Ask a question

Get desired Module and add artifacts in it using OSCL + JAVA


Shriram Punde (11) | asked Dec 03 '21, 12:48 a.m.

 I am new at OSLC + JAVA framework. Currently I am trying to add some artifacts in particular module. 

So I need to fetch that module and add new artifact in it. 

As a part of POC currently I am able to add base  artifact in some folder by setting that folder path as parent.

Is there any resource available to add artifact in particular module ? 

It will be really helpful if we get some sample code.

One answer



permanent link
Ian Barnard (1.9k613) | answered Dec 03 '21, 3:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Dec 03 '21, 3:57 a.m.

Hi


I can't help you with the Java, but in outline to add an artifact to a module you first create the core artifact if it doesn't already exist, then using the module API to GET the existing structure and add a reference to the artifact into the structure and update the structure using PUT.

The module API is documented here: https://jazz.net/wiki/bin/view/Main/DNGModuleAPI and on pages linked from there.

AFAICT the module structure API is a bit pernickety about headers on the GET/PUT and how configuration is provided:
  • Don't construct the structure URL, get it from the module definition by doing a GET on the module URL using the following settings:
  • Provide header (capitalised exactly like this)
    • DoorsRP-Request-Type: public 2.0
  • Do NOT provide header OSLC-Core-Version
  • Provide the configuration using header vvc.configuration and NOT using header Configuration-Context or query ?oslc_config.context - so it must be a local configuration URL not a global configuration

HTH
Ian

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.