Class SearchParamRegistryImpl
java.lang.Object
ca.uhn.fhir.jpa.searchparam.registry.SearchParamRegistryImpl
- All Implemented Interfaces:
IResourceChangeListener
,ISearchParamHashIdentityRegistry
,ISearchParamRegistryController
,ca.uhn.fhir.rest.server.util.ISearchParamRegistry
public class SearchParamRegistryImpl
extends Object
implements ca.uhn.fhir.rest.server.util.ISearchParamRegistry, IResourceChangeListener, ISearchParamRegistryController, ISearchParamHashIdentityRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface ca.uhn.fhir.rest.server.util.ISearchParamRegistry
ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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, ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) List
<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams
(String theResourceName, ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) List
<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams
(String theResourceName, Set<String> theParamNames, ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) ca.uhn.fhir.context.RuntimeSearchParam
getActiveSearchParam
(String theResourceName, String theParamName, ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) ca.uhn.fhir.context.RuntimeSearchParam
getActiveSearchParamByUrl
(String theUrl, ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) ca.uhn.fhir.rest.server.util.ResourceSearchParams
getActiveSearchParams
(String theResourceName, ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) Optional
<ca.uhn.fhir.rest.server.util.IndexedSearchParam> getIndexedSearchParamByHashIdentity
(Long theHashIdentity) void
handleChange
(IResourceChangeEvent theResourceChangeEvent) Called by theIResourceChangeListenerRegistry
when matching resource changes are detectedvoid
handleInit
(Collection<org.hl7.fhir.instance.model.api.IIdType> theResourceIds) This method is called withinResourceChangeListenerCacheRefresherImpl.LOCAL_REFRESH_INTERVAL_MS
of a listener registrationboolean
void
There is a circular reference between this class and the ResourceChangeListenerRegistry: SearchParamRegistryImpl -> ResourceChangeListenerRegistry -> InMemoryResourceMatcher -> SearchParamRegistryImpl.void
void
void
setActiveSearchParams
(RuntimeSearchParamCache theSearchParams) void
setFhirContext
(ca.uhn.fhir.context.FhirContext theFhirContext) void
setPhoneticEncoder
(ca.uhn.fhir.context.phonetic.IPhoneticEncoder thePhoneticEncoder) All SearchParameters with the name "phonetic" encode the normalized index value using this phonetic encoder.void
setResourceChangeListenerRegistry
(IResourceChangeListenerRegistry theResourceChangeListenerRegistry) void
setSearchParameterCanonicalizerForUnitTest
(SearchParameterCanonicalizer theSearchParameterCanonicalizerForUnitTest) void
setStorageSettings
(StorageSettings theStorageSettings) void
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.ISearchParamRegistry
getActiveSearchParam, getActiveSearchParams, getRuntimeSearchParam, getRuntimeSearchParams, getValidSearchParameterNamesIncludingMeta
-
Field Details
-
NON_DISABLEABLE_SEARCH_PARAMS
-
MAX_MANAGED_PARAM_COUNT
- See Also:
-
-
Constructor Details
-
SearchParamRegistryImpl
public SearchParamRegistryImpl()Constructor
-
-
Method Details
-
getActiveSearchParam
public ca.uhn.fhir.context.RuntimeSearchParam getActiveSearchParam(@Nonnull String theResourceName, @Nonnull String theParamName, @Nonnull ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveSearchParam
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
getActiveSearchParams
@Nonnull public ca.uhn.fhir.rest.server.util.ResourceSearchParams getActiveSearchParams(@Nonnull String theResourceName, @Nonnull ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveSearchParams
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
getActiveComboSearchParams
public List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveComboSearchParams
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
getActiveComboSearchParams
public List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull ca.uhn.fhir.context.ComboSearchParamType theParamType, @Nonnull ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveComboSearchParams
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
getActiveComboSearchParams
public List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull Set<String> theParamNames, @Nonnull ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveComboSearchParams
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
getIndexedSearchParamByHashIdentity
public Optional<ca.uhn.fhir.rest.server.util.IndexedSearchParam> getIndexedSearchParamByHashIdentity(Long theHashIdentity) - Specified by:
getIndexedSearchParamByHashIdentity
in interfaceISearchParamHashIdentityRegistry
-
getActiveSearchParamByUrl
@Nullable public ca.uhn.fhir.context.RuntimeSearchParam getActiveSearchParamByUrl(@Nonnull String theUrl, @Nonnull ca.uhn.fhir.rest.server.util.ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Specified by:
getActiveSearchParamByUrl
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
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 interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
setFhirContext
-
setStorageSettings
-
requestRefresh
- Specified by:
requestRefresh
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
forceRefresh
- Specified by:
forceRefresh
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
refreshCacheIfNecessary
- Specified by:
refreshCacheIfNecessary
in interfaceISearchParamRegistryController
-
setResourceChangeListenerRegistry
public void setResourceChangeListenerRegistry(IResourceChangeListenerRegistry theResourceChangeListenerRegistry) -
registerListener
There is a circular reference between this class and the ResourceChangeListenerRegistry: SearchParamRegistryImpl -> ResourceChangeListenerRegistry -> InMemoryResourceMatcher -> SearchParamRegistryImpl. Since we only need this once on boot-up, we delay until ContextRefreshedEvent. -
unregisterListener
-
getActiveSearchParams
-
setActiveSearchParams
-
setPhoneticEncoder
All SearchParameters with the name "phonetic" encode the normalized index value using this phonetic encoder.- Specified by:
setPhoneticEncoder
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
- Since:
- 5.1.0
-
handleChange
Description copied from interface:IResourceChangeListener
Called by theIResourceChangeListenerRegistry
when matching resource changes are detected- Specified by:
handleChange
in interfaceIResourceChangeListener
-
handleInit
Description copied from interface:IResourceChangeListener
This method is called withinResourceChangeListenerCacheRefresherImpl.LOCAL_REFRESH_INTERVAL_MS
of a listener registration- Specified by:
handleInit
in interfaceIResourceChangeListener
- Parameters:
theResourceIds
- the ids of all resources that match the search parameters the listener was registered with
-
isInitialized
- Specified by:
isInitialized
in interfaceca.uhn.fhir.rest.server.util.ISearchParamRegistry
-
resetForUnitTest
-
setSearchParameterCanonicalizerForUnitTest
public void setSearchParameterCanonicalizerForUnitTest(SearchParameterCanonicalizer theSearchParameterCanonicalizerForUnitTest)
-