Package com.atlassian.confluence.core
Class DefaultPluginDataSourceFactory
- java.lang.Object
-
- com.atlassian.confluence.core.DefaultPluginDataSourceFactory
-
- All Implemented Interfaces:
PluginDataSourceFactory
public class DefaultPluginDataSourceFactory extends Object implements PluginDataSourceFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.core.PluginDataSourceFactory
PluginDataSourceFactory.FilterByType, PluginDataSourceFactory.ResourceView
-
-
Constructor Summary
Constructors Constructor Description DefaultPluginDataSourceFactory(javax.activation.FileTypeMap fileTypeMap, com.google.common.base.Function<com.atlassian.fugue.Pair<com.atlassian.plugin.Plugin,PluginDataSourceFactory.ResourceView>,InputStream> resourceStreamFactory, com.atlassian.plugin.Plugin plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.core.PluginDataSourceFactory
getResourceFromModuleByName, getResourcesFromModules
-
-
-
-
Constructor Detail
-
DefaultPluginDataSourceFactory
public DefaultPluginDataSourceFactory(javax.activation.FileTypeMap fileTypeMap, com.google.common.base.Function<com.atlassian.fugue.Pair<com.atlassian.plugin.Plugin,PluginDataSourceFactory.ResourceView>,InputStream> resourceStreamFactory, com.atlassian.plugin.Plugin plugin)
-
-
Method Detail
-
resourcesFromModules
@Deprecated public com.atlassian.fugue.Maybe<Iterable<javax.activation.DataSource>> resourcesFromModules(String moduleKey)
Deprecated.since 7.0.1. UsePluginDataSourceFactory.getResourcesFromModules(String)Description copied from interface:PluginDataSourceFactoryExtract all resources from a module and expose them asDataSources.- Specified by:
resourcesFromModulesin interfacePluginDataSourceFactory- See Also:
PluginDataSourceFactory.getResourcesFromModules(String, Predicate)
-
getResourcesFromModules
public Optional<Iterable<javax.activation.DataSource>> getResourcesFromModules(String moduleKey, @Nullable Predicate<PluginDataSourceFactory.ResourceView> filter)
Description copied from interface:PluginDataSourceFactoryExtract resources from a module and expose them asDataSources.- Specified by:
getResourcesFromModulesin interfacePluginDataSourceFactory- 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
-
resourceFromModuleByName
@Deprecated public com.atlassian.fugue.Maybe<javax.activation.DataSource> resourceFromModuleByName(String moduleKey, String resourceName)
Deprecated.since 7.0.1. UsePluginDataSourceFactory.getResourceFromModuleByName(String, String)Description copied from interface:PluginDataSourceFactoryExtract a resource identified by name from a module and expose it asDataSource.- Specified by:
resourceFromModuleByNamein interfacePluginDataSourceFactory- 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
-
-