Class UpdateBuilder<T extends ResourceNode>
- java.lang.Object
-
- de.captaingoldfish.scim.sdk.client.builder.RequestBuilder<T>
-
- de.captaingoldfish.scim.sdk.client.builder.ETagRequestBuilder<T>
-
- de.captaingoldfish.scim.sdk.client.builder.UpdateBuilder<T>
-
public class UpdateBuilder<T extends ResourceNode> extends ETagRequestBuilder<T>
author Pascal Knueppel
created at: 16.12.2019 - 12:04
-
-
Constructor Summary
Constructors Constructor Description UpdateBuilder(String fullUrl, Class<T> responseEntityType, ScimHttpClient scimHttpClient)if the resource should be retrieved by using the fully qualified urlUpdateBuilder(String baseUrl, String endpoint, String resourceId, Class<T> responseEntityType, ScimHttpClient scimHttpClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.http.client.methods.HttpUriRequestgetHttpUriRequest()builds the request for the serverprotected booleanisExpectedResponseCode(int httpStatus)tells this abstract class if the http status from the server is the expected success statusUpdateBuilder<T>setETagForIfMatch(ETag version)uses the given version with a If-Match header in the requestUpdateBuilder<T>setETagForIfMatch(String version)uses the given version with a If-Match header in the requestUpdateBuilder<T>setETagForIfNoneMatch(ETag version)uses the given version with a If-Match header in the requestUpdateBuilder<T>setETagForIfNoneMatch(String version)uses the given version with a If-Match header in the requestUpdateBuilder<T>setResource(com.fasterxml.jackson.databind.JsonNode resource)UpdateBuilder<T>setResource(String resource)-
Methods inherited from class de.captaingoldfish.scim.sdk.client.builder.ETagRequestBuilder
getVersion, isUseIfMatch, isUseIfNoneMatch
-
Methods inherited from class de.captaingoldfish.scim.sdk.client.builder.RequestBuilder
addHeaderToRequest, getBaseUrl, getEndpoint, getResource, getResponseEntityType, getScimHttpClient, isResponseParseable, sendRequest, sendRequest, sendRequestWithMultiHeaders, toResponse
-
-
-
-
Constructor Detail
-
UpdateBuilder
public UpdateBuilder(String fullUrl, Class<T> responseEntityType, ScimHttpClient scimHttpClient)
if the resource should be retrieved by using the fully qualified url- Parameters:
fullUrl- the fully qualified url to the required resourceresponseEntityType- the type of the resource that should be returnedscimHttpClient- the http client instance
-
-
Method Detail
-
setResource
public UpdateBuilder<T> setResource(String resource)
- Overrides:
setResourcein classRequestBuilder<T extends ResourceNode>- Parameters:
resource- sets the resource that should be sent to the service provider
-
setResource
public UpdateBuilder<T> setResource(com.fasterxml.jackson.databind.JsonNode resource)
- Overrides:
setResourcein classRequestBuilder<T extends ResourceNode>- Parameters:
resource- sets the resource that should be sent to the service provider
-
setETagForIfMatch
public UpdateBuilder<T> setETagForIfMatch(String version)
uses the given version with a If-Match header in the request- Overrides:
setETagForIfMatchin classETagRequestBuilder<T extends ResourceNode>- Parameters:
version- the version to use in the request- Returns:
- this builder object
-
setETagForIfNoneMatch
public UpdateBuilder<T> setETagForIfNoneMatch(String version)
uses the given version with a If-Match header in the request- Overrides:
setETagForIfNoneMatchin classETagRequestBuilder<T extends ResourceNode>- Parameters:
version- the version to use in the request- Returns:
- this builder object
-
setETagForIfMatch
public UpdateBuilder<T> setETagForIfMatch(ETag version)
uses the given version with a If-Match header in the request- Overrides:
setETagForIfMatchin classETagRequestBuilder<T extends ResourceNode>- Parameters:
version- the version to use in the request- Returns:
- this builder object
-
setETagForIfNoneMatch
public UpdateBuilder<T> setETagForIfNoneMatch(ETag version)
uses the given version with a If-Match header in the request- Overrides:
setETagForIfNoneMatchin classETagRequestBuilder<T extends ResourceNode>- Parameters:
version- the version to use in the request- Returns:
- this builder object
-
isExpectedResponseCode
protected boolean isExpectedResponseCode(int httpStatus)
tells this abstract class if the http status from the server is the expected success status- Specified by:
isExpectedResponseCodein classRequestBuilder<T extends ResourceNode>- Parameters:
httpStatus- the http status from the server- Returns:
- true if the response status shows success
-
getHttpUriRequest
protected org.apache.http.client.methods.HttpUriRequest getHttpUriRequest()
Description copied from class:RequestBuilderbuilds the request for the server- Specified by:
getHttpUriRequestin classRequestBuilder<T extends ResourceNode>
-
-