Class PatchBuilder<T extends ResourceNode>


  • public class PatchBuilder<T extends ResourceNode>
    extends ETagRequestBuilder<T>
    allows to build a patch request that can be sent to the server

    created at: 01.05.2020
    Author:
    Pascal Knüppel
    • Method Detail

      • 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
      • setPatchResource

        public RequestBuilder<T> setPatchResource​(PatchOpRequest resource)
        sets the patch request directly if already build into the request context
        Parameters:
        resource - the patch request representation
      • setPatchResource

        public RequestBuilder<T> setPatchResource​(String resource)
        sets the patch request directly if already build into the request context
        Parameters:
        resource - the patch request representation
      • getResource

        public final String getResource()
        Returns:
        the resource that will be sent to the server