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
public abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding<Object>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseResourceReturningMethodBinding.MethodReturnTypeEnumstatic classBaseResourceReturningMethodBinding.ReturnTypeEnum
-
Constructor Summary
Constructors Constructor Description BaseResourceReturningMethodBinding(Class<?> theReturnResourceType, 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 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)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()ObjectinvokeServer(IRestfulServer<?> theServer, RequestDetails theRequest)abstract ObjectinvokeServer(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams)protected booleanisAddContentLocationHeader()Should the response include a Content-Location header.protected voidsetResourceName(String theResourceName)-
Methods inherited from class ca.uhn.fhir.rest.server.method.BaseMethodBinding
bindMethod, createMethodParams, createParametersForServerRequest, getAllowableParamAnnotations, getContext, getIncludes, getMethod, getParameters, getProvider, getRequestIncludesFromParams, getRestOperationType, getRestOperationType, incomingServerRequestMatchesMethod, invokeServerMethod, isGlobalMethod, isSupportsConditional, isSupportsConditionalMultiple, populateActionRequestDetailsForInterceptor, setParameters, toResourceList, verifyMethodHasZeroOrOneOperationAnnotation
-
-
-
-
Constructor Detail
-
BaseResourceReturningMethodBinding
public BaseResourceReturningMethodBinding(Class<?> theReturnResourceType, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Detail
-
doInvokeServer
public org.hl7.fhir.instance.model.api.IBaseResource doInvokeServer(IRestfulServer<?> theServer, RequestDetails theRequest)
-
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>
-
setResourceName
protected void setResourceName(String theResourceName)
-
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()
-
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
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
-
callOutgoingResponseHook
public static boolean callOutgoingResponseHook(RequestDetails theRequest, ResponseDetails theResponseDetails)
-
callOutgoingFailureOperationOutcomeHook
public static void callOutgoingFailureOperationOutcomeHook(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseOperationOutcome theOperationOutcome)
-
-