Package com.sodius.oslc.app.dng.requests
Class InsertRequirement
- java.lang.Object
-
- com.sodius.oslc.client.requests.AbstractResourceRequest<ResourceResponse<Void>>
-
- com.sodius.oslc.app.dng.requests.InsertRequirement
-
- All Implemented Interfaces:
ResourceRequest<ResourceResponse<Void>>
,Callable<ResourceResponse<Void>>
public class InsertRequirement extends AbstractResourceRequest<ResourceResponse<Void>>
A request to insert an existing base requirement into a module, at a specific location within its hierarchy.The requirement to insert must not already be part of the module. If the requirement is already part of the module, use the
SetRequirementChildren
class to move it somewhere else within the module hierarchy.This request aims at inserting an existing base requirement at a specific location in the module. The
CreateRequirement
class can be used to create a new requirement.Below is a sample code to insert a requirement at the root of a module:
Module module = new GetModule(client, moduleUri).get(); InsertLocation location = InsertLocation.root(module).build(); new InsertRequirement(client, requirementUri, location).call();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InsertRequirement.InsertLocation
Describes the location at which a requirement is to insert within a module hierarchy.
-
Constructor Summary
Constructors Constructor Description InsertRequirement(OslcClient client, URI requirement, InsertRequirement.InsertLocation location)
Creates a request to insert an existing requirement into a module, at a specific location within its hierarchy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClientResponse
call(OslcResource resource)
protected ResourceResponse<Void>
createResponse(OslcResource resource, ClientResponse response)
-
Methods inherited from class com.sodius.oslc.client.requests.AbstractResourceRequest
call, createErrorResponse, createResourceResponse, getClient, getUri
-
-
-
-
Constructor Detail
-
InsertRequirement
public InsertRequirement(OslcClient client, URI requirement, InsertRequirement.InsertLocation location)
Creates a request to insert an existing requirement into a module, at a specific location within its hierarchy.The URI of the created module can then be obtained through the "Location" header provided in the request response.
- Parameters:
client
- the OSLC client to connect to the application.requirement
- the URI of an existing DOORS Next requirement. A oslc_config.context parameter can be added to this URI for using a specific configuration.location
- the location at which the requirement is to insert- See Also:
InsertRequirement.InsertLocation.root(Module)
,InsertRequirement.InsertLocation.below(URI)
-
-
Method Detail
-
call
protected ClientResponse call(OslcResource resource)
- Specified by:
call
in classAbstractResourceRequest<ResourceResponse<Void>>
-
createResponse
protected ResourceResponse<Void> createResponse(OslcResource resource, ClientResponse response)
- Specified by:
createResponse
in classAbstractResourceRequest<ResourceResponse<Void>>
-
-