|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.core.DefaultDataSourceFactory
public class DefaultDataSourceFactory
Nested Class Summary | |
---|---|
static class |
DefaultDataSourceFactory.NamedDataSource
|
Constructor Summary | |
---|---|
DefaultDataSourceFactory(UserAccessor userAccessor,
AttachmentManager attachmentManager,
ContentEntityObjectDao contentEntityObjectDao,
javax.activation.FileTypeMap fileTypeMap,
ThumbnailManager thumbnailManager,
com.atlassian.plugin.PluginAccessor pluginAccessor,
SpaceLogoManager spaceLogoManager,
com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration)
|
Method Summary | |
---|---|
com.atlassian.fugue.Maybe<PluginDataSourceFactory> |
forPlugin(java.lang.String pluginKey)
Create a factory for a specific plugin. |
javax.activation.DataSource |
getAvatar(com.atlassian.user.User user)
Construct a DataSource for a user's profile picture. |
javax.activation.DataSource |
getDatasource(Attachment attachment,
boolean useThumbnail)
|
javax.activation.DataSource |
getServletContainerResource(java.lang.String path,
java.lang.String name)
|
javax.activation.DataSource |
getSpaceLogo(Space space)
Encapsulates the logo for the given Space in a DataSource . |
javax.activation.DataSource |
getURLResource(java.net.URL url,
java.lang.String name)
//TODO caching datasource |
void |
setServletContext(javax.servlet.ServletContext servletContext)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultDataSourceFactory(UserAccessor userAccessor, AttachmentManager attachmentManager, ContentEntityObjectDao contentEntityObjectDao, javax.activation.FileTypeMap fileTypeMap, ThumbnailManager thumbnailManager, com.atlassian.plugin.PluginAccessor pluginAccessor, SpaceLogoManager spaceLogoManager, com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration)
Method Detail |
---|
public javax.activation.DataSource getAvatar(com.atlassian.user.User user)
DataSourceFactory
getAvatar
in interface DataSourceFactory
user
- The user to retrieve the avatar for. If null, "Anonymous" will be assumed.
public javax.activation.DataSource getSpaceLogo(Space space)
DataSourceFactory
Space
in a DataSource
.
getSpaceLogo
in interface DataSourceFactory
space
- the space to retrieve the logo for
DataSource
encapsulating the ...
Space
if configured
Space
logo if configured
Space
logo, SpaceLogo.DEFAULT_LOGO_PATH
DataSource.getName()
will return "<spacekey>-space-logo"public javax.activation.DataSource getServletContainerResource(java.lang.String path, java.lang.String name)
getServletContainerResource
in interface DataSourceFactory
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.
public javax.activation.DataSource getDatasource(Attachment attachment, boolean useThumbnail) throws java.io.IOException
getDatasource
in interface DataSourceFactory
java.io.IOException
public javax.activation.DataSource getURLResource(java.net.URL url, java.lang.String name)
getURLResource
in interface DataSourceFactory
public void setServletContext(javax.servlet.ServletContext servletContext)
setServletContext
in interface org.springframework.web.context.ServletContextAware
public com.atlassian.fugue.Maybe<PluginDataSourceFactory> forPlugin(java.lang.String pluginKey)
DataSourceFactory
Allows the creation of DataSources
from <resource> descriptors.
forPlugin
in interface DataSourceFactory
pluginKey
- the key used to locate the plugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |