Package ca.uhn.fhir.rest.server.method
Class BaseQueryParameter
java.lang.Object
ca.uhn.fhir.rest.server.method.BaseQueryParameter
- All Implemented Interfaces:
IParameter
- Direct Known Subclasses:
SearchParameter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract List
<ca.uhn.fhir.rest.api.QualifiedParamList> abstract String
getName()
abstract ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum
Returns null if blacklist is "none"Returns null if whitelist is "all"abstract boolean
Parameter should return true ifparse(FhirContext, List)
should be called even if the query string contained no values for the given parametervoid
initializeTypes
(Method theMethod, Class<? extends Collection<?>> theOuterCollectionType, Class<? extends Collection<?>> theInnerCollectionType, Class<?> theParameterType) abstract boolean
abstract Object
parse
(ca.uhn.fhir.context.FhirContext theContext, List<ca.uhn.fhir.rest.api.QualifiedParamList> theString) protected abstract boolean
translateQueryParametersIntoServerArgument
(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 Details
-
BaseQueryParameter
public BaseQueryParameter()
-
-
Method Details
-
encode
public abstract List<ca.uhn.fhir.rest.api.QualifiedParamList> encode(ca.uhn.fhir.context.FhirContext theContext, Object theObject) throws ca.uhn.fhir.rest.server.exceptions.InternalErrorException - Throws:
ca.uhn.fhir.rest.server.exceptions.InternalErrorException
-
getName
-
getParamType
-
getQualifierBlacklist
Returns null if blacklist is "none" -
getQualifierWhitelist
Returns null if whitelist is "all" -
supportsRepetition
-
handlesMissing
Parameter should return true ifparse(FhirContext, List)
should be called even if the query string contained no values for the given parameter -
initializeTypes
public void initializeTypes(Method theMethod, Class<? extends Collection<?>> theOuterCollectionType, Class<? extends Collection<?>> theInnerCollectionType, Class<?> theParameterType) - Specified by:
initializeTypes
in interfaceIParameter
-
isRequired
-
parse
public abstract Object parse(ca.uhn.fhir.context.FhirContext theContext, List<ca.uhn.fhir.rest.api.QualifiedParamList> theString) throws ca.uhn.fhir.rest.server.exceptions.InternalErrorException, ca.uhn.fhir.rest.server.exceptions.InvalidRequestException - Throws:
ca.uhn.fhir.rest.server.exceptions.InternalErrorException
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException
-
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:IParameter
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. 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:
translateQueryParametersIntoServerArgument
in 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.InternalErrorException
ca.uhn.fhir.rest.server.exceptions.InvalidRequestException
-