Package com.atlassian.confluence.core
Interface PluginDataSourceFactory
- All Known Implementing Classes:
DefaultPluginDataSourceFactory
public interface PluginDataSourceFactory
Produces
DataSources for plugin module resources.- Since:
- 5.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic interfaceA view on theResourceDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionOptional<javax.activation.DataSource>getResourceFromModuleByName(String moduleKey, String resourceName) Extract a resource identified by name from a module and expose it asDataSource.getResourcesFromModules(String moduleKey) Extract all resources from a module and expose them asDataSources.getResourcesFromModules(String moduleKey, @Nullable Predicate<PluginDataSourceFactory.ResourceView> filter) Extract resources from a module and expose them asDataSources.
-
Method Details
-
getResourcesFromModules
Optional<Iterable<javax.activation.DataSource>> getResourcesFromModules(String moduleKey, @Nullable Predicate<PluginDataSourceFactory.ResourceView> filter) Extract resources from a module and expose them asDataSources.- Parameters:
moduleKey- the key used to locate the modulefilter- an optional filter for resources- Returns:
- maybe the
DataSourcesif the module could be located, the container is empty if the filter did not match anything - Since:
- 7.0.1
-
getResourcesFromModules
Extract all resources from a module and expose them asDataSources.- Since:
- 7.0.1
- See Also:
-
getResourceFromModuleByName
Optional<javax.activation.DataSource> getResourceFromModuleByName(String moduleKey, String resourceName) Extract a resource identified by name from a module and expose it asDataSource.- Parameters:
moduleKey- the key used to locate the moduleresourceName- the name of the resource- Returns:
- maybe the
DataSourceif the module could be located and contained a resource with the given name - Since:
- 7.0.1
-