Package ca.uhn.fhir.rest.client.method
Class BaseResourceReturningMethodBinding
- java.lang.Object
-
- ca.uhn.fhir.rest.client.method.BaseMethodBinding<Object>
-
- ca.uhn.fhir.rest.client.method.BaseResourceReturningMethodBinding
-
- All Implemented Interfaces:
IClientResponseHandler<Object>
- Direct Known Subclasses:
ConformanceMethodBinding,HistoryMethodBinding,OperationMethodBinding,PageMethodBinding,ReadMethodBinding,SearchMethodBinding,TransactionMethodBinding
public abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding<Object>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseResourceReturningMethodBinding.MethodReturnTypeEnumstatic classBaseResourceReturningMethodBinding.ResourceOrDstu1Bundlestatic classBaseResourceReturningMethodBinding.ReturnTypeEnum
-
Field Summary
Fields Modifier and Type Field Description protected static Set<String>ALLOWED_PARAMS
-
Constructor Summary
Constructors Constructor Description BaseResourceReturningMethodBinding(Class<?> theReturnResourceType, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BaseResourceReturningMethodBinding.MethodReturnTypeEnumgetMethodReturnType()StringgetResourceName()Returns the name of the resource this method handles, ornullif this method is not resource specificprotected abstract ca.uhn.fhir.model.valueset.BundleTypeEnumgetResponseBundleType()If the response is a bundle, this type will be placed in the root of the bundle (can be null)abstract BaseResourceReturningMethodBinding.ReturnTypeEnumgetReturnType()ObjectinvokeClient(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, Map<String,List<String>> theHeaders)protected booleanisAddContentLocationHeader()Should the response include a Content-Location header.protected voidsetResourceName(String theResourceName)-
Methods inherited from class ca.uhn.fhir.rest.client.method.BaseMethodBinding
bindMethod, createAppropriateParserForParsingResponse, getAllowableParamAnnotations, getContext, getIncludes, getMethod, getParameters, getProvider, getRestOperationType, invokeClient, isResourceInterface, isSupportsConditional, isSupportsConditionalMultiple, processNon2xxResponseAndReturnExceptionToThrow, setParameters, verifyMethodHasZeroOrOneOperationAnnotation
-
-
-
-
Field Detail
-
ALLOWED_PARAMS
protected static final Set<String> ALLOWED_PARAMS
-
-
Constructor Detail
-
BaseResourceReturningMethodBinding
public BaseResourceReturningMethodBinding(Class<?> theReturnResourceType, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Detail
-
getMethodReturnType
public BaseResourceReturningMethodBinding.MethodReturnTypeEnum getMethodReturnType()
-
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<Object>
-
getResponseBundleType
protected abstract ca.uhn.fhir.model.valueset.BundleTypeEnum getResponseBundleType()
If the response is a bundle, this type will be placed in the root of the bundle (can be null)
-
getReturnType
public abstract BaseResourceReturningMethodBinding.ReturnTypeEnum getReturnType()
-
invokeClient
public Object invokeClient(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, Map<String,List<String>> theHeaders) throws IOException
- Throws:
IOException
-
isAddContentLocationHeader
protected boolean isAddContentLocationHeader()
Should the response include a Content-Location header. Search method bunding (and any others?) may override this to disable the content-location, since it doesn't make sense
-
setResourceName
protected void setResourceName(String theResourceName)
-
-