Interface PluginDataSourceFactory

    • Method Detail

      • getResourcesFromModules

        Optional<Iterable<javax.activation.DataSource>> getResourcesFromModules​(String moduleKey,
                                                                                @Nullable Predicate<PluginDataSourceFactory.ResourceView> filter)
        Extract resources from a module and expose them as DataSources.
        Parameters:
        moduleKey - the key used to locate the module
        filter - an optional filter for resources
        Returns:
        maybe the DataSources if the module could be located, the container is empty if the filter did not match anything
        Since:
        7.0.1
      • resourceFromModuleByName

        @Deprecated
        com.atlassian.fugue.Maybe<javax.activation.DataSource> resourceFromModuleByName​(String moduleKey,
                                                                                        String resourceName)
        Deprecated.
        Extract a resource identified by name from a module and expose it as DataSource.
        Parameters:
        moduleKey - the key used to locate the module
        resourceName - the name of the resource
        Returns:
        maybe the DataSource if the module could be located and contained a resource with the given name
      • getResourceFromModuleByName

        default Optional<javax.activation.DataSource> getResourceFromModuleByName​(String moduleKey,
                                                                                  String resourceName)
        Extract a resource identified by name from a module and expose it as DataSource.
        Parameters:
        moduleKey - the key used to locate the module
        resourceName - the name of the resource
        Returns:
        maybe the DataSource if the module could be located and contained a resource with the given name
        Since:
        7.0.1