
Package ca.uhn.fhir.rest.server.util
Class FhirContextSearchParamRegistry
java.lang.Object
ca.uhn.fhir.rest.server.util.FhirContextSearchParamRegistry
- All Implemented Interfaces:
IResourceRepositoryCache
,ISearchParamRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface ca.uhn.fhir.rest.server.util.ISearchParamRegistry
ISearchParamRegistry.SearchParamLookupContextEnum
-
Constructor Summary
ConstructorsConstructorDescriptionFhirContextSearchParamRegistry
(ca.uhn.fhir.context.FhirContext theCtx) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSearchParam
(ca.uhn.fhir.context.RuntimeSearchParam theSearchParam) void
Force an immediate cache refresh on the current thread so that when the method returns, the cache will contain all the resources currently in the database.Optional
<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParamById
(String theResourceName, org.hl7.fhir.instance.model.api.IIdType theId) List
<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams
(String theResourceName, ca.uhn.fhir.context.ComboSearchParamType theParamType, ISearchParamRegistry.SearchParamLookupContextEnum theContext) List
<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams
(String theResourceName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) List
<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams
(String theResourceName, Set<String> theParamNames, ISearchParamRegistry.SearchParamLookupContextEnum theContext) ca.uhn.fhir.context.RuntimeSearchParam
getActiveSearchParam
(String theResourceName, String theParamName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) ca.uhn.fhir.context.RuntimeSearchParam
getActiveSearchParamByUrl
(String theUrl, ISearchParamRegistry.SearchParamLookupContextEnum theContext) Fetch a SearchParameter by URLgetActiveSearchParams
(String theResourceName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) void
setPhoneticEncoder
(ca.uhn.fhir.context.phonetic.IPhoneticEncoder thePhoneticEncoder) When indexing a HumanName, if a StringEncoder is set in the context, then the "phonetic" search parameter will normalize the String using this encoder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.rest.server.util.IResourceRepositoryCache
requestRefresh
Methods inherited from interface ca.uhn.fhir.rest.server.util.ISearchParamRegistry
getActiveSearchParam, getActiveSearchParams, getRuntimeSearchParam, getRuntimeSearchParams, getValidSearchParameterNamesIncludingMeta, isInitialized
-
Constructor Details
-
FhirContextSearchParamRegistry
Constructor
-
-
Method Details
-
forceRefresh
Description copied from interface:IResourceRepositoryCache
Force an immediate cache refresh on the current thread so that when the method returns, the cache will contain all the resources currently in the database. ONLY USE IN TESTS.- Specified by:
forceRefresh
in interfaceIResourceRepositoryCache
-
getActiveSearchParam
public ca.uhn.fhir.context.RuntimeSearchParam getActiveSearchParam(@Nonnull String theResourceName, @Nonnull String theParamName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveSearchParam
in interfaceISearchParamRegistry
- Parameters:
theContext
- The context to return active search params for, or null to return any active search params- Returns:
- Returns null if no match
-
getActiveSearchParams
public ResourceSearchParams getActiveSearchParams(@Nonnull String theResourceName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveSearchParams
in interfaceISearchParamRegistry
- Parameters:
theContext
- The context to return active search params for, or null to return any active search params- Returns:
- Returns all active search params for the given resource
-
addSearchParam
-
getActiveComboSearchParams
public List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull Set<String> theParamNames, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveComboSearchParams
in interfaceISearchParamRegistry
- Parameters:
theContext
- The context to return active search params for, or null to return any active search params
-
getActiveSearchParamByUrl
@Nullable public ca.uhn.fhir.context.RuntimeSearchParam getActiveSearchParamByUrl(@Nonnull String theUrl, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) Description copied from interface:ISearchParamRegistry
Fetch a SearchParameter by URL- Specified by:
getActiveSearchParamByUrl
in interfaceISearchParamRegistry
- Parameters:
theContext
- The context to return active search params for, or null to return any active search params- Returns:
- Returns
null
if it can't be found
-
getActiveComboSearchParams
public List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveComboSearchParams
in interfaceISearchParamRegistry
- Parameters:
theContext
- The context to return active search params for, or null to return any active search params
-
getActiveComboSearchParams
public List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull ca.uhn.fhir.context.ComboSearchParamType theParamType, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveComboSearchParams
in interfaceISearchParamRegistry
-
getActiveComboSearchParamById
public Optional<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParamById(@Nonnull String theResourceName, @Nonnull org.hl7.fhir.instance.model.api.IIdType theId) - Specified by:
getActiveComboSearchParamById
in interfaceISearchParamRegistry
-
setPhoneticEncoder
Description copied from interface:ISearchParamRegistry
When indexing a HumanName, if a StringEncoder is set in the context, then the "phonetic" search parameter will normalize the String using this encoder.- Specified by:
setPhoneticEncoder
in interfaceISearchParamRegistry
-