Package ca.uhn.fhir.rest.server.method
Class BaseResourceReturningMethodBinding
java.lang.Object
ca.uhn.fhir.rest.server.method.BaseMethodBinding<Object>
ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding
- Direct Known Subclasses:
ConformanceMethodBinding,HistoryMethodBinding,OperationMethodBinding,PageMethodBinding,ReadMethodBinding,SearchMethodBinding,TransactionMethodBinding
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionBaseResourceReturningMethodBinding(Class<?> theReturnResourceType, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcallOutgoingFailureOperationOutcomeHook(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseOperationOutcome theOperationOutcome) static booleancallOutgoingResponseHook(RequestDetails theRequest, ResponseDetails theResponseDetails) org.hl7.fhir.instance.model.api.IBaseResourcedoInvokeServer(IRestfulServer<?> theServer, RequestDetails theRequest) Returns the name of the resource this method handles, ornullif this method is not resource specificprotected abstract ca.uhn.fhir.model.valueset.BundleTypeEnumIf 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 ObjectinvokeServer(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams) protected booleanShould the response include a Content-Location header.protected booleanSubclasses may overrideprotected voidsetResourceName(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, populateActionRequestDetailsForInterceptor, setParameters, toResourceList, verifyMethodHasZeroOrOneOperationAnnotation
-
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:BaseMethodBindingReturns the name of the resource this method handles, ornullif this method is not resource specific- Specified by:
getResourceNamein classBaseMethodBinding<Object>
-
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:
invokeServerin classBaseMethodBinding<Object>- Throws:
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseExceptionIOException
-
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.InvalidRequestExceptionca.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)
-