Package ca.uhn.fhir.rest.server.method
Class CreateMethodBinding
- java.lang.Object
-
- ca.uhn.fhir.rest.server.method.BaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
- ca.uhn.fhir.rest.server.method.CreateMethodBinding
-
public class CreateMethodBinding extends BaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
-
Constructor Summary
Constructors Constructor Description CreateMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddParametersForServerRequest(RequestDetails theRequest, Object[] theParams)protected booleanallowVoidReturnType()Subclasses may override to allow a void method return type, which is allowable for some methods (e.g.protected StringgetMatchingOperation()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.StringgetResourceName()Returns the name of the resource this method handles, ornullif this method is not resource specificca.uhn.fhir.rest.api.RestOperationTypeEnumgetRestOperationType()booleanincomingServerRequestMatchesMethod(RequestDetails theRequest)ObjectinvokeServer(IRestfulServer<?> theServer, RequestDetails theRequest)booleanisReturnVoid()protected voidpopulateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, IServerInterceptor.ActionRequestDetails theDetails, Object[] theMethodParams)Subclasses may override this method (but should also call super.BaseMethodBinding.populateActionRequestDetailsForInterceptor(RequestDetails, ActionRequestDetails, Object[])to provide method specifics to the interceptors.protected Set<ca.uhn.fhir.rest.api.RequestTypeEnum>provideAllowableRequestTypes()protected voidvalidateResourceIdAndUrlIdForNonConditionalOperation(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theResourceId, String theUrlId, String theMatchUrl)Subclasses may override-
Methods inherited from class ca.uhn.fhir.rest.server.method.BaseMethodBinding
bindMethod, createMethodParams, createParametersForServerRequest, getAllowableParamAnnotations, getContext, getIncludes, getMethod, getParameters, getProvider, getRequestIncludesFromParams, getRestOperationType, invokeServerMethod, isGlobalMethod, isSupportsConditional, isSupportsConditionalMultiple, setParameters, toResourceList, verifyMethodHasZeroOrOneOperationAnnotation
-
-
-
-
Constructor Detail
-
CreateMethodBinding
public CreateMethodBinding(Method theMethod, ca.uhn.fhir.context.FhirContext theContext, Object theProvider)
-
-
Method Detail
-
getMatchingOperation
protected String 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
@Nonnull public ca.uhn.fhir.rest.api.RestOperationTypeEnum getRestOperationType()
- Specified by:
getRestOperationTypein classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
provideAllowableRequestTypes
protected Set<ca.uhn.fhir.rest.api.RequestTypeEnum> provideAllowableRequestTypes()
-
validateResourceIdAndUrlIdForNonConditionalOperation
protected void validateResourceIdAndUrlIdForNonConditionalOperation(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theResourceId, String theUrlId, String theMatchUrl)
Subclasses may override
-
addParametersForServerRequest
protected void addParametersForServerRequest(RequestDetails theRequest, Object[] theParams)
-
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<ca.uhn.fhir.rest.api.MethodOutcome>
-
populateActionRequestDetailsForInterceptor
protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, IServerInterceptor.ActionRequestDetails theDetails, Object[] theMethodParams)
Description copied from class:BaseMethodBindingSubclasses may override this method (but should also call super.BaseMethodBinding.populateActionRequestDetailsForInterceptor(RequestDetails, ActionRequestDetails, Object[])to provide method specifics to the interceptors.- Overrides:
populateActionRequestDetailsForInterceptorin classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>- Parameters:
theRequestDetails- The server request detailstheDetails- The details object to populatetheMethodParams- 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
public boolean incomingServerRequestMatchesMethod(RequestDetails theRequest)
- Specified by:
incomingServerRequestMatchesMethodin classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>
-
invokeServer
public Object invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest) throws ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException, IOException
- Specified by:
invokeServerin classBaseMethodBinding<ca.uhn.fhir.rest.api.MethodOutcome>- Throws:
ca.uhn.fhir.rest.server.exceptions.BaseServerResponseExceptionIOException
-
isReturnVoid
public boolean isReturnVoid()
-
-