public interface DataSourceFactory
| Modifier and Type | Method and Description | 
|---|---|
default Optional<PluginDataSourceFactory> | 
createForPlugin(String pluginKey)
Create a factory for a specific plugin. 
 | 
com.atlassian.fugue.Maybe<PluginDataSourceFactory> | 
forPlugin(String pluginKey)
Deprecated. 
 
since 7.0.1. Use  
createForPlugin(String) | 
DataSource | 
getAvatar(com.atlassian.user.User user)
Construct a DataSource for a user's profile picture. 
 | 
DataSource | 
getDatasource(Attachment attachment,
             boolean useThumbnail)  | 
DataSource | 
getServletContainerResource(String path,
                           String name)  | 
DataSource | 
getSpaceLogo(Space space)
Encapsulates the logo for the given  
Space in a DataSource. | 
DataSource | 
getURLResource(URL url,
              String name)  | 
DataSource getAvatar(com.atlassian.user.User user)
user - The user to retrieve the avatar for. If null, "Anonymous" will be assumed.DataSource getSpaceLogo(Space space)
Space in a DataSource.space - the space to retrieve the logo forDataSource encapsulating the ...
 
Space if configured
 Space logo if configured
 Space logo, SpaceLogo.DEFAULT_LOGO_PATH
 DataSource.getName() will return "<spacekey>-space-logo"DataSource getServletContainerResource(String path, String name)
path - a path that must begin with a "/" and is interpreted as relative to the current context rootname - a custom name for the DataSource that will be returned.DataSource getURLResource(URL url, String name)
DataSource getDatasource(Attachment attachment, boolean useThumbnail) throws IOException
IOException@Deprecated com.atlassian.fugue.Maybe<PluginDataSourceFactory> forPlugin(String pluginKey)
createForPlugin(String)
 Allows the creation of DataSources from <resource> descriptors.
pluginKey - the key used to locate the plugindefault Optional<PluginDataSourceFactory> createForPlugin(String pluginKey)
 Allows the creation of DataSources from <resource> descriptors.
pluginKey - the key used to locate the pluginCopyright © 2003–2022 Atlassian. All rights reserved.