Package com.ibm.fhir.config
Class FHIRConfigHelper
- java.lang.Object
-
- com.ibm.fhir.config.FHIRConfigHelper
-
public class FHIRConfigHelper extends java.lang.ObjectThis class contains a set of static helper methods related to configuration parameters. The functions in this class will try to first retrieve a config property from the current tenant's configuration, then (if not found) look in the "default" configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRESOURCE_RESOURCEstatic java.lang.StringSEARCH_PROPERTY_TYPE_INCLUDEstatic java.lang.StringSEARCH_PROPERTY_TYPE_REVINCLUDE
-
Constructor Summary
Constructors Constructor Description FHIRConfigHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.BooleangetBooleanProperty(java.lang.String propertyName, java.lang.Boolean defaultValue)static java.lang.DoublegetDoubleProperty(java.lang.String propertyName, java.lang.Double defaultValue)static java.lang.IntegergetIntProperty(java.lang.String propertyName, java.lang.Integer defaultValue)static PropertyGroupgetPropertyGroup(java.lang.String propertyName)static java.util.List<java.lang.String>getSearchPropertyRestrictions(java.lang.String resourceType, java.lang.String propertyType)Retrieves the search property restrictions.static java.util.List<java.lang.String>getStringListProperty(java.lang.String propertyName)static java.lang.StringgetStringProperty(java.lang.String propertyName, java.lang.String defaultValue)static java.util.Set<java.lang.String>getSupportedResourceTypes()Get the set of supported resource types for tenantId in the FHIRRequestContext
-
-
-
Field Detail
-
SEARCH_PROPERTY_TYPE_INCLUDE
public static final java.lang.String SEARCH_PROPERTY_TYPE_INCLUDE
- See Also:
- Constant Field Values
-
SEARCH_PROPERTY_TYPE_REVINCLUDE
public static final java.lang.String SEARCH_PROPERTY_TYPE_REVINCLUDE
- See Also:
- Constant Field Values
-
RESOURCE_RESOURCE
public static final java.lang.String RESOURCE_RESOURCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStringProperty
public static java.lang.String getStringProperty(java.lang.String propertyName, java.lang.String defaultValue)
-
getBooleanProperty
public static java.lang.Boolean getBooleanProperty(java.lang.String propertyName, java.lang.Boolean defaultValue)
-
getIntProperty
public static java.lang.Integer getIntProperty(java.lang.String propertyName, java.lang.Integer defaultValue)
-
getDoubleProperty
public static java.lang.Double getDoubleProperty(java.lang.String propertyName, java.lang.Double defaultValue)
-
getStringListProperty
public static java.util.List<java.lang.String> getStringListProperty(java.lang.String propertyName)
-
getPropertyGroup
public static PropertyGroup getPropertyGroup(java.lang.String propertyName)
-
getSupportedResourceTypes
public static java.util.Set<java.lang.String> getSupportedResourceTypes()
Get the set of supported resource types for tenantId in the FHIRRequestContext- Returns:
- an immutable set of resource type names that isn't null
- Throws:
java.lang.IllegalStateException- if there is an unexpected issue while processing the config
-
getSearchPropertyRestrictions
public static java.util.List<java.lang.String> getSearchPropertyRestrictions(java.lang.String resourceType, java.lang.String propertyType) throws java.lang.ExceptionRetrieves the search property restrictions.- Parameters:
resourceType- the resource typepropertyType- the property type, either _include or _revinclude- Returns:
- list of allowed values for the search property, or null if no restrictions
- Throws:
java.lang.Exception- an exception
-
-