HttpSession
is not supported. Please move the functionality to the frontend or other type of storage. This class will be removed in 8.0.@Deprecated public class SessionBasedAnonymousUserHistoryStore extends Object implements UserHistoryStore
UserHistoryStore
. Allows anonymous users to have history.Constructor and Description |
---|
SessionBasedAnonymousUserHistoryStore(UserHistoryStore delegatingStore,
ApplicationProperties applicationProperties,
UserManager userManager,
VelocityRequestContextFactory velocityRequestContextFactory)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addHistoryItem(ApplicationUser user,
UserHistoryItem historyItem)
Deprecated.
Add a history item to the database.
|
List<UserHistoryItem> |
getHistory(UserHistoryItem.Type type,
ApplicationUser user)
Deprecated.
Retrieve the history for a given user/type.
|
List<UserHistoryItem> |
getHistory(UserHistoryItem.Type type,
String userKey)
Deprecated.
Retrieve the history for a given user/type.
|
Set<UserHistoryItem.Type> |
removeHistoryForUser(ApplicationUser user)
Deprecated.
Remove all history items for a given user.
|
void |
removeHistoryOlderThan(Long timestamp)
Deprecated.
Method for removing old user history items.
|
public SessionBasedAnonymousUserHistoryStore(UserHistoryStore delegatingStore, ApplicationProperties applicationProperties, UserManager userManager, VelocityRequestContextFactory velocityRequestContextFactory)
public void addHistoryItem(ApplicationUser user, @Nonnull UserHistoryItem historyItem)
UserHistoryStore
addHistoryItem
in interface UserHistoryStore
user
- The user to store the history item againsthistoryItem
- the item to store. Containing a timestamp and referenced entity@Nonnull public List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, String userKey)
UserHistoryStore
getHistory
in interface UserHistoryStore
type
- The type of entity to retrieve history for.userKey
- The key of the user to retrieve history for.@Nonnull public List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, ApplicationUser user)
UserHistoryStore
getHistory
in interface UserHistoryStore
type
- The type of entity to retrieve history for.user
- The user to retrieve history for.public Set<UserHistoryItem.Type> removeHistoryForUser(@Nonnull ApplicationUser user)
UserHistoryStore
removeHistoryForUser
in interface UserHistoryStore
user
- The user to remove all history of.public void removeHistoryOlderThan(@Nonnull Long timestamp)
UserHistoryStore
removeHistoryOlderThan
in interface UserHistoryStore
timestamp
- remove elements older than this timestampCopyright © 2002-2019 Atlassian. All Rights Reserved.