|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.user.DefaultUserHistoryManager
@ThreadSafe public class DefaultUserHistoryManager
Default implementation of the UserHistoryManager.
Constructor Summary | |
---|---|
DefaultUserHistoryManager(UserHistoryStore store)
|
Method Summary | |
---|---|
void |
addItemToHistory(UserHistoryItem.Type type,
com.atlassian.crowd.embedded.api.User user,
String entityId)
Create and add an UserHistoryItem to the Users history list. |
void |
addItemToHistory(UserHistoryItem.Type type,
com.atlassian.crowd.embedded.api.User user,
String entityId,
String data)
|
List<UserHistoryItem> |
getHistory(UserHistoryItem.Type type,
com.atlassian.crowd.embedded.api.User user)
Retreive the user's history queue for the given UserHistoryItem.Type . |
boolean |
hasHistory(UserHistoryItem.Type type,
com.atlassian.crowd.embedded.api.User user)
Determines whether a user has any items in their history for a given UserHistoryItem.Type
This method performs no permission checks. |
void |
removeHistoryForUser(com.atlassian.crowd.embedded.api.User user)
Remove the user's history. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultUserHistoryManager(@NotNull UserHistoryStore store)
Method Detail |
---|
public void addItemToHistory(@NotNull UserHistoryItem.Type type, @NotNull com.atlassian.crowd.embedded.api.User user, @NotNull String entityId)
UserHistoryManager
UserHistoryItem
to the Users history list.
A null users history should still be stored, even if only for duration of session.
addItemToHistory
in interface UserHistoryManager
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.public void addItemToHistory(@NotNull UserHistoryItem.Type type, @Nullable com.atlassian.crowd.embedded.api.User user, @NotNull String entityId, @Nullable String data)
addItemToHistory
in interface UserHistoryManager
public boolean hasHistory(@NotNull UserHistoryItem.Type type, @NotNull com.atlassian.crowd.embedded.api.User user)
UserHistoryManager
UserHistoryItem.Type
This method performs no permission checks.
hasHistory
in interface UserHistoryManager
type
- The type to check foruser
- The user to check for.
@NotNull public List<UserHistoryItem> getHistory(@NotNull UserHistoryItem.Type type, @Nullable com.atlassian.crowd.embedded.api.User user)
UserHistoryManager
UserHistoryItem.Type
.
The list is returned ordered by DESC lastViewed date (i.e. newest is first).
This method performs no permission checks.
getHistory
in interface UserHistoryManager
type
- The type of entity to get the history foruser
- The user to get the history items for.
public void removeHistoryForUser(@NotNull com.atlassian.crowd.embedded.api.User user)
UserHistoryManager
removeHistoryForUser
in interface UserHistoryManager
user
- The User to remove the history for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |