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

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

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.

1

0 votes


Accepted answer

Permanent link
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

0 votes

Comments

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.

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

1 vote

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

Question asked: Sep 30 '15, 11:57 p.m.

Question was seen: 3,096 times

Last updated: Oct 05 '15, 1:16 a.m.

Confirmation Cancel Confirm