Package com.sodius.oslc.app.dng.requests
Class CreateWrapperResource
- java.lang.Object
-
- com.sodius.oslc.client.requests.AbstractResourceRequest<ResourceResponse<Void>>
-
- com.sodius.oslc.app.dng.requests.CreateWrapperResource
-
- All Implemented Interfaces:
ResourceRequest<ResourceResponse<Void>>
,Callable<ResourceResponse<Void>>
public class CreateWrapperResource extends AbstractResourceRequest<ResourceResponse<Void>>
A request to create a wrapper resource and the wrapped resource associated. A wrapper resource is a requirement which type is WrapperResource and can contain a wrapped resource such as a file.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description CreateWrapperResource(OslcClient client, URI creationFactory, DngRequirement requirement, File file)
Creates a request to create a wrapper resource.
-
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
-
CreateWrapperResource
public CreateWrapperResource(OslcClient client, URI creationFactory, DngRequirement requirement, File file)
Creates a request to create a wrapper resource. The URI of the created requirement can then be obtained through the "Location" header provided in the request response.- Parameters:
client
- the OSLC client to connect to the application.creationFactory
- the URI of the creation factory, allowing the requirement creation. A oslc_config.context parameter can be added to this URI for using a specific configuration.requirement
- the wrapper resource requirement to create.file
- the file to create.
-
-
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>>
-
-