Class AbstractRegistryResourceProvider

    • Constructor Detail

      • AbstractRegistryResourceProvider

        public AbstractRegistryResourceProvider()
    • Method Detail

      • getRegistryResource

        public final FHIRRegistryResource getRegistryResource​(Class<? extends Resource> resourceType,
                                                              String url,
                                                              String version)
        Description copied from interface: FHIRRegistryResourceProvider
        Get the registry resource from this provider for the given resource type, url and version

        If the version is null, then the latest version of the registry resource is returned (if available)

        Specified by:
        getRegistryResource in interface FHIRRegistryResourceProvider
        Parameters:
        resourceType - the resource type of the registry resource
        url - the url of the registry resource
        version - 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​(String url,
                                                          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 List<FHIRRegistryResource> getRegistryResources​(Class<? extends Resource> resourceType,
                                                                           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