while creating a requirement in DOORS NG through lyo client project,how to set the value of ArtifactFormat
how do i set the value of attribute ArtifactFormat while creating requirement in lyo client project.
|
Accepted answer
Hello
The DNG OSLC implementation only supports artefacts whose format is "Text", "Collection" and "Module". Other formats would require a standardization of their representation at OSLC - currently there are no plans to reach such standardization at OSLC. I suggest you raise an enhancement request on the DNG product. cheers -ian Amit Kumar selected this answer as the correct answer
Comments
Amit Kumar
commented Apr 01 '16, 7:50 a.m.
Hi Ian,
I tried creating Requirement collection with artifactformat value as "Module".But by default the value get set to "Collection".
Is there any way I can create Module Artifact through OSLC lyo Java client
Hi Amit
|
2 other answers
Have you checked the sample code, namely org.eclipse.lyo.client/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/RRCFormSample.java? The related code is shown below.
//Get Feature Requirement Type URL ResourceShape featureInstanceShape = RmUtil.lookupRequirementsInstanceShapes( serviceProviderUrl, OSLCConstants.OSLC_RM_V2, OSLCConstants.RM_REQUIREMENT_TYPE, client, "Feature"); ...... if (( featureInstanceShape != null ) && (requirementFactory != null ) ){ // Create REQ01 requirement = new Requirement(); requirement.setInstanceShape(featureInstanceShape.getAbout()); requirement.setTitle("Req01"); Comments
Amit Kumar
commented Mar 11 '16, 5:49 a.m.
Hi Nong, thanks for your prompt response.
Above method only guarantee that requirement "Artifact Type" value is set correctly.
What i am interested is in how to set value of " Artifact Format".
By default sample code set the value of "" Artifact Format" to "Text".
I tried putting following code but no luck.
URI formatURI=URI.create("https://server:port/rm/types/_s8WhgWynEeWNWa-3-YEVeg#Storyboard");
requirement.getExtendedProperties().put(RMConstant.PROPERTY_ARTIFACT_FORMAT,formatURI);
but this value not getting persisted.
Oh sorry, must have misread what was required. When using OSLC, I think you can only use the "TEXT" Artifact Format, no? "Storyboard" (and other similar types) artifacts are graphical artifacts, and you can only create a placeholder at best. Or is this exactly what you are trying to do?
Amit Kumar
commented Mar 15 '16, 12:56 a.m.
Hi Nong ,
We do have use case to create requirement with correct value of Artifact Format through lyo java client.Is this the limitation with OSLC ?. if so then do we have any other rest API available which will help me to populate artifact format value other then default.
|
Hi, Adding existing artifact from one module to another. Have you achieved this by any chance. Please let me know.
|
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.