Package com.atlassian.jira.user
Class SessionBasedAnonymousUserHistoryStore
java.lang.Object
com.atlassian.jira.user.SessionBasedAnonymousUserHistoryStore
- All Implemented Interfaces:
UserHistoryStore
@Deprecated
public class SessionBasedAnonymousUserHistoryStore
extends Object
implements UserHistoryStore
Deprecated.
Session based caching implementation of
UserHistoryStore
. Allows anonymous users to have history.- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionSessionBasedAnonymousUserHistoryStore
(UserHistoryStore delegatingStore, ApplicationProperties applicationProperties, UserManager userManager, VelocityRequestContextFactory velocityRequestContextFactory) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHistoryItem
(ApplicationUser user, UserHistoryItem historyItem) Deprecated.Add a history item to the database.getHistory
(UserHistoryItem.Type type, ApplicationUser user) Deprecated.Retrieve the history for a given user/type.getHistory
(UserHistoryItem.Type type, String userKey) Deprecated.Retrieve the history for a given user/type.Deprecated.Remove all history items for a given user.void
removeHistoryOlderThan
(Long timestamp) Deprecated.Method for removing old user history items.
-
Constructor Details
-
SessionBasedAnonymousUserHistoryStore
public SessionBasedAnonymousUserHistoryStore(UserHistoryStore delegatingStore, ApplicationProperties applicationProperties, UserManager userManager, VelocityRequestContextFactory velocityRequestContextFactory) Deprecated.
-
-
Method Details
-
addHistoryItem
Deprecated.Description copied from interface:UserHistoryStore
Add a history item to the database. This removes the currently referred to entity (user, type, id) from the list and then adds it. If adding it causes the history items stored for that user/type to exceed the max (jira.max.history.items) items allowed, it should remove the oldest items.- Specified by:
addHistoryItem
in interfaceUserHistoryStore
- Parameters:
user
- The user to store the history item againsthistoryItem
- the item to store. Containing a timestamp and referenced entity
-
getHistory
@Nonnull public List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, String userKey) Deprecated.Description copied from interface:UserHistoryStore
Retrieve the history for a given user/type.- Specified by:
getHistory
in interfaceUserHistoryStore
- Parameters:
type
- The type of entity to retrieve history for.userKey
- The key of the user to retrieve history for.- Returns:
- a list containing all stored history items for the passed in user/type.
-
getHistory
@Nonnull public List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, ApplicationUser user) Deprecated.Description copied from interface:UserHistoryStore
Retrieve the history for a given user/type.- Specified by:
getHistory
in interfaceUserHistoryStore
- Parameters:
type
- The type of entity to retrieve history for.user
- The user to retrieve history for.- Returns:
- a list containing all stored history items for the passed in user/type.
-
removeHistoryForUser
Deprecated.Description copied from interface:UserHistoryStore
Remove all history items for a given user.- Specified by:
removeHistoryForUser
in interfaceUserHistoryStore
- Parameters:
user
- The user to remove all history of.- Returns:
- The set of history types that were removed;
-
removeHistoryOlderThan
Deprecated.Description copied from interface:UserHistoryStore
Method for removing old user history items. Removes elements older than provided timestamp, but not younger than 30 days.- Specified by:
removeHistoryOlderThan
in interfaceUserHistoryStore
- Parameters:
timestamp
- remove elements older than this timestamp
-
HttpSession
is not supported. Please move the functionality to the frontend or other type of storage. This class will be removed in 8.0.