com.atlassian.jira.user.profile
Class AssignedAndOpenUserProfileFragment

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

public class AssignedAndOpenUserProfileFragment
extends AbstractUserProfileFragment

User Profile Tab containing a list of project with assigned and open issues

Since:
v4.1

Nested Class Summary
 class AssignedAndOpenUserProfileFragment.UrlBuilder
          Utility class for creating url on the fly in the velocity.
 
Field Summary
 
Fields inherited from class com.atlassian.jira.user.profile.AbstractUserProfileFragment
jiraAuthenticationContext
 
Constructor Summary
AssignedAndOpenUserProfileFragment(JiraAuthenticationContext jiraAuthenticationContext, VelocityTemplatingEngine templatingEngine, VelocityParamFactory velocityParamFactory, PermissionManager permissionManager, SearchService searchService)
           
 
Method Summary
protected  Map<String,Object> createVelocityParams(com.atlassian.crowd.embedded.api.User profileUser, com.atlassian.crowd.embedded.api.User currentUser)
          Creates the parameters passed to the velocity template.
 String getId()
          Returns a unique id for this fragment.
 boolean showFragment(com.atlassian.crowd.embedded.api.User profileUser, com.atlassian.crowd.embedded.api.User currentUser)
          Only show this fragment is the current user can browse any of the projects that the profile user can be assigned to.
 
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

AssignedAndOpenUserProfileFragment

public AssignedAndOpenUserProfileFragment(JiraAuthenticationContext jiraAuthenticationContext,
                                          VelocityTemplatingEngine templatingEngine,
                                          VelocityParamFactory velocityParamFactory,
                                          PermissionManager permissionManager,
                                          SearchService searchService)
Method Detail

showFragment

public boolean showFragment(com.atlassian.crowd.embedded.api.User profileUser,
                            com.atlassian.crowd.embedded.api.User currentUser)
Only show this fragment is the current user can browse any of the projects that the profile user can be assigned to.

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 the current user can browse any of the projects that the profile user can be assigned to

createVelocityParams

protected Map<String,Object> createVelocityParams(com.atlassian.crowd.embedded.api.User profileUser,
                                                  com.atlassian.crowd.embedded.api.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.

getId

public 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-2012 Atlassian. All Rights Reserved.