com.atlassian.confluence.core
Interface DataSourceFactory
- All Known Implementing Classes:
- DefaultDataSourceFactory
public interface DataSourceFactory
Constructs DataSources for use in mail notifications.
- Since:
- 4.0
getAvatar
DataSource getAvatar(com.atlassian.user.User user)
- Construct a DataSource for a user's profile picture.
- Parameters:
user
- The user to retrieve the avatar for. If null, "Anonymous" will be assumed.
- Returns:
- A DataSource containing the user's profile picture. DataSource.getName() will return the string
"avatar_[hash]", where [hash] is an md5 hash of the user's name
plus the avatar's filename.
getServletContainerResource
DataSource getServletContainerResource(String path,
String name)
- Parameters:
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.
- Returns:
- a DataSource containing the resource located at the path. DataSource.getName() will return
the value of .
getURLResource
DataSource getURLResource(URL url,
String name)
getDatasource
DataSource getDatasource(Attachment attachment,
boolean useThumbnail)
throws IOException
- Throws:
IOException