com.atlassian.confluence.core
Class DefaultPluginDataSourceFactory
java.lang.Object
   com.atlassian.confluence.core.DefaultPluginDataSourceFactory
com.atlassian.confluence.core.DefaultPluginDataSourceFactory
- All Implemented Interfaces: 
- PluginDataSourceFactory
- public class DefaultPluginDataSourceFactory 
- extends java.lang.Object- implements PluginDataSourceFactory
 
 
 
| 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. | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
DefaultPluginDataSourceFactory
public DefaultPluginDataSourceFactory(javax.activation.FileTypeMap fileTypeMap,
                                      com.google.common.base.Function<com.atlassian.fugue.Pair<com.atlassian.plugin.Plugin,PluginDataSourceFactory.ResourceView>,java.io.InputStream> resourceStreamFactory,
                                      com.atlassian.plugin.Plugin plugin)
resourcesFromModules
public com.atlassian.fugue.Maybe<java.lang.Iterable<javax.activation.DataSource>> resourcesFromModules(java.lang.String moduleKey)
- Description copied from interface: PluginDataSourceFactory
- Extract all resources from a module and expose them as DataSources.
 
- 
- Specified by:
- resourcesFromModulesin interface- PluginDataSourceFactory
 
- 
- See Also:
- PluginDataSourceFactory.resourcesFromModules(String, Predicate)
 
resourcesFromModules
public 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)
- Description copied from interface: PluginDataSourceFactory
- Extract resources from a module and expose them as DataSources.
 
- 
- Specified by:
- resourcesFromModulesin interface- PluginDataSourceFactory
 
- 
- Parameters:
- moduleKey- the key used to locate the module
- filter- 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
public com.atlassian.fugue.Maybe<javax.activation.DataSource> resourceFromModuleByName(java.lang.String moduleKey,
                                                                                       java.lang.String resourceName)
- Description copied from interface: PluginDataSourceFactory
- Extract a resource identified by name from a module and expose it as DataSource.
 
- 
- Specified by:
- resourceFromModuleByNamein interface- PluginDataSourceFactory
 
- 
- Parameters:
- moduleKey- the key used to locate the module
- resourceName- the name of the resource
- Returns:
- maybe the DataSourceif the module could be located and contained a resource with the given name
 
Copyright © 2003-2014 Atlassian. All Rights Reserved.