Package ca.uhn.fhir.rest.client.method
Class PatchMethodBinding
java.lang.Object
ca.uhn.fhir.rest.client.method.BaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
ca.uhn.fhir.rest.client.method.BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody
ca.uhn.fhir.rest.client.method.PatchMethodBinding
- All Implemented Interfaces:
IClientResponseHandler<ca.uhn.fhir.rest.api.MethodOutcome>
public class PatchMethodBinding
extends BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody
Base class for an operation that has a resource type but not a resource body in the
request body
-
Constructor Summary
ConstructorDescriptionPatchMethodBinding
(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Subclasses may override to allow a void method return type, which is allowable for some methods (e.g.protected BaseHttpClientInvocation
createClientInvocation
(Object[] theArgs, org.hl7.fhir.instance.model.api.IBaseResource theResource) static HttpPatchClientInvocation
createPatchInvocation
(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String theBody, String theResourceType, Map<String, List<String>> theMatchParams) static HttpPatchClientInvocation
createPatchInvocation
(ca.uhn.fhir.context.FhirContext theContext, String theUrlPath, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String theBody) static HttpPatchClientInvocation
createPatchInvocation
(ca.uhn.fhir.context.FhirContext theContext, org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String theBody) protected String
For servers, this method will match only incoming requests that match the given operation, or which have no operation in the URL if this method returns null.ca.uhn.fhir.rest.api.RestOperationTypeEnum
invokeClient
(Object[] theArgs) ca.uhn.fhir.rest.api.MethodOutcome
invokeClient
(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, Map<String, List<String>> theHeaders) boolean
protected static void
parseContentLocation
(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.api.MethodOutcome theOutcomeToPopulate, String theLocationHeader) protected Set
<ca.uhn.fhir.rest.api.RequestTypeEnum> Methods inherited from class ca.uhn.fhir.rest.client.method.BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody
getIdParameterIndex, getResourceName
Methods inherited from class ca.uhn.fhir.rest.client.method.BaseMethodBinding
bindMethod, createAppropriateParserForParsingResponse, getAllowableParamAnnotations, getContext, getIncludes, getMethod, getParameters, getProvider, isResourceInterface, isSupportsConditional, isSupportsConditionalMultiple, processNon2xxResponseAndReturnExceptionToThrow, setParameters, verifyMethodHasZeroOrOneOperationAnnotation
-
Constructor Details
-
PatchMethodBinding
public PatchMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Details
-
getRestOperationType
- Specified by:
getRestOperationType
in classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
provideAllowableRequestTypes
-
createClientInvocation
protected BaseHttpClientInvocation createClientInvocation(Object[] theArgs, org.hl7.fhir.instance.model.api.IBaseResource theResource) -
allowVoidReturnType
Subclasses may override to allow a void method return type, which is allowable for some methods (e.g. delete) -
invokeClient
public BaseHttpClientInvocation invokeClient(Object[] theArgs) throws ca.uhn.fhir.rest.server.exceptions.InternalErrorException - Specified by:
invokeClient
in classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
- Throws:
ca.uhn.fhir.rest.server.exceptions.InternalErrorException
-
createPatchInvocation
public static HttpPatchClientInvocation createPatchInvocation(ca.uhn.fhir.context.FhirContext theContext, org.hl7.fhir.instance.model.api.IIdType theId, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String theBody) -
createPatchInvocation
public static HttpPatchClientInvocation createPatchInvocation(ca.uhn.fhir.context.FhirContext theContext, String theUrlPath, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String theBody) -
getMatchingOperation
For servers, this method will match only incoming requests that match the given operation, or which have no operation in the URL if this method returns null. -
createPatchInvocation
public static HttpPatchClientInvocation createPatchInvocation(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.api.PatchTypeEnum thePatchType, String theBody, String theResourceType, Map<String, List<String>> theMatchParams) -
invokeClient
public ca.uhn.fhir.rest.api.MethodOutcome invokeClient(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException- Throws:
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
-
isReturnVoid
public boolean isReturnVoid() -
parseContentLocation
protected static void parseContentLocation(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.api.MethodOutcome theOutcomeToPopulate, String theLocationHeader)
-