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<javax.activation.DataSource> resourceFromModuleByName(java.lang.String moduleKey, java.lang.String resourceName)
          Extract a resource identified by name from a module and expose it as DataSource.
 com.atlassian.fugue.Maybe<java.lang.Iterable<javax.activation.DataSource>> resourcesFromModules(java.lang.String moduleKey)
          Extract all resources from a module and expose them as DataSources.
 com.atlassian.fugue.Maybe<java.lang.Iterable<javax.activation.DataSource>> resourcesFromModules(java.lang.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<java.lang.Iterable<javax.activation.DataSource>> resourcesFromModules(java.lang.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<java.lang.Iterable<javax.activation.DataSource>> resourcesFromModules(java.lang.String moduleKey)
Extract all resources from a module and expose them as DataSources.

See Also:
resourcesFromModules(String, Predicate)

resourceFromModuleByName

com.atlassian.fugue.Maybe<javax.activation.DataSource> resourceFromModuleByName(java.lang.String moduleKey,
                                                                                java.lang.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-2013 Atlassian. All Rights Reserved.