Package ca.uhn.fhir.rest.server.method
Class CreateMethodBinding
java.lang.Object
ca.uhn.fhir.rest.server.method.BaseMethodBinding
ca.uhn.fhir.rest.server.method.CreateMethodBinding
-
Constructor Summary
ConstructorDescriptionCreateMethodBinding
(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addParametersForServerRequest
(RequestDetails theRequest, Object[] theParams) protected boolean
Subclasses may override to allow a void method return type, which is allowable for some methods (e.g.protected String
For servers, this method will match only incoming requests that match the given operation, or which have no operation in the URL if this method returns null.Returns the name of the resource this method handles, ornull
if this method is not resource specificca.uhn.fhir.rest.api.RestOperationTypeEnum
incomingServerRequestMatchesMethod
(RequestDetails theRequest) invokeServer
(IRestfulServer<?> theServer, RequestDetails theRequest) 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.protected Set
<ca.uhn.fhir.rest.api.RequestTypeEnum> protected void
validateResourceIdAndUrlIdForNonConditionalOperation
(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theResourceId, String theUrlId, String theMatchUrl) Subclasses may overrideMethods inherited from class ca.uhn.fhir.rest.server.method.BaseMethodBinding
bindMethod, close, createMethodParams, createParametersForServerRequest, getAllowableParamAnnotations, getContext, getIncludes, getMethod, getParameters, getProvider, getQueryParameters, getRequestIncludesFromParams, getRestOperationType, getRevIncludes, invokeServerMethod, isGlobalMethod, isSupportsConditional, isSupportsConditionalMultiple, setParameters, toResourceList, verifyMethodHasZeroOrOneOperationAnnotation
-
Constructor Details
-
CreateMethodBinding
public CreateMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Details
-
getMatchingOperation
For servers, this method will match only incoming requests that match the given operation, or which have no operation in the URL if this method returns null. -
getRestOperationType
- Specified by:
getRestOperationType
in classBaseMethodBinding
-
provideAllowableRequestTypes
-
validateResourceIdAndUrlIdForNonConditionalOperation
protected void validateResourceIdAndUrlIdForNonConditionalOperation(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theResourceId, String theUrlId, String theMatchUrl) Subclasses may override -
addParametersForServerRequest
-
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
-
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
-
allowVoidReturnType
protected boolean allowVoidReturnType()Subclasses may override to allow a void method return type, which is allowable for some methods (e.g. delete) -
incomingServerRequestMatchesMethod
- Specified by:
incomingServerRequestMatchesMethod
in classBaseMethodBinding
-
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
-
isReturnVoid
public boolean isReturnVoid()
-