Package ca.uhn.fhir.rest.client.method
Class CreateMethodBinding
- java.lang.Object
-
- ca.uhn.fhir.rest.client.method.BaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
- ca.uhn.fhir.rest.client.method.CreateMethodBinding
-
- All Implemented Interfaces:
IClientResponseHandler<ca.uhn.fhir.rest.api.MethodOutcome>
public class CreateMethodBinding extends BaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
-
Constructor Summary
Constructors Constructor Description CreateMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanallowVoidReturnType()Subclasses may override to allow a void method return type, which is allowable for some methods (e.g.protected BaseHttpClientInvocationcreateClientInvocation(Object[] theArgs, org.hl7.fhir.instance.model.api.IBaseResource theResource)protected StringgetMatchingOperation()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.StringgetResourceName()Returns the name of the resource this method handles, ornullif this method is not resource specificca.uhn.fhir.rest.api.RestOperationTypeEnumgetRestOperationType()BaseHttpClientInvocationinvokeClient(Object[] theArgs)ca.uhn.fhir.rest.api.MethodOutcomeinvokeClient(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, Map<String,List<String>> theHeaders)booleanisReturnVoid()protected static voidparseContentLocation(ca.uhn.fhir.context.FhirContext theContext, ca.uhn.fhir.rest.api.MethodOutcome theOutcomeToPopulate, String theLocationHeader)protected Set<ca.uhn.fhir.rest.api.RequestTypeEnum>provideAllowableRequestTypes()protected voidvalidateResourceIdAndUrlIdForNonConditionalOperation(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theResourceId, String theUrlId, String theMatchUrl)Subclasses may override-
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 Detail
-
CreateMethodBinding
public CreateMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Detail
-
createClientInvocation
protected BaseHttpClientInvocation createClientInvocation(Object[] theArgs, org.hl7.fhir.instance.model.api.IBaseResource theResource)
-
getMatchingOperation
protected String 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.
-
getRestOperationType
public ca.uhn.fhir.rest.api.RestOperationTypeEnum getRestOperationType()
- Specified by:
getRestOperationTypein classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
provideAllowableRequestTypes
protected Set<ca.uhn.fhir.rest.api.RequestTypeEnum> provideAllowableRequestTypes()
-
validateResourceIdAndUrlIdForNonConditionalOperation
protected void validateResourceIdAndUrlIdForNonConditionalOperation(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theResourceId, String theUrlId, String theMatchUrl)
Subclasses may override
-
getResourceName
public String getResourceName()
Description copied from class:BaseMethodBindingReturns the name of the resource this method handles, ornullif this method is not resource specific- Specified by:
getResourceNamein classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
invokeClient
public BaseHttpClientInvocation invokeClient(Object[] theArgs) throws ca.uhn.fhir.rest.server.exceptions.InternalErrorException
- Specified by:
invokeClientin classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>- Throws:
ca.uhn.fhir.rest.server.exceptions.InternalErrorException
-
allowVoidReturnType
protected boolean allowVoidReturnType()
Subclasses may override to allow a void method return type, which is allowable for some methods (e.g. delete)
-
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)
-
-