public interface UserHistoryStore
UserHistoryItem
objects.Modifier and Type | Method and Description |
---|---|
void |
addHistoryItem(ApplicationUser user,
UserHistoryItem historyItem)
Add a history item to the database.
|
List<UserHistoryItem> |
getHistory(UserHistoryItem.Type type,
ApplicationUser user)
Retrieve the history for a given user/type.
|
List<UserHistoryItem> |
getHistory(UserHistoryItem.Type type,
String userKey)
Retrieve the history for a given user/type.
|
Set<UserHistoryItem.Type> |
removeHistoryForUser(ApplicationUser user)
Remove all history items for a given user.
|
void |
removeHistoryOlderThan(Long timestamp)
Method for removing old user history items.
|
void addHistoryItem(@Nullable ApplicationUser user, @Nonnull UserHistoryItem historyItem)
user
- The user to store the history item againsthistoryItem
- the item to store. Containing a timestamp and referenced entity@Nonnull List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, @Nonnull ApplicationUser user)
type
- The type of entity to retrieve history for.user
- The user to retrieve history for.Set<UserHistoryItem.Type> removeHistoryForUser(@Nonnull ApplicationUser user)
user
- The user to remove all history of.void removeHistoryOlderThan(@Nonnull Long timestamp)
timestamp
- remove elements older than this timestampIllegalArgumentException
- If provided timestamp is not at least 30 days old@Nonnull List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, @Nonnull String userKey)
type
- The type of entity to retrieve history for.userKey
- The key of the user to retrieve history for.Copyright © 2002-2021 Atlassian. All Rights Reserved.