com.atlassian.jira.user.profile
Class PreferencesUserProfileFragment

java.lang.Object
  extended by com.atlassian.jira.user.profile.AbstractUserProfileFragment
      extended by com.atlassian.jira.user.profile.PreferencesUserProfileFragment
All Implemented Interfaces:
UserProfileFragment

public class PreferencesUserProfileFragment
extends AbstractUserProfileFragment

User Profile Fragment that displays the users preferences

Since:
v4.1

Field Summary
 
Fields inherited from class com.atlassian.jira.user.profile.AbstractUserProfileFragment
applicationProperties, jiraAuthenticationContext
 
Constructor Summary
PreferencesUserProfileFragment(ApplicationProperties applicationProperties, JiraAuthenticationContext jiraAuthenticationContext, com.atlassian.velocity.VelocityManager velocityManager, UserPreferencesManager preferencesManager, LocaleManager localeManager, I18nHelper.BeanFactory i18nCachingFactory)
           
 
Method Summary
protected  java.util.Map<java.lang.String,java.lang.Object> createVelocityParams(com.opensymphony.user.User profileUser, com.opensymphony.user.User currentUser)
          Creates the parameters passed to the velocity template.
 java.lang.String getId()
          Returns a unique id for this fragment.
 boolean showFragment(com.opensymphony.user.User profileUser, com.opensymphony.user.User currentUser)
          Whether or not we display this fragment.
 
Methods inherited from class com.atlassian.jira.user.profile.AbstractUserProfileFragment
getFragmentHtml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferencesUserProfileFragment

public PreferencesUserProfileFragment(ApplicationProperties applicationProperties,
                                      JiraAuthenticationContext jiraAuthenticationContext,
                                      com.atlassian.velocity.VelocityManager velocityManager,
                                      UserPreferencesManager preferencesManager,
                                      LocaleManager localeManager,
                                      I18nHelper.BeanFactory i18nCachingFactory)
Method Detail

createVelocityParams

protected java.util.Map<java.lang.String,java.lang.Object> createVelocityParams(com.opensymphony.user.User profileUser,
                                                                                com.opensymphony.user.User currentUser)
Description copied from class: AbstractUserProfileFragment
Creates the parameters passed to the velocity template.

By default this contains "fragId", "profileUser", "currentUser"

Implmentors of this abstract class can override this method to provide their own params.

Overrides:
createVelocityParams in class AbstractUserProfileFragment
Parameters:
profileUser - The user whose profile the current user is looking at
currentUser - The current user
Returns:
a map of the params passed to the velocity template.

showFragment

public boolean showFragment(com.opensymphony.user.User profileUser,
                            com.opensymphony.user.User currentUser)
Description copied from class: AbstractUserProfileFragment
Whether or not we display this fragment. By default we do.

Specified by:
showFragment in interface UserProfileFragment
Overrides:
showFragment in class AbstractUserProfileFragment
Parameters:
profileUser - The user whose profile the current user is looking at
currentUser - The current user
Returns:
true if we should disply this fragment, otherwise false

getId

public java.lang.String getId()
Description copied from interface: UserProfileFragment
Returns a unique id for this fragment. The id should be HTML compliant for ids.

Returns:
a unique id for this fragment


Copyright © 2002-2010 Atlassian. All Rights Reserved.