Package ca.uhn.fhir.rest.server.method
Class ResourceParameter
- java.lang.Object
-
- ca.uhn.fhir.rest.server.method.ResourceParameter
-
- All Implemented Interfaces:
IParameter
public class ResourceParameter extends Object implements IParameter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResourceParameter.Mode
-
Constructor Summary
Constructors Constructor Description ResourceParameter(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theParameterType, Object theProvider, ResourceParameter.Mode theMode, boolean theMethodIsOperation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReadercreateRequestReader(RequestDetails theRequest)static CharsetdetermineRequestCharset(RequestDetails theRequest)ResourceParameter.ModegetMode()Class<? extends org.hl7.fhir.instance.model.api.IBaseResource>getResourceType()voidinitializeTypes(Method theMethod, Class<? extends Collection<?>> theOuterCollectionType, Class<? extends Collection<?>> theInnerCollectionType, Class<?> theParameterType)ObjecttranslateQueryParametersIntoServerArgument(RequestDetails theRequest, BaseMethodBinding<?> theMethodBinding)This server method method takes the data received by the server in an incoming request, and translates that data into a single argument for a server method invocation.
-
-
-
Constructor Detail
-
ResourceParameter
public ResourceParameter(Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> theParameterType, Object theProvider, ResourceParameter.Mode theMode, boolean theMethodIsOperation)
-
-
Method Detail
-
getMode
public ResourceParameter.Mode getMode()
-
getResourceType
public Class<? extends org.hl7.fhir.instance.model.api.IBaseResource> getResourceType()
-
initializeTypes
public void initializeTypes(Method theMethod, Class<? extends Collection<?>> theOuterCollectionType, Class<? extends Collection<?>> theInnerCollectionType, Class<?> theParameterType)
- Specified by:
initializeTypesin interfaceIParameter
-
translateQueryParametersIntoServerArgument
public Object translateQueryParametersIntoServerArgument(RequestDetails theRequest, BaseMethodBinding<?> theMethodBinding) throws ca.uhn.fhir.rest.server.exceptions.InternalErrorException, ca.uhn.fhir.rest.server.exceptions.InvalidRequestException
Description copied from interface:IParameterThis server method method takes the data received by the server in an incoming request, and translates that data into a single argument for a server method invocation. Note that all received data is passed to this method, but the expectation is that not necessarily that all data is used by every parameter.- Specified by:
translateQueryParametersIntoServerArgumentin interfaceIParameter- Parameters:
theRequest- The incoming request objecttheMethodBinding- TODO- Returns:
- Returns the argument object as it will be passed to the IResourceProvider method.
- Throws:
ca.uhn.fhir.rest.server.exceptions.InternalErrorExceptionca.uhn.fhir.rest.server.exceptions.InvalidRequestException
-
createRequestReader
public static Reader createRequestReader(RequestDetails theRequest)
-
determineRequestCharset
public static Charset determineRequestCharset(RequestDetails theRequest)
-
-