com.atlassian.confluence.core
Interface PluginDataSourceFactory

All Known Implementing Classes:
DefaultPluginDataSourceFactory

public interface PluginDataSourceFactory

Produces DataSources for plugin module resources.

Since:
5.2
See Also:
DataSourceFactory.forPlugin(String)

Nested Class Summary
static class PluginDataSourceFactory.FilterByType
           
static interface PluginDataSourceFactory.ResourceView
          A view on the ResourceDescriptor.
 
Method Summary
 com.atlassian.fugue.Maybe<DataSource> resourceFromModuleByName(String moduleKey, String resourceName)
          Extract a resource identified by name from a module and expose it as DataSource.
 com.atlassian.fugue.Maybe<Iterable<DataSource>> resourcesFromModules(String moduleKey)
          Extract all resources from a module and expose them as DataSources.
 com.atlassian.fugue.Maybe<Iterable<DataSource>> resourcesFromModules(String moduleKey, com.atlassian.plugin.util.collect.Predicate<PluginDataSourceFactory.ResourceView> filter)
          Extract resources from a module and expose them as DataSources.
 

Method Detail

resourcesFromModules

com.atlassian.fugue.Maybe<Iterable<DataSource>> resourcesFromModules(String moduleKey,
                                                                     @Nullable
                                                                     com.atlassian.plugin.util.collect.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

resourcesFromModules

com.atlassian.fugue.Maybe<Iterable<DataSource>> resourcesFromModules(String moduleKey)
Extract all resources from a module and expose them as DataSources.

See Also:
resourcesFromModules(String, Predicate)

resourceFromModuleByName

com.atlassian.fugue.Maybe<DataSource> resourceFromModuleByName(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


Copyright © 2003–2015 Atlassian. All rights reserved.