Class CreateBuilder<T extends ResourceNode>
java.lang.Object
de.captaingoldfish.scim.sdk.client.builder.RequestBuilder<T>
de.captaingoldfish.scim.sdk.client.builder.CreateBuilder<T>
author Pascal Knueppel
created at: 07.12.2019 - 23:13
created at: 07.12.2019 - 23:13
-
Constructor Summary
ConstructorsConstructorDescriptionCreateBuilder(String fullUrl, Class<T> responseEntityType, ScimHttpClient scimHttpClient) if the resource should be retrieved by using the fully qualified urlCreateBuilder(String baseUrl, String endpoint, Class<T> responseEntityType, ScimHttpClient scimHttpClient) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.http.client.methods.HttpUriRequestbuilds the request for the serverprotected booleanisExpectedResponseCode(int httpStatus) tells this abstract class if the http status from the server is the expected success statussends the defined request to the service providersetExpectedResponseHeaders(Map<String, String> requiredResponseHeaders) Set this if the SCIM provider is not behaving SCIM compliant by manipulating the expected headers that will be returned from the server null: The headers are checked as normally for the content-type "application/scim+json" empty map: The check of response headers is disabled filled map: The check of the response headers will be done with the entries of this mapsetResource(com.fasterxml.jackson.databind.JsonNode resource) setResource(String resource) Methods inherited from class de.captaingoldfish.scim.sdk.client.builder.RequestBuilder
addHeaderToRequest, getBaseUrl, getEndpoint, getRequiredHttpHeaders, getRequiredResponseHeaders, getResource, getResponseEntityType, getScimHttpClient, isResponseParseable, sendRequest, sendRequestWithMultiHeaders, toResponse
-
Constructor Details
-
CreateBuilder
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
-
CreateBuilder
public CreateBuilder(String baseUrl, String endpoint, Class<T> responseEntityType, ScimHttpClient scimHttpClient)
-
-
Method Details
-
setExpectedResponseHeaders
Set this if the SCIM provider is not behaving SCIM compliant by manipulating the expected headers that will be returned from the server- null: The headers are checked as normally for the content-type "application/scim+json"
- empty map: The check of response headers is disabled
- filled map: The check of the response headers will be done with the entries of this map
- Overrides:
setExpectedResponseHeadersin classRequestBuilder<T extends ResourceNode>
-
setResource
- Overrides:
setResourcein classRequestBuilder<T extends ResourceNode>- Parameters:
resource- sets the resource that should be sent to the service provider
-
setResource
- Overrides:
setResourcein classRequestBuilder<T extends ResourceNode>- Parameters:
resource- sets the resource that should be sent to the service provider
-
sendRequest
sends the defined request to the service provider- Overrides:
sendRequestin classRequestBuilder<T extends ResourceNode>- Returns:
- the response from the given request. A response must not be returned in any case from the service provider so the returned type is still optional
-
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()builds the request for the server- Specified by:
getHttpUriRequestin classRequestBuilder<T extends ResourceNode>
-