com.atlassian.jira.user
Interface UserIssueHistoryManager

All Known Implementing Classes:
DefaultUserIssueHistoryManager

public interface UserIssueHistoryManager

A wrapper of the UserHistoryManager that allows you to deal directly with Issue objects

Since:
v4.0

Field Summary
static int DEFAULT_ISSUE_HISTORY_DROPDOWN_ITEMS
           
 
Method Summary
 void addIssueToHistory(com.atlassian.crowd.embedded.api.User user, Issue issue)
          Add an Issue to the user hsitory list.
 List<UserHistoryItem> getFullIssueHistoryWithoutPermissionChecks(com.atlassian.crowd.embedded.api.User user)
          Retreive the user's issue history queue.
 List<UserHistoryItem> getFullIssueHistoryWithPermissionChecks(com.atlassian.crowd.embedded.api.User user)
          Retreive the user's issue history queue.
 List<Issue> getShortIssueHistory(com.atlassian.crowd.embedded.api.User user)
          Retreive the first X (jira.max.issue.history.dropdown.items) Issues from the user's issue history queue.
 boolean hasIssueHistory(com.atlassian.crowd.embedded.api.User user)
          Determines whether the user has a current issue history.
 

Field Detail

DEFAULT_ISSUE_HISTORY_DROPDOWN_ITEMS

static final int DEFAULT_ISSUE_HISTORY_DROPDOWN_ITEMS
See Also:
Constant Field Values
Method Detail

addIssueToHistory

void addIssueToHistory(com.atlassian.crowd.embedded.api.User user,
                       Issue issue)
Add an Issue to the user hsitory 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
issue - The issue to add to the history list

hasIssueHistory

boolean hasIssueHistory(com.atlassian.crowd.embedded.api.User user)
Determines whether the user has a current issue history. This method also performs permission checks against issue to ensure that user can see atleast 1 issue.

Parameters:
user - The user to check for.
Returns:
true if the user has at least 1 issue in their issue history queue that they can see, false otherwise

getFullIssueHistoryWithoutPermissionChecks

@Nonnull
List<UserHistoryItem> getFullIssueHistoryWithoutPermissionChecks(com.atlassian.crowd.embedded.api.User user)
Retreive the user's issue history queue. The list is returned ordered by DESC lastViewed date (i.e. newest is first). This method performs no permission checks.

Parameters:
user - The user to get the history issue items for.
Returns:
a list of history issue items sort by desc lastViewed date.

getFullIssueHistoryWithPermissionChecks

@Nonnull
List<UserHistoryItem> getFullIssueHistoryWithPermissionChecks(com.atlassian.crowd.embedded.api.User user)
Retreive the user's issue history queue. The list is returned ordered by DESC lastViewed date (i.e. newest is first). This method performs permission checks.

Parameters:
user - The user to get the history issue items for.
Returns:
a list of history issue items sort by desc lastViewed date.

getShortIssueHistory

@Nonnull
List<Issue> getShortIssueHistory(com.atlassian.crowd.embedded.api.User user)
Retreive the first X (jira.max.issue.history.dropdown.items) Issues from the user's issue history queue. This purpose of this method is to return a small list for easy display. The filtering could be done in the view code, but for performance reasons, is done here. The list is returned ordered by DESC lastViewed date (i.e. newest is first). This method performs permission checks.

Parameters:
user - The user to get the history issue items for.
Returns:
a list of issue items sorted by desc lastViewed date.


Copyright © 2002-2014 Atlassian. All Rights Reserved.