Class UpdateBuilder<T extends ResourceNode>


public class UpdateBuilder<T extends ResourceNode> extends ETagRequestBuilder<T>
author Pascal Knueppel
created at: 16.12.2019 - 12:04

  • Constructor Details

    • 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 resource
      responseEntityType - the type of the resource that should be returned
      scimHttpClient - the http client instance
    • UpdateBuilder

      public UpdateBuilder(String baseUrl, String endpoint, String resourceId, Class<T> responseEntityType, ScimHttpClient scimHttpClient)
  • Method Details

    • setExpectedResponseHeaders

      public UpdateBuilder<T> setExpectedResponseHeaders(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 map
      Overrides:
      setExpectedResponseHeaders in class RequestBuilder<T extends ResourceNode>
    • setResource

      public UpdateBuilder<T> setResource(String resource)
      Overrides:
      setResource in class RequestBuilder<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:
      setResource in class RequestBuilder<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:
      setETagForIfMatch in class ETagRequestBuilder<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:
      setETagForIfNoneMatch in class ETagRequestBuilder<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:
      setETagForIfMatch in class ETagRequestBuilder<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:
      setETagForIfNoneMatch in class ETagRequestBuilder<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:
      isExpectedResponseCode in class RequestBuilder<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: RequestBuilder
      builds the request for the server
      Specified by:
      getHttpUriRequest in class RequestBuilder<T extends ResourceNode>