com.atlassian.confluence.core
Interface DataSourceFactory

All Known Implementing Classes:
DefaultDataSourceFactory

public interface DataSourceFactory

Constructs DataSources for use in mail notifications.

Since:
4.0

Method Summary
 DataSource getAvatar(com.atlassian.user.User user)
          Construct a DataSource for a user's profile picture.
 DataSource getServletContainerResource(String path, String name)
           
 

Method Detail

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 root
name - 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 .


Copyright © 2003-2011 Atlassian. All Rights Reserved.