public class DefaultPluginDataSourceFactory extends Object implements PluginDataSourceFactory
PluginDataSourceFactory.FilterByType, PluginDataSourceFactory.ResourceView
Constructor and Description |
---|
DefaultPluginDataSourceFactory(FileTypeMap fileTypeMap,
com.google.common.base.Function<com.atlassian.fugue.Pair<com.atlassian.plugin.Plugin,PluginDataSourceFactory.ResourceView>,InputStream> resourceStreamFactory,
com.atlassian.plugin.Plugin plugin) |
Modifier and Type | Method and Description |
---|---|
Optional<Iterable<DataSource>> |
getResourcesFromModules(String moduleKey,
@Nullable Predicate<PluginDataSourceFactory.ResourceView> filter)
Extract resources from a module and expose them as
DataSources . |
com.atlassian.fugue.Maybe<DataSource> |
resourceFromModuleByName(String moduleKey,
String resourceName)
Deprecated.
since 7.0.1. Use
PluginDataSourceFactory.getResourceFromModuleByName(String, String) |
com.atlassian.fugue.Maybe<Iterable<DataSource>> |
resourcesFromModules(String moduleKey)
Deprecated.
since 7.0.1. Use
PluginDataSourceFactory.getResourcesFromModules(String) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceFromModuleByName, getResourcesFromModules
public DefaultPluginDataSourceFactory(FileTypeMap fileTypeMap, com.google.common.base.Function<com.atlassian.fugue.Pair<com.atlassian.plugin.Plugin,PluginDataSourceFactory.ResourceView>,InputStream> resourceStreamFactory, com.atlassian.plugin.Plugin plugin)
@Deprecated public com.atlassian.fugue.Maybe<Iterable<DataSource>> resourcesFromModules(String moduleKey)
PluginDataSourceFactory.getResourcesFromModules(String)
PluginDataSourceFactory
DataSources
.resourcesFromModules
in interface PluginDataSourceFactory
PluginDataSourceFactory.getResourcesFromModules(String, Predicate)
public Optional<Iterable<DataSource>> getResourcesFromModules(String moduleKey, @Nullable Predicate<PluginDataSourceFactory.ResourceView> filter)
PluginDataSourceFactory
DataSources
.getResourcesFromModules
in interface PluginDataSourceFactory
moduleKey
- the key used to locate the modulefilter
- an optional filter for resourcesDataSources
if the module could be located, the container is empty if the filter
did not match anything@Deprecated public com.atlassian.fugue.Maybe<DataSource> resourceFromModuleByName(String moduleKey, String resourceName)
PluginDataSourceFactory.getResourceFromModuleByName(String, String)
PluginDataSourceFactory
DataSource
.resourceFromModuleByName
in interface PluginDataSourceFactory
moduleKey
- the key used to locate the moduleresourceName
- the name of the resourceDataSource
if the module could be located and contained a resource with the given nameCopyright © 2003–2023 Atlassian. All rights reserved.
View cookie preferences