public interface UserHistoryManager
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.Modifier and Type | Method and Description |
---|---|
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 |
addUserToHistory(UserHistoryItem.Type type,
ApplicationUser user,
ApplicationUser entity)
Create and add an
UserHistoryItem to the Users history list. |
List<UserHistoryItem> |
getHistory(UserHistoryItem.Type type,
ApplicationUser user)
Retreive the user's history queue for the given
UserHistoryItem.Type . |
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. |
void |
removeHistoryForUser(ApplicationUser user)
Remove the user's history.
|
void addUserToHistory(UserHistoryItem.Type type, ApplicationUser user, ApplicationUser entity)
UserHistoryItem
to the Users history list.
A null users history should still be stored, even if only for duration of session.type
- The type queue to add the history item touser
- The user to add the history item toentity
- The entity to add to the history queue.void addItemToHistory(UserHistoryItem.Type type, ApplicationUser user, String entityId)
UserHistoryItem
to the Users history list.
A null users history should still be stored, even if only for duration of session.type
- The type queue to add the history item touser
- The user to add the history item toentityId
- The entity id of the entity to add to the history queue.void addItemToHistory(UserHistoryItem.Type type, ApplicationUser user, String entityId, String data)
UserHistoryItem
to the Users history list.
Allows to store data related to the user history item.type
- The type queue to add the history item touser
- The user to add the history item toentityId
- The entity id of the entity to add to the history queuedata
- Data related to the history item. Can be null.boolean hasHistory(UserHistoryItem.Type type, ApplicationUser user)
UserHistoryItem.Type
This method performs no permission checks.type
- The type to check foruser
- The user to check for.@Nonnull List<UserHistoryItem> getHistory(UserHistoryItem.Type type, ApplicationUser user)
UserHistoryItem.Type
.
The list is returned ordered by DESC lastViewed date (i.e. newest is first).
This method performs no permission checks.type
- The type of entity to get the history foruser
- The user to get the history items for.void removeHistoryForUser(@Nonnull ApplicationUser user)
user
- The User to remove the history for.Copyright © 2002-2024 Atlassian. All Rights Reserved.