public class

DefaultUserAdminHistoryManager

extends Object
implements UserAdminHistoryManager
java.lang.Object
   ↳ com.atlassian.jira.user.DefaultUserAdminHistoryManager

Class Overview

A convenience wrapper around the UserHistoryManager to work directly with admin pages and perform permission checks. The key stored and used for admin pag eretrieval is the link id of the WebItemModuleDescriptor

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.user.UserAdminHistoryManager
Public Constructors
DefaultUserAdminHistoryManager(UserHistoryManager userHistoryManager)
Public Methods
void addAdminPageToHistory(ApplicationUser user, String key, String data)
Add an admin page to the user history list.
List<UserHistoryItem> getAdminPageHistoryWithoutPermissionChecks(ApplicationUser user)
Retreive the user's admin page history queue.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.user.UserAdminHistoryManager

Public Constructors

public DefaultUserAdminHistoryManager (UserHistoryManager userHistoryManager)

Public Methods

public void addAdminPageToHistory (ApplicationUser user, String key, String data)

Add an admin page to the user history list. A null users history should still be stored, even if only for duration of session

Parameters
user The user to add the history item to
key The link id of the admin page to add to history
data The url of the link (for breaking ties between sections)

public List<UserHistoryItem> getAdminPageHistoryWithoutPermissionChecks (ApplicationUser user)

Retreive the user's admin page history queue. The list is returned ordered by DESC lastViewed date (i.e. newest is first). This method performs no permission checks. And is extremely fast. Admin pages don't have permissions per se, and depend on the WebItemModuleDescriptor rendering the page link to decide permissions

Parameters
user The user to get the history admin page items for.
Returns
  • a list of history admin page items sort by desc lastViewed date.