com.atlassian.jira.user
Interface UserHistoryManager

All Known Implementing Classes:
DefaultUserHistoryManager, MockUserHistoryManager

public interface UserHistoryManager

The manager responsible for storing and retreiving UserHistoryItem objects. Although it is possible to store a reference to any UserHistoryItem.Type it has special methods for Issue history as that is the only use internal to JIRA.

Since:
v4.0

Method Summary
 void addItemToHistory(UserHistoryItem.Type type, ApplicationUser user, String entityId)
          Create and add an UserHistoryItem to the Users history list.
 void addItemToHistory(UserHistoryItem.Type type, ApplicationUser user, String entityId, String data)
          Create and add an UserHistoryItem to the Users history list.
 void addItemToHistory(UserHistoryItem.Type type, com.atlassian.crowd.embedded.api.User user, String entityId)
          Deprecated. Use addItemToHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser, String) instead. Since v6.0.
 void addItemToHistory(UserHistoryItem.Type type, com.atlassian.crowd.embedded.api.User user, String entityId, String data)
          Deprecated. Use addItemToHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser, String, String) instead. Since v6.0.
 void addUserToHistory(UserHistoryItem.Type type, ApplicationUser user, ApplicationUser entity)
          Create and add an UserHistoryItem to the Users history list.
 void addUserToHistory(UserHistoryItem.Type type, com.atlassian.crowd.embedded.api.User user, com.atlassian.crowd.embedded.api.User entity)
          Deprecated. Use addItemToHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser, String) instead. Since v6.0.
 List<UserHistoryItem> getHistory(UserHistoryItem.Type type, ApplicationUser user)
          Retreive the user's history queue for the given UserHistoryItem.Type.
 List<UserHistoryItem> getHistory(UserHistoryItem.Type type, com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use getHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser) instead. Since v6.0.
 boolean hasHistory(UserHistoryItem.Type type, ApplicationUser user)
          Determines whether a user has any items in their history for a given UserHistoryItem.Type This method performs no permission checks.
 boolean hasHistory(UserHistoryItem.Type type, com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use hasHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser) instead. Since v6.0.
 void removeHistoryForUser(ApplicationUser user)
          Remove the user's history.
 void removeHistoryForUser(com.atlassian.crowd.embedded.api.User user)
          Deprecated. Use removeHistoryForUser(ApplicationUser) instead. Since v6.0.
 

Method Detail

addUserToHistory

void addUserToHistory(UserHistoryItem.Type type,
                      com.atlassian.crowd.embedded.api.User user,
                      com.atlassian.crowd.embedded.api.User entity)
Deprecated. Use addItemToHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser, String) instead. Since v6.0.

Create and add an UserHistoryItem to the Users history list. A null users history should still be stored, even if only for duration of session.

Parameters:
type - The type queue to add the history item to
user - The user to add the history item to
entity - The entity to add to the history queue.

addUserToHistory

void addUserToHistory(UserHistoryItem.Type type,
                      ApplicationUser user,
                      ApplicationUser entity)
Create and add an UserHistoryItem to the Users history list. A null users history should still be stored, even if only for duration of session.

Parameters:
type - The type queue to add the history item to
user - The user to add the history item to
entity - The entity to add to the history queue.

addItemToHistory

void addItemToHistory(UserHistoryItem.Type type,
                      com.atlassian.crowd.embedded.api.User user,
                      String entityId)
Deprecated. Use addItemToHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser, String) instead. Since v6.0.

Create and add an UserHistoryItem to the Users history list. A null users history should still be stored, even if only for duration of session.

Parameters:
type - The type queue to add the history item to
user - The user to add the history item to
entityId - The entity id of the entity to add to the history queue.

addItemToHistory

void addItemToHistory(UserHistoryItem.Type type,
                      ApplicationUser user,
                      String entityId)
Create and add an UserHistoryItem to the Users history list. A null users history should still be stored, even if only for duration of session.

Parameters:
type - The type queue to add the history item to
user - The user to add the history item to
entityId - The entity id of the entity to add to the history queue.

addItemToHistory

void addItemToHistory(UserHistoryItem.Type type,
                      com.atlassian.crowd.embedded.api.User user,
                      String entityId,
                      String data)
Deprecated. Use addItemToHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser, String, String) instead. Since v6.0.

Create and add an UserHistoryItem to the Users history list. Allows to store data related to the user history item.

Parameters:
type - The type queue to add the history item to
user - The user to add the history item to
entityId - The entity id of the entity to add to the history queue
data - Data related to the history item. Can be null.

addItemToHistory

void addItemToHistory(UserHistoryItem.Type type,
                      ApplicationUser user,
                      String entityId,
                      String data)
Create and add an UserHistoryItem to the Users history list. Allows to store data related to the user history item.

Parameters:
type - The type queue to add the history item to
user - The user to add the history item to
entityId - The entity id of the entity to add to the history queue
data - Data related to the history item. Can be null.

hasHistory

boolean hasHistory(UserHistoryItem.Type type,
                   com.atlassian.crowd.embedded.api.User user)
Deprecated. Use hasHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser) instead. Since v6.0.

Determines whether a user has any items in their history for a given UserHistoryItem.Type This method performs no permission checks.

Parameters:
type - The type to check for
user - The user to check for.
Returns:
true if the user has any entities in their queue of the give type, false otherwise

hasHistory

boolean hasHistory(UserHistoryItem.Type type,
                   ApplicationUser user)
Determines whether a user has any items in their history for a given UserHistoryItem.Type This method performs no permission checks.

Parameters:
type - The type to check for
user - The user to check for.
Returns:
true if the user has any entities in their queue of the give type, false otherwise

getHistory

@NotNull
List<UserHistoryItem> getHistory(UserHistoryItem.Type type,
                                         com.atlassian.crowd.embedded.api.User user)
Deprecated. Use getHistory(com.atlassian.jira.user.UserHistoryItem.Type, ApplicationUser) instead. Since v6.0.

Retreive the user's history queue for the given UserHistoryItem.Type. The list is returned ordered by DESC lastViewed date (i.e. newest is first). This method performs no permission checks.

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

getHistory

@NotNull
List<UserHistoryItem> getHistory(UserHistoryItem.Type type,
                                         ApplicationUser user)
Retreive the user's history queue for the given UserHistoryItem.Type. The list is returned ordered by DESC lastViewed date (i.e. newest is first). This method performs no permission checks.

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

removeHistoryForUser

void removeHistoryForUser(@NotNull
                          com.atlassian.crowd.embedded.api.User user)
Deprecated. Use removeHistoryForUser(ApplicationUser) instead. Since v6.0.

Remove the user's history.

Parameters:
user - The User to remove the history for.

removeHistoryForUser

void removeHistoryForUser(@NotNull
                          ApplicationUser user)
Remove the user's history.

Parameters:
user - The User to remove the history for.


Copyright © 2002-2013 Atlassian. All Rights Reserved.