Package com.atlassian.confluence.core
Interface PluginDataSourceFactory
-
- All Known Implementing Classes:
DefaultPluginDataSourceFactory
public interface PluginDataSourceFactory
ProducesDataSources
for plugin moduleresources
.- Since:
- 5.2
- See Also:
DataSourceFactory.forPlugin(String)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PluginDataSourceFactory.FilterByType
static interface
PluginDataSourceFactory.ResourceView
A view on theResourceDescriptor
.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default Optional<javax.activation.DataSource>
getResourceFromModuleByName(String moduleKey, String resourceName)
Extract a resource identified by name from a module and expose it asDataSource
.default Optional<Iterable<javax.activation.DataSource>>
getResourcesFromModules(String moduleKey)
Extract all resources from a module and expose them asDataSources
.Optional<Iterable<javax.activation.DataSource>>
getResourcesFromModules(String moduleKey, @Nullable Predicate<PluginDataSourceFactory.ResourceView> filter)
Extract resources from a module and expose them asDataSources
.com.atlassian.fugue.Maybe<javax.activation.DataSource>
resourceFromModuleByName(String moduleKey, String resourceName)
Deprecated.since 7.0.1.com.atlassian.fugue.Maybe<Iterable<javax.activation.DataSource>>
resourcesFromModules(String moduleKey)
Deprecated.since 7.0.1.
-
-
-
Method Detail
-
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
DataSources
if the module could be located, the container is empty if the filter did not match anything - Since:
- 7.0.1
-
resourcesFromModules
@Deprecated com.atlassian.fugue.Maybe<Iterable<javax.activation.DataSource>> resourcesFromModules(String moduleKey)
Deprecated.since 7.0.1. UsegetResourcesFromModules(String)
Extract all resources from a module and expose them asDataSources
.
-
getResourcesFromModules
default Optional<Iterable<javax.activation.DataSource>> getResourcesFromModules(String moduleKey)
Extract all resources from a module and expose them asDataSources
.- Since:
- 7.0.1
- See Also:
getResourcesFromModules(String, Predicate)
-
resourceFromModuleByName
@Deprecated com.atlassian.fugue.Maybe<javax.activation.DataSource> resourceFromModuleByName(String moduleKey, String resourceName)
Deprecated.since 7.0.1. UsegetResourceFromModuleByName(String, String)
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
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 asDataSource
.- Parameters:
moduleKey
- the key used to locate the moduleresourceName
- 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
-
-