com.atlassian.jira.plugin.profile
Interface UserFormatManager

All Known Implementing Classes:
DefaultUserFormatManager

public interface UserFormatManager

Manages the UserFormat to type mapping. UserFormat modules may be provided for various different types.


Method Summary
 java.lang.String formatUser(java.lang.String username, java.lang.String type, java.lang.String id)
          Convenience method to format a given user.
 java.lang.String formatUser(java.lang.String username, java.lang.String type, java.lang.String id, java.util.Map params)
          Convenience method to format a given user.
 UserFormat getUserFormat(java.lang.String type)
          Returns the UserFormat for a specific type, or null if none exists
 

Method Detail

getUserFormat

UserFormat getUserFormat(java.lang.String type)
Returns the UserFormat for a specific type, or null if none exists

Parameters:
type - the specific type for which to find a UserFormat.
Returns:
the UserFormat for a specific type, or null if none exists

formatUser

java.lang.String formatUser(java.lang.String username,
                            java.lang.String type,
                            java.lang.String id)
Convenience method to format a given user. Method looks up the mapped user format for the type and passes the username and id to this user format. Returns null if no mapped user format can be found.

Parameters:
username - The user to format
type - The user format type to use
id - A context sensitive id
Returns:
formatted user or null.

formatUser

java.lang.String formatUser(java.lang.String username,
                            java.lang.String type,
                            java.lang.String id,
                            java.util.Map params)
Convenience method to format a given user. The params user allows a user to pass any information needed for additional context to the underlying UserFormat.

Parameters:
username - The user to format
type - The user format type to use
id - A context sensitive id
params - Additional context to provide to the userformatter.
Returns:
formatted user or null.


Copyright © 2002-2010 Atlassian. All Rights Reserved.