Package ca.uhn.fhir.rest.server.method
Class OperationMethodBinding
java.lang.Object
ca.uhn.fhir.rest.server.method.BaseMethodBinding
ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding
ca.uhn.fhir.rest.server.method.OperationMethodBinding
- Direct Known Subclasses:
GraphQLMethodBinding
,ValidateMethodBindingDstu2Plus
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding
BaseResourceReturningMethodBinding.MethodReturnTypeEnum, BaseResourceReturningMethodBinding.ReturnTypeEnum
-
Field Summary
Fields inherited from class ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding
myResponseBundleBuilder
-
Constructor Summary
ModifierConstructorDescriptionprotected
OperationMethodBinding
(Class<?> theReturnResourceType, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theReturnTypeFromRp, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider, boolean theIdempotent, boolean theDeleteEnabled, String theOperationName, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theOperationType, String theOperationTypeName, ca.uhn.fhir.rest.annotation.OperationParam[] theReturnParams, ca.uhn.fhir.model.valueset.BundleTypeEnum theBundleType, boolean theGlobal) OperationMethodBinding
(Class<?> theReturnResourceType, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theReturnTypeFromRp, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider, ca.uhn.fhir.rest.annotation.Operation theAnnotation) Constructor - This is the constructor that is called when binding a standard @Operation method. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the name of the operation, starting with "$"protected 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)ca.uhn.fhir.rest.api.RestOperationTypeEnum
ca.uhn.fhir.rest.api.RestOperationTypeEnum
getRestOperationType
(RequestDetails theRequestDetails) Determine which operation is being fired for a specific requestincomingServerRequestMatchesMethod
(RequestDetails theRequest) invokeServer
(IRestfulServer<?> theServer, RequestDetails theRequest) invokeServer
(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams) boolean
boolean
boolean
boolean
boolean
Subclasses may override to declare that they apply to all resource typesboolean
boolean
protected void
populateRequestDetailsForInterceptor
(RequestDetails theRequestDetails, Object[] theMethodParams) Subclasses may override this method (but should also call super) to provide method specifics to the interceptors.void
setDescription
(String theDescription) toString()
Methods inherited from class ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding
callOutgoingFailureOperationOutcomeHook, callOutgoingResponseHook, doInvokeServer, getMethodReturnType, getResourceName, isAddContentLocationHeader, isOffsetModeHistory, provideExpectedReturnTypes, setResourceName
Methods inherited from class ca.uhn.fhir.rest.server.method.BaseMethodBinding
bindMethod, close, createMethodParams, createParametersForServerRequest, getAllowableParamAnnotations, getContext, getIncludes, getMethod, getParameters, getProvider, getQueryParameters, getRequestIncludesFromParams, getRevIncludes, invokeServerMethod, isSupportsConditional, isSupportsConditionalMultiple, setParameters, toResourceList, verifyMethodHasZeroOrOneOperationAnnotation
-
Field Details
-
WILDCARD_NAME
- See Also:
-
-
Constructor Details
-
OperationMethodBinding
public OperationMethodBinding(Class<?> theReturnResourceType, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theReturnTypeFromRp, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider, ca.uhn.fhir.rest.annotation.Operation theAnnotation) Constructor - This is the constructor that is called when binding a standard @Operation method. -
OperationMethodBinding
protected OperationMethodBinding(Class<?> theReturnResourceType, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theReturnTypeFromRp, Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider, boolean theIdempotent, boolean theDeleteEnabled, String theOperationName, Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theOperationType, String theOperationTypeName, ca.uhn.fhir.rest.annotation.OperationParam[] theReturnParams, ca.uhn.fhir.model.valueset.BundleTypeEnum theBundleType, boolean theGlobal)
-
-
Method Details
-
getShortDescription
-
isGlobalMethod
Description copied from class:BaseMethodBinding
Subclasses may override to declare that they apply to all resource types- Overrides:
isGlobalMethod
in classBaseMethodBinding
-
getDescription
-
setDescription
-
getName
Returns the name of the operation, starting with "$" -
getResponseBundleType
Description copied from class:BaseResourceReturningMethodBinding
If the response is a bundle, this type will be placed in the root of the bundle (can be null)- Specified by:
getResponseBundleType
in classBaseResourceReturningMethodBinding
-
getRestOperationType
- Specified by:
getRestOperationType
in classBaseMethodBinding
-
getReturnParams
-
getReturnType
- Specified by:
getReturnType
in classBaseResourceReturningMethodBinding
-
incomingServerRequestMatchesMethod
- Specified by:
incomingServerRequestMatchesMethod
in classBaseMethodBinding
-
getRestOperationType
public ca.uhn.fhir.rest.api.RestOperationTypeEnum getRestOperationType(RequestDetails theRequestDetails) Description copied from class:BaseMethodBinding
Determine which operation is being fired for a specific request- Overrides:
getRestOperationType
in classBaseMethodBinding
- Parameters:
theRequestDetails
- The request
-
toString
-
invokeServer
public Object invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest) throws ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException, IOException - Overrides:
invokeServer
in classBaseResourceReturningMethodBinding
- Throws:
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
IOException
-
invokeServer
public Object invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams) throws ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException - Specified by:
invokeServer
in classBaseResourceReturningMethodBinding
- Throws:
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
-
isCanOperateAtInstanceLevel
-
isCanOperateAtServerLevel
-
isCanOperateAtTypeLevel
-
isIdempotent
-
isDeleteEnabled
-
populateRequestDetailsForInterceptor
protected void populateRequestDetailsForInterceptor(RequestDetails theRequestDetails, Object[] theMethodParams) Description copied from class:BaseMethodBinding
Subclasses may override this method (but should also call super) to provide method specifics to the interceptors.- Overrides:
populateRequestDetailsForInterceptor
in classBaseMethodBinding
- Parameters:
theRequestDetails
- The server request detailstheMethodParams
- The method params as generated by the specific method binding
-
isManualRequestMode
-
getCanonicalUrl
-