It's all about the answers!

Ask a question

DNG 6.0 : Updating Collection, Requirements link and serching Artifacts(Requirements/collection) by Name using OSLC..


0
1
Naveen Tyagi (19769152) | asked Sep 30 '15, 11:57 p.m.
As of now i am able to perform following operations in DNG using OSLC:

1. Get all requirements from DNG project.
2. Create folder in Root folder.
3. List of all the folders in DNG project.
4. Creating requirements and linking of other requirements with that.
5. Get requirements from a folder.
6. Get requirements from a collection

Here are other queries :
a) is it possible to create new Collection and add requirements in that using OSLC. but at the time of creating collection i need to check if there is already a collection with same Name then i need to retrieve that collection instead of creating new.

b) Same as collection i need to check if there is already a requirements with the same name then i need to retrieve  that requirement and allow user to make changes in the requirements linked with that(Add or remove more requirements). and then Update the same requirement in DNG. I am able to retrieve requirement (of couse not by name but all in folder/project). how can i  get (satisfiedBy) links associated. After adding/requirement, how can i updated requirement back to that DNG.

I am using OSLC, Java. Thanking in Advance.

Accepted answer


permanent link
Donald Nong (14.5k414) | answered Oct 01 '15, 3:22 a.m.
All you need to know is in the below article, which I believe you have been reading.
https://jazz.net/library/article/1197

To search artifacts with a particular name, simply use the query capability URL with the condition oslc.where=dc:title="some name". Note that the result may contain both requirements and requirement collections, so you need to separate them.

To create requirements or requirement collections, use the creationFactory URL (POST).

To add/remove requirements in a collection, modify the collection (PUT) with the desired  <oslc_rm:uses> properties. Other links are added/removed in the same fashion.
Naveen Tyagi selected this answer as the correct answer

Comments
Naveen Tyagi commented Oct 01 '15, 3:57 a.m.

Thanks Donald, One more question. how can i create requirement in a folder if i have folder URI. I can create Requirement but that is getting created in root folder but i want it to be created in specific folder.


1
Donald Nong commented Oct 01 '15, 8:52 p.m.

Have you tried to add the <nav:parent> tag (point to the desired folder) in the payload during the requirement creation?


Naveen Tyagi commented Oct 05 '15, 1:16 a.m.

Yes, I have tried but i was passing parent folder url as String whereas it must be URI object. Thanks!!!
 requirement.getExtendedProperties().put(RmConstants.PROPERTY_PARENT_FOLDER , new URI(parentFolderURI));

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.