Package ca.uhn.fhir.rest.server.method
Class BaseResourceReturningMethodBinding
java.lang.Object
ca.uhn.fhir.rest.server.method.BaseMethodBinding
ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding
- Direct Known Subclasses:
ConformanceMethodBinding
,HistoryMethodBinding
,OperationMethodBinding
,PageMethodBinding
,ReadMethodBinding
,SearchMethodBinding
,TransactionMethodBinding
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBaseResourceReturningMethodBinding
(Class<?> theReturnResourceType, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
callOutgoingFailureOperationOutcomeHook
(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseOperationOutcome theOperationOutcome) static boolean
callOutgoingResponseHook
(RequestDetails theRequest, ResponseDetails theResponseDetails) org.hl7.fhir.instance.model.api.IBaseResource
doInvokeServer
(IRestfulServer<?> theServer, RequestDetails theRequest) Returns the name of the resource this method handles, ornull
if this method is not resource specificprotected abstract ca.uhn.fhir.model.valueset.BundleTypeEnum
If the response is a bundle, this type will be placed in the root of the bundle (can be null)invokeServer
(IRestfulServer<?> theServer, RequestDetails theRequest) abstract Object
invokeServer
(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams) protected boolean
Should the response include a Content-Location header.protected boolean
Subclasses may overrideprotected void
setResourceName
(String theResourceName) Methods inherited from class ca.uhn.fhir.rest.server.method.BaseMethodBinding
bindMethod, close, createMethodParams, createParametersForServerRequest, getAllowableParamAnnotations, getContext, getIncludes, getMethod, getParameters, getProvider, getQueryParameters, getRequestIncludesFromParams, getRestOperationType, getRestOperationType, getRevIncludes, incomingServerRequestMatchesMethod, invokeServerMethod, isGlobalMethod, isSupportsConditional, isSupportsConditionalMultiple, populateRequestDetailsForInterceptor, setParameters, toResourceList, verifyMethodHasZeroOrOneOperationAnnotation
-
Field Details
-
myResponseBundleBuilder
-
-
Constructor Details
-
BaseResourceReturningMethodBinding
public BaseResourceReturningMethodBinding(Class<?> theReturnResourceType, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Details
-
provideExpectedReturnTypes
Subclasses may override -
isOffsetModeHistory
-
doInvokeServer
public org.hl7.fhir.instance.model.api.IBaseResource doInvokeServer(IRestfulServer<?> theServer, RequestDetails theRequest) -
getMethodReturnType
-
getResourceName
Description copied from class:BaseMethodBinding
Returns the name of the resource this method handles, ornull
if this method is not resource specific- Specified by:
getResourceName
in classBaseMethodBinding
-
setResourceName
-
getResponseBundleType
If the response is a bundle, this type will be placed in the root of the bundle (can be null) -
getReturnType
-
invokeServer
public Object invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest) throws ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException, IOException - Specified by:
invokeServer
in classBaseMethodBinding
- Throws:
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
IOException
-
invokeServer
public abstract Object invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams) throws ca.uhn.fhir.rest.server.exceptions.InvalidRequestException, ca.uhn.fhir.rest.server.exceptions.InternalErrorException - Throws:
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException
ca.uhn.fhir.rest.server.exceptions.InternalErrorException
-
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 -
callOutgoingResponseHook
public static boolean callOutgoingResponseHook(RequestDetails theRequest, ResponseDetails theResponseDetails) -
callOutgoingFailureOperationOutcomeHook
public static void callOutgoingFailureOperationOutcomeHook(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseOperationOutcome theOperationOutcome)
-