public class

DefaultUserQueryHistoryManager

extends Object
implements UserQueryHistoryManager
java.lang.Object
   ↳ com.atlassian.jira.user.DefaultUserQueryHistoryManager

Class Overview

Default implementation of UserQueryHistoryManager

Summary

Public Constructors
DefaultUserQueryHistoryManager(UserHistoryManager userHistoryManager, ApplicationProperties applicationProperties)
Public Methods
void addQueryToHistory(ApplicationUser user, String query)
Add a JQL query string to the user history list.
List<UserHistoryItem> getUserQueryHistory(ApplicationUser user)
Retrieve the user's query history queue.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.user.UserQueryHistoryManager

Public Constructors

public DefaultUserQueryHistoryManager (UserHistoryManager userHistoryManager, ApplicationProperties applicationProperties)

Public Methods

public void addQueryToHistory (ApplicationUser user, String query)

Add a JQL query string to the user history list.

Parameters
user The user to add the history item to
query The JQL Query string to store in this history.

public List<UserHistoryItem> getUserQueryHistory (ApplicationUser user)

Retrieve the user's query history queue. The list is returned ordered by DESC lastViewed date (i.e. newest is first).

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