Class CreateBuilder<T extends ResourceNode>


  • public class CreateBuilder<T extends ResourceNode>
    extends RequestBuilder<T>
    author Pascal Knueppel
    created at: 07.12.2019 - 23:13

    • Method Detail

      • setResource

        public CreateBuilder<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
      • sendRequest

        public ServerResponse<T> sendRequest()
        sends the defined request to the service provider
        Overrides:
        sendRequest in class RequestBuilder<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:
        isExpectedResponseCode in class RequestBuilder<T extends ResourceNode>
        Parameters:
        httpStatus - the http status from the server
        Returns:
        true if the response status shows success