public abstract class BaseMethodBinding<T> extends Object
| Constructor and Description |
|---|
BaseMethodBinding(Method theMethod,
ca.uhn.fhir.context.FhirContext theContext,
Object theProvider) |
| Modifier and Type | Method and Description |
|---|---|
static BaseMethodBinding<?> |
bindMethod(Method theMethod,
ca.uhn.fhir.context.FhirContext theContext,
Object theProvider) |
protected ca.uhn.fhir.parser.IParser |
createAppropriateParserForParsingResponse(String theResponseMimeType,
Reader theResponseReader,
int theResponseStatusCode,
List<Class<? extends org.hl7.fhir.instance.model.api.IBaseResource>> thePreferTypes) |
protected ca.uhn.fhir.parser.IParser |
createAppropriateParserForParsingServerRequest(RequestDetails theRequest) |
protected Object[] |
createMethodParams(RequestDetails theRequest) |
protected Object[] |
createParametersForServerRequest(RequestDetails theRequest) |
List<Class<?>> |
getAllowableParamAnnotations() |
ca.uhn.fhir.context.FhirContext |
getContext() |
Set<String> |
getIncludes() |
Method |
getMethod() |
List<IParameter> |
getParameters() |
Object |
getProvider() |
Set<ca.uhn.fhir.model.api.Include> |
getRequestIncludesFromParams(Object[] params) |
abstract String |
getResourceName()
Returns the name of the resource this method handles, or
null if this method is not resource specific |
abstract ca.uhn.fhir.rest.api.RestOperationTypeEnum |
getRestOperationType() |
ca.uhn.fhir.rest.api.RestOperationTypeEnum |
getRestOperationType(RequestDetails theRequestDetails)
Determine which operation is being fired for a specific request
|
abstract boolean |
incomingServerRequestMatchesMethod(RequestDetails theRequest) |
abstract Object |
invokeServer(IRestfulServer<?> theServer,
RequestDetails theRequest) |
protected Object |
invokeServerMethod(IRestfulServer<?> theServer,
RequestDetails theRequest,
Object[] theMethodParams) |
boolean |
isGlobalMethod()
Subclasses may override to declare that they apply to all resource types
|
boolean |
isSupportsConditional()
Does this method have a parameter annotated with
ConditionalParamBinder. |
boolean |
isSupportsConditionalMultiple()
Does this method support conditional operations over multiple objects (basically for conditional delete)
|
protected void |
populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails,
IServerInterceptor.ActionRequestDetails theDetails,
Object[] theMethodParams)
Subclasses may override this method (but should also call super.
#populateActionRequestDetailsForInterceptor(RequestDetails, ActionRequestDetails, Object[]) to provide method specifics to the
interceptors. |
protected ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException |
processNon2xxResponseAndReturnExceptionToThrow(int theStatusCode,
String theResponseMimeType,
Reader theResponseReader) |
void |
setParameters(List<IParameter> theParameters)
For unit tests only
|
protected IBundleProvider |
toResourceList(Object response) |
static boolean |
verifyMethodHasZeroOrOneOperationAnnotation(Method theNextMethod,
Object... theAnnotations) |
public BaseMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
protected ca.uhn.fhir.parser.IParser createAppropriateParserForParsingResponse(String theResponseMimeType, Reader theResponseReader, int theResponseStatusCode, List<Class<? extends org.hl7.fhir.instance.model.api.IBaseResource>> thePreferTypes)
protected ca.uhn.fhir.parser.IParser createAppropriateParserForParsingServerRequest(RequestDetails theRequest)
protected Object[] createMethodParams(RequestDetails theRequest)
protected Object[] createParametersForServerRequest(RequestDetails theRequest)
public boolean isGlobalMethod()
public List<Class<?>> getAllowableParamAnnotations()
public ca.uhn.fhir.context.FhirContext getContext()
public Set<String> getIncludes()
public List<IParameter> getParameters()
public Object getProvider()
public Set<ca.uhn.fhir.model.api.Include> getRequestIncludesFromParams(Object[] params)
public abstract String getResourceName()
null if this method is not resource specific@Nonnull public abstract ca.uhn.fhir.rest.api.RestOperationTypeEnum getRestOperationType()
public ca.uhn.fhir.rest.api.RestOperationTypeEnum getRestOperationType(RequestDetails theRequestDetails)
theRequestDetails - The requestpublic abstract boolean incomingServerRequestMatchesMethod(RequestDetails theRequest)
public abstract Object invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest) throws ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException, IOException
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseExceptionIOExceptionprotected final Object invokeServerMethod(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams)
public boolean isSupportsConditional()
ConditionalParamBinder. Note that many operations don't actually support this paramter, so this will only return true occasionally.public boolean isSupportsConditionalMultiple()
protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, IServerInterceptor.ActionRequestDetails theDetails, Object[] theMethodParams)
#populateActionRequestDetailsForInterceptor(RequestDetails, ActionRequestDetails, Object[]) to provide method specifics to the
interceptors.theRequestDetails - The server request detailstheDetails - The details object to populatetheMethodParams - The method params as generated by the specific method bindingprotected ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException processNon2xxResponseAndReturnExceptionToThrow(int theStatusCode, String theResponseMimeType, Reader theResponseReader)
public void setParameters(List<IParameter> theParameters)
protected IBundleProvider toResourceList(Object response) throws ca.uhn.fhir.rest.server.exceptions.InternalErrorException
ca.uhn.fhir.rest.server.exceptions.InternalErrorExceptionpublic static BaseMethodBinding<?> bindMethod(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
public static boolean verifyMethodHasZeroOrOneOperationAnnotation(Method theNextMethod, Object... theAnnotations)
Copyright © 2014–2019 University Health Network. All rights reserved.