Package ca.uhn.fhir.rest.client.method
Class BaseMethodBinding<T>
- java.lang.Object
-
- ca.uhn.fhir.rest.client.method.BaseMethodBinding<T>
-
- All Implemented Interfaces:
IClientResponseHandler<T>
- Direct Known Subclasses:
BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody,BaseResourceReturningMethodBinding,CreateMethodBinding,UpdateMethodBinding
public abstract class BaseMethodBinding<T> extends Object implements IClientResponseHandler<T>
-
-
Constructor Summary
Constructors Constructor Description BaseMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static BaseMethodBinding<?>bindMethod(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)protected ca.uhn.fhir.parser.IParsercreateAppropriateParserForParsingResponse(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, List<Class<? extends org.hl7.fhir.instance.model.api.IBaseResource>> thePreferTypes)List<Class<?>>getAllowableParamAnnotations()ca.uhn.fhir.context.FhirContextgetContext()Set<String>getIncludes()MethodgetMethod()List<IParameter>getParameters()ObjectgetProvider()abstract StringgetResourceName()Returns the name of the resource this method handles, ornullif this method is not resource specificabstract ca.uhn.fhir.rest.api.RestOperationTypeEnumgetRestOperationType()abstract BaseHttpClientInvocationinvokeClient(Object[] theArgs)static booleanisResourceInterface(Class<?> theReturnTypeFromMethod)booleanisSupportsConditional()Does this method have a parameter annotated withConditionalParamBinder.booleanisSupportsConditionalMultiple()Does this method support conditional operations over multiple objects (basically for conditional delete)protected ca.uhn.fhir.rest.server.exceptions.BaseServerResponseExceptionprocessNon2xxResponseAndReturnExceptionToThrow(int theStatusCode, String theResponseMimeType, InputStream theResponseInputStream)voidsetParameters(List<IParameter> theParameters)For unit tests onlystatic booleanverifyMethodHasZeroOrOneOperationAnnotation(Method theNextMethod, Object... theAnnotations)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.uhn.fhir.rest.client.method.IClientResponseHandler
invokeClient
-
-
-
-
Constructor Detail
-
BaseMethodBinding
public BaseMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Detail
-
createAppropriateParserForParsingResponse
protected ca.uhn.fhir.parser.IParser createAppropriateParserForParsingResponse(String theResponseMimeType, InputStream theResponseInputStream, int theResponseStatusCode, List<Class<? extends org.hl7.fhir.instance.model.api.IBaseResource>> thePreferTypes)
-
getAllowableParamAnnotations
public List<Class<?>> getAllowableParamAnnotations()
-
getContext
public ca.uhn.fhir.context.FhirContext getContext()
-
getIncludes
public Set<String> getIncludes()
-
getParameters
public List<IParameter> getParameters()
-
getProvider
public Object getProvider()
-
getResourceName
public abstract String getResourceName()
Returns the name of the resource this method handles, ornullif this method is not resource specific
-
getRestOperationType
public abstract ca.uhn.fhir.rest.api.RestOperationTypeEnum getRestOperationType()
-
invokeClient
public abstract BaseHttpClientInvocation invokeClient(Object[] theArgs) throws ca.uhn.fhir.rest.server.exceptions.InternalErrorException
- Throws:
ca.uhn.fhir.rest.server.exceptions.InternalErrorException
-
isSupportsConditional
public boolean isSupportsConditional()
Does this method have a parameter annotated withConditionalParamBinder. Note that many operations don't actually support this paramter, so this will only return true occasionally.
-
isSupportsConditionalMultiple
public boolean isSupportsConditionalMultiple()
Does this method support conditional operations over multiple objects (basically for conditional delete)
-
processNon2xxResponseAndReturnExceptionToThrow
protected ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException processNon2xxResponseAndReturnExceptionToThrow(int theStatusCode, String theResponseMimeType, InputStream theResponseInputStream)
-
setParameters
public void setParameters(List<IParameter> theParameters)
For unit tests only
-
bindMethod
public static BaseMethodBinding<?> bindMethod(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
isResourceInterface
public static boolean isResourceInterface(Class<?> theReturnTypeFromMethod)
-
verifyMethodHasZeroOrOneOperationAnnotation
public static boolean verifyMethodHasZeroOrOneOperationAnnotation(Method theNextMethod, Object... theAnnotations)
-
-