Package ca.uhn.fhir.util
Class ParametersUtil
java.lang.Object
ca.uhn.fhir.util.ParametersUtil
Utilities for dealing with parameters resources in a version indepenedent way
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IBaseaddParameterToParameters(FhirContext theContext, IBaseParameters theParameters, String theName)Add a parameter with no value (typically because we'll be adding sub-parameters)static voidaddParameterToParameters(FhirContext theContext, IBaseParameters theParameters, String theName, Object theValue)Add a parameter value to a Parameters resourcestatic voidaddParameterToParameters(FhirContext theContext, IBaseParameters theParameters, String theName, String thePrimitiveDatatype, String theValue)Add a parameter value to a Parameters resourcestatic voidaddParameterToParametersBoolean(FhirContext theCtx, IBaseParameters theParameters, String theName, boolean theValue)static voidaddParameterToParametersCode(FhirContext theCtx, IBaseParameters theParameters, String theName, String theValue)static voidaddParameterToParametersDecimal(FhirContext theCtx, IBaseParameters theParameters, String theName, BigDecimal theValue)static voidaddParameterToParametersInteger(FhirContext theCtx, IBaseParameters theParameters, String theName, int theValue)static voidaddParameterToParametersLong(FhirContext theCtx, IBaseParameters theParameters, String theName, long theValue)static voidaddParameterToParametersReference(FhirContext theCtx, IBaseParameters theParameters, String theName, String theReference)static voidaddParameterToParametersString(FhirContext theCtx, IBaseParameters theParameters, String theName, String theValue)static voidaddParameterToParametersUri(FhirContext theCtx, IBaseParameters theParameters, String theName, String theValue)static voidaddPart(FhirContext theContext, IBase theParameter, String theName, IBase theValue)static voidaddPartBoolean(FhirContext theContext, IBase theParameter, String theName, Boolean theValue)static voidaddPartCode(FhirContext theContext, IBase theParameter, String theName, String theCode)static voidaddPartCoding(FhirContext theContext, IBase theParameter, String theName, String theSystem, String theCode, String theDisplay)static voidaddPartDecimal(FhirContext theContext, IBase theParameter, String theName, Double theValue)static voidaddPartInteger(FhirContext theContext, IBase theParameter, String theName, Integer theInteger)static voidaddPartResource(FhirContext theContext, IBase theParameter, String theName, IBaseResource theValue)static voidaddPartString(FhirContext theContext, IBase theParameter, String theName, String theValue)static IPrimitiveType<?>createCode(FhirContext theContext, String theValue)static IPrimitiveType<?>createString(FhirContext theContext, String theValue)static IPrimitiveType<?>createUri(FhirContext theContext, String theValue)static StringextractDescription(Description desc)static StringextractDescription(Annotation[] theParameterAnnotations)static StringextractDescription(AnnotatedElement theType)extractExamples(Annotation[] theParameterAnnotations)static StringextractShortDefinition(AnnotatedElement theType)getNamedParameterPartAsString(FhirContext theCtx, IBaseParameters theParameters, String thePartName, String theParameterName)getNamedParameters(FhirContext theCtx, IBaseResource theParameters, String theParameterName)getNamedParameterValueAsInteger(FhirContext theCtx, IBaseParameters theParameters, String theParameterName)getNamedParameterValuesAsInteger(FhirContext theCtx, IBaseParameters theParameters, String theParameterName)getNamedParameterValuesAsString(FhirContext theCtx, IBaseParameters theParameters, String theParameterName)getParameterPart(FhirContext theCtx, IBase theParameter, String theParameterName)getParameterPartValue(FhirContext theCtx, IBase theParameter, String theParameterName)static StringgetParameterPartValueAsString(FhirContext theCtx, IBase theParameter, String theParameterName)static IBaseParametersnewInstance(FhirContext theContext)
-
Constructor Details
-
ParametersUtil
public ParametersUtil()
-
-
Method Details
-
getNamedParameterValuesAsString
public static List<String> getNamedParameterValuesAsString(FhirContext theCtx, IBaseParameters theParameters, String theParameterName) -
getNamedParameterValuesAsInteger
public static List<Integer> getNamedParameterValuesAsInteger(FhirContext theCtx, IBaseParameters theParameters, String theParameterName) -
getNamedParameterValueAsInteger
public static Optional<Integer> getNamedParameterValueAsInteger(FhirContext theCtx, IBaseParameters theParameters, String theParameterName) -
getNamedParameters
public static List<IBase> getNamedParameters(FhirContext theCtx, IBaseResource theParameters, String theParameterName) -
getParameterPart
public static Optional<IBase> getParameterPart(FhirContext theCtx, IBase theParameter, String theParameterName) -
getParameterPartValue
public static Optional<IBase> getParameterPartValue(FhirContext theCtx, IBase theParameter, String theParameterName) -
getParameterPartValueAsString
public static String getParameterPartValueAsString(FhirContext theCtx, IBase theParameter, String theParameterName) -
addParameterToParameters
public static void addParameterToParameters(FhirContext theContext, IBaseParameters theParameters, String theName, Object theValue)Add a parameter value to a Parameters resource -
addParameterToParameters
public static void addParameterToParameters(FhirContext theContext, IBaseParameters theParameters, String theName, String thePrimitiveDatatype, String theValue)Add a parameter value to a Parameters resource- Parameters:
theContext- The FhirContexttheParameters- The Parameters resourcetheName- The parameter namethePrimitiveDatatype- The datatype, e.g. "string", or "uri"theValue- The value
-
createString
-
createUri
-
createCode
-
newInstance
-
addParameterToParametersBoolean
public static void addParameterToParametersBoolean(FhirContext theCtx, IBaseParameters theParameters, String theName, boolean theValue) -
addParameterToParametersCode
public static void addParameterToParametersCode(FhirContext theCtx, IBaseParameters theParameters, String theName, String theValue) -
addParameterToParametersInteger
public static void addParameterToParametersInteger(FhirContext theCtx, IBaseParameters theParameters, String theName, int theValue) -
addParameterToParametersLong
public static void addParameterToParametersLong(FhirContext theCtx, IBaseParameters theParameters, String theName, long theValue) -
addParameterToParametersDecimal
public static void addParameterToParametersDecimal(FhirContext theCtx, IBaseParameters theParameters, String theName, BigDecimal theValue) -
addParameterToParametersReference
public static void addParameterToParametersReference(FhirContext theCtx, IBaseParameters theParameters, String theName, String theReference) -
addParameterToParametersString
public static void addParameterToParametersString(FhirContext theCtx, IBaseParameters theParameters, String theName, String theValue) -
addParameterToParametersUri
public static void addParameterToParametersUri(FhirContext theCtx, IBaseParameters theParameters, String theName, String theValue) -
addParameterToParameters
public static IBase addParameterToParameters(FhirContext theContext, IBaseParameters theParameters, String theName)Add a parameter with no value (typically because we'll be adding sub-parameters) -
addPartCode
public static void addPartCode(FhirContext theContext, IBase theParameter, String theName, String theCode) -
addPartInteger
public static void addPartInteger(FhirContext theContext, IBase theParameter, String theName, Integer theInteger) -
addPartString
public static void addPartString(FhirContext theContext, IBase theParameter, String theName, String theValue) -
addPartBoolean
public static void addPartBoolean(FhirContext theContext, IBase theParameter, String theName, Boolean theValue) -
addPartDecimal
public static void addPartDecimal(FhirContext theContext, IBase theParameter, String theName, Double theValue) -
addPartCoding
public static void addPartCoding(FhirContext theContext, IBase theParameter, String theName, String theSystem, String theCode, String theDisplay) -
addPart
public static void addPart(FhirContext theContext, IBase theParameter, String theName, IBase theValue) -
addPartResource
public static void addPartResource(FhirContext theContext, IBase theParameter, String theName, IBaseResource theValue) -
getNamedParameterPartAsString
public static List<String> getNamedParameterPartAsString(FhirContext theCtx, IBaseParameters theParameters, String thePartName, String theParameterName) -
extractDescription
-
extractDescription
-
extractShortDefinition
-
extractDescription
-
extractExamples
-