
Package ca.uhn.fhir.rest.server.util
Interface ISearchParamRegistry
- All Superinterfaces:
IResourceRepositoryCache
- All Known Implementing Classes:
FhirContextSearchParamRegistry,RestfulServerConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDescribes the context for looking up individual search parameters or lists of search parameters. -
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParamById(String theResourceName, org.hl7.fhir.instance.model.api.IIdType theId) default List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(String theResourceName, ca.uhn.fhir.context.ComboSearchParamType theParamType, ISearchParamRegistry.SearchParamLookupContextEnum theContext) default List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(String theResourceName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) default List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(String theResourceName, Set<String> theParamNames, ISearchParamRegistry.SearchParamLookupContextEnum theContext) default ca.uhn.fhir.context.RuntimeSearchParamgetActiveSearchParam(String theResourceName, String theParamName) Deprecated, for removal: This API element is subject to removal in a future version.ca.uhn.fhir.context.RuntimeSearchParamgetActiveSearchParam(String theResourceName, String theParamName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) ca.uhn.fhir.context.RuntimeSearchParamgetActiveSearchParamByUrl(String theUrl, ISearchParamRegistry.SearchParamLookupContextEnum theContext) Fetch a SearchParameter by URLdefault ResourceSearchParamsgetActiveSearchParams(String theResourceName) Deprecated, for removal: This API element is subject to removal in a future version.getActiveSearchParams(String theResourceName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) default ca.uhn.fhir.context.RuntimeSearchParamgetRuntimeSearchParam(String theResourceType, String theParamName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) Find a search param for a resource.default ResourceSearchParamsgetRuntimeSearchParams(String theResourceType, ISearchParamRegistry.SearchParamLookupContextEnum theContext) Get all the search params for a resource.default Collection<String> getValidSearchParameterNamesIncludingMeta(String theResourceName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) Returns a collection containing all of the valid active search parameters.default booleanhasActiveSearchParam(String theResourceType, String theParamName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) Is there an active search param with the given name for the given resource typestatic booleanisAllowedForContext(ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, ISearchParamRegistry.SearchParamLookupContextEnum theContext) default booleanReturn true if this registry is initialized and ready to handle searches and use its cache.default voidsetPhoneticEncoder(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 interface ca.uhn.fhir.rest.server.util.IResourceRepositoryCache
forceRefresh, requestRefresh
-
Method Details
-
isInitialized
Return true if this registry is initialized and ready to handle searches and use its cache. Return false if cache has not been initialized. -
getActiveSearchParam
@Deprecated(since="8.0.0", forRemoval=true) default ca.uhn.fhir.context.RuntimeSearchParam getActiveSearchParam(String theResourceName, String theParamName) Deprecated, for removal: This API element is subject to removal in a future version. -
getActiveSearchParam
ca.uhn.fhir.context.RuntimeSearchParam getActiveSearchParam(@Nonnull String theResourceName, @Nonnull String theParamName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - 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
@Deprecated(since="8.0.0", forRemoval=true) default ResourceSearchParams getActiveSearchParams(String theResourceName) Deprecated, for removal: This API element is subject to removal in a future version. -
getActiveSearchParams
ResourceSearchParams getActiveSearchParams(@Nonnull String theResourceName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - 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
-
setPhoneticEncoder
When indexing a HumanName, if a StringEncoder is set in the context, then the "phonetic" search parameter will normalize the String using this encoder.- Since:
- 5.1.0
-
getActiveComboSearchParams
default List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Parameters:
theContext- The context to return active search params for, or null to return any active search params
-
getActiveComboSearchParams
default List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull ca.uhn.fhir.context.ComboSearchParamType theParamType, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) -
getActiveComboSearchParamById
default Optional<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParamById(@Nonnull String theResourceName, @Nonnull org.hl7.fhir.instance.model.api.IIdType theId) -
getActiveComboSearchParams
default List<ca.uhn.fhir.context.RuntimeSearchParam> getActiveComboSearchParams(@Nonnull String theResourceName, @Nonnull Set<String> theParamNames, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) - Parameters:
theContext- The context to return active search params for, or null to return any active search params
-
getValidSearchParameterNamesIncludingMeta
default Collection<String> getValidSearchParameterNamesIncludingMeta(@Nonnull String theResourceName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) Returns a collection containing all of the valid active search parameters. This method is intended for creating error messages for users as opposed to actual search processing. It will include meta parameters such as_idand_lastUpdated.- Parameters:
theContext- The context to return active search params for, or null to return any active search params
-
getActiveSearchParamByUrl
@Nullable ca.uhn.fhir.context.RuntimeSearchParam getActiveSearchParamByUrl(@Nonnull String theUrl, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) Fetch a SearchParameter by URL- Parameters:
theContext- The context to return active search params for, or null to return any active search params- Returns:
- Returns
nullif it can't be found
-
getRuntimeSearchParam
default ca.uhn.fhir.context.RuntimeSearchParam getRuntimeSearchParam(@Nonnull String theResourceType, @Nonnull String theParamName, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) Find a search param for a resource. First, check the resource itself, then check the top-level `Resource` resource.- Parameters:
theResourceType- the resource type.theParamName- the search parameter name.theContext- The context to return active search params for, or null to return any active search params- Returns:
- the
RuntimeSearchParamthat is found.
-
getRuntimeSearchParams
default ResourceSearchParams getRuntimeSearchParams(@Nonnull String theResourceType, @Nonnull ISearchParamRegistry.SearchParamLookupContextEnum theContext) Get all the search params for a resource. First, check the resource itself, then check the top-level `Resource` resource and combine the two.- Parameters:
theResourceType- the resource type.theContext- The context to return active search params for, or null to return any active search params- Returns:
- the
ResourceSearchParamsthat has all the search params.
-
hasActiveSearchParam
default boolean hasActiveSearchParam(String theResourceType, String theParamName, ISearchParamRegistry.SearchParamLookupContextEnum theContext) Is there an active search param with the given name for the given resource type- Since:
- 8.4.0
-
isAllowedForContext
static boolean isAllowedForContext(@Nonnull ca.uhn.fhir.context.RuntimeSearchParam theSearchParam, @Nullable ISearchParamRegistry.SearchParamLookupContextEnum theContext)
-
getActiveSearchParam(String, String, SearchParamLookupContextEnum)