com.atlassian.jira.plugin.userformat
Class FullProfileUserFormat

java.lang.Object
  extended by com.atlassian.jira.plugin.userformat.FullProfileUserFormat
All Implemented Interfaces:
UserFormat

public class FullProfileUserFormat
extends Object
implements UserFormat

Provides the full user's profile that is used to display the column on the left in the View Profile page.

Since:
v3.13

Field Summary
 
Fields inherited from interface com.atlassian.jira.plugin.profile.UserFormat
VIEW_TEMPLATE
 
Constructor Summary
FullProfileUserFormat(EmailFormatter emailFormatter, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, GroupPermissionChecker groupPermissionChecker, WebFragmentWebComponent webFragmentWebComponent, UserManager userManager, UserKeyService userKeyService, UserFormatModuleDescriptor moduleDescriptor, UserPropertyManager userPropertyManager, GroupManager groupManager)
           
 
Method Summary
 String format(String key, String id)
          Renders the formatted user for a given section on the screen.
 String format(String key, String id, Map params)
          Renders the formatted user for a given section on the screen.
 String getDisplayEmail(com.atlassian.crowd.embedded.api.User user)
           
 List<String> getGroupNames(com.atlassian.crowd.embedded.api.User user)
           
 String getUserLinks(com.atlassian.crowd.embedded.api.User profileUser, String template)
           
 Map getUserProperties(com.atlassian.crowd.embedded.api.User user)
          These user properties are currently only visible to JIRA Administrators
 boolean hasViewGroupPermission(String group)
           
 boolean isEmailVisible(com.atlassian.crowd.embedded.api.User user)
           
 boolean isHasPermission(int permissionsId)
           
 boolean isUserLoggedinUser(com.atlassian.crowd.embedded.api.User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullProfileUserFormat

public FullProfileUserFormat(EmailFormatter emailFormatter,
                             PermissionManager permissionManager,
                             JiraAuthenticationContext authenticationContext,
                             GroupPermissionChecker groupPermissionChecker,
                             WebFragmentWebComponent webFragmentWebComponent,
                             UserManager userManager,
                             UserKeyService userKeyService,
                             UserFormatModuleDescriptor moduleDescriptor,
                             UserPropertyManager userPropertyManager,
                             GroupManager groupManager)
Method Detail

format

public String format(String key,
                     String id)
Description copied from interface: UserFormat
Renders the formatted user for a given section on the screen. Please note that the username may be null (eg for empty fields, anonymous user's, etc) or the user may not exist. Implementations should handle these cases.

Extra context can be passed to the renderer via the id attribute. Ideally an implementation might include this id in the rendered output such that it can be used for test assertions.

The result should always be ready to display in an HTML response i.e. it should be HTML encoded if necessary.

Specified by:
format in interface UserFormat
Parameters:
key - the user's userkey to format.
id - A value providing extra context to the rendering process.
Returns:
the formatted user

format

public String format(String key,
                     String id,
                     Map params)
Description copied from interface: UserFormat
Renders the formatted user for a given section on the screen. Please note that the username may be null (eg for empty fields, anonymous user's, etc) or the user may not exist. Implementations should handle these cases.

Extra context can be passed to the renderer via the params attribute.

The result should always be ready to display in an HTML response i.e. it should be HTML encoded if necessary.

Specified by:
format in interface UserFormat
Parameters:
key - the user's userkey to format.
id - A value providing extra context to the rendering process.
params - Additional context to pass to the renderer
Returns:
the formatted user

isUserLoggedinUser

public boolean isUserLoggedinUser(com.atlassian.crowd.embedded.api.User user)

isEmailVisible

public boolean isEmailVisible(com.atlassian.crowd.embedded.api.User user)

getDisplayEmail

public String getDisplayEmail(com.atlassian.crowd.embedded.api.User user)

hasViewGroupPermission

public boolean hasViewGroupPermission(String group)

getUserLinks

public String getUserLinks(com.atlassian.crowd.embedded.api.User profileUser,
                           String template)

getUserProperties

public Map getUserProperties(com.atlassian.crowd.embedded.api.User user)
These user properties are currently only visible to JIRA Administrators

Parameters:
user - The user to get properties for.
Returns:
java.util.Map of user properties

isHasPermission

public boolean isHasPermission(int permissionsId)

getGroupNames

public List<String> getGroupNames(com.atlassian.crowd.embedded.api.User user)


Copyright © 2002-2014 Atlassian. All Rights Reserved.