Class AbstractRegistryResourceProvider
- java.lang.Object
-
- org.linuxforhealth.fhir.registry.spi.AbstractRegistryResourceProvider
-
- All Implemented Interfaces:
FHIRRegistryResourceProvider
- Direct Known Subclasses:
ExtensionSearchParametersResourceProvider
,PackageRegistryResourceProvider
,ServerRegistryResourceProvider
public abstract class AbstractRegistryResourceProvider extends java.lang.Object implements FHIRRegistryResourceProvider
An abstract base class forFHIRRegistryResourceProvider
implementations
-
-
Constructor Summary
Constructors Constructor Description AbstractRegistryResourceProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.Collection<FHIRRegistryResource>
getProfileResources(java.lang.String type)
Get the profile resources from this provider that constrain the given resource typeFHIRRegistryResource
getRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String url, java.lang.String version)
Get the registry resource from this provider for the given resource type, url and versionabstract java.util.Collection<FHIRRegistryResource>
getRegistryResources()
Get all the registry resources from this providerabstract java.util.Collection<FHIRRegistryResource>
getRegistryResources(java.lang.Class<? extends Resource> resourceType)
Get the registry resources from this provider for the given resource typeprotected abstract java.util.List<FHIRRegistryResource>
getRegistryResources(java.lang.Class<? extends Resource> resourceType, java.lang.String url)
Return a sorted list of FHIRRegistryResource with the passed canonical urlabstract java.util.Collection<FHIRRegistryResource>
getSearchParameterResources(java.lang.String type)
Get the search parameter resources from this provider with the given search parameter type (e.g.protected <T extends Resource>
TloadFromRegistry(java.lang.String url, java.lang.Class<T> resourceType)
facilitates the retrieval of a resource from the registry allowing the provider to be excluded from the resource retrieval.-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linuxforhealth.fhir.registry.spi.FHIRRegistryResourceProvider
getProfileResources, init
-
-
-
-
Method Detail
-
getRegistryResource
public final FHIRRegistryResource getRegistryResource(java.lang.Class<? extends Resource> resourceType, java.lang.String url, java.lang.String version)
Description copied from interface:FHIRRegistryResourceProvider
Get the registry resource from this provider for the given resource type, url and versionIf the version is null, then the latest version of the registry resource is returned (if available)
- Specified by:
getRegistryResource
in interfaceFHIRRegistryResourceProvider
- Parameters:
resourceType
- the resource type of the registry resourceurl
- the url of the registry resourceversion
- the version of the registry resource (optional)- Returns:
- the registry resource from this provider for the given resource type, url and version if exists, null otherwise
-
loadFromRegistry
protected <T extends Resource> T loadFromRegistry(java.lang.String url, java.lang.Class<T> resourceType)
facilitates the retrieval of a resource from the registry allowing the provider to be excluded from the resource retrieval. designed to be used at startup.- Type Parameters:
T
-- Parameters:
url
-resourceType
-- Returns:
-
getRegistryResources
protected abstract java.util.List<FHIRRegistryResource> getRegistryResources(java.lang.Class<? extends Resource> resourceType, java.lang.String url)
Return a sorted list of FHIRRegistryResource with the passed canonical url- Parameters:
resourceType
-url
- the canonical url for this resource (without version suffix)- Returns:
- a list of FHIRRegistryResources with this url, sorted from low to high by version
-
getRegistryResources
public abstract java.util.Collection<FHIRRegistryResource> getRegistryResources(java.lang.Class<? extends Resource> resourceType)
Description copied from interface:FHIRRegistryResourceProvider
Get the registry resources from this provider for the given resource type- Specified by:
getRegistryResources
in interfaceFHIRRegistryResourceProvider
- Parameters:
resourceType
- the resource type of the registry resource- Returns:
- the registry resources from this provider for the given resource type; never null
-
getRegistryResources
public abstract java.util.Collection<FHIRRegistryResource> getRegistryResources()
Description copied from interface:FHIRRegistryResourceProvider
Get all the registry resources from this provider- Specified by:
getRegistryResources
in interfaceFHIRRegistryResourceProvider
- Returns:
- all of the registry resources from this provider; never null
-
getProfileResources
public abstract java.util.Collection<FHIRRegistryResource> getProfileResources(java.lang.String type)
Description copied from interface:FHIRRegistryResourceProvider
Get the profile resources from this provider that constrain the given resource type- Specified by:
getProfileResources
in interfaceFHIRRegistryResourceProvider
- Parameters:
type
- the constrained resource type- Returns:
- the profile resources from this provider that constrain the given resource type; never null
-
getSearchParameterResources
public abstract java.util.Collection<FHIRRegistryResource> getSearchParameterResources(java.lang.String type)
Description copied from interface:FHIRRegistryResourceProvider
Get the search parameter resources from this provider with the given search parameter type (e.g. string, token, etc.)- Specified by:
getSearchParameterResources
in interfaceFHIRRegistryResourceProvider
- Parameters:
type
- the search parameter type- Returns:
- the search parameter resources from this provider with the given search parameter type; never null
-
-