public class DefaultUserProjectHistoryManager extends Object implements UserProjectHistoryManager
UserHistoryManager that deals directly with Projects.| Constructor and Description |
|---|
DefaultUserProjectHistoryManager(UserHistoryManager userHistoryManager,
ProjectManager projectManager,
PermissionManager permissionManager,
InternalProjectPermissionHelper projectPermissionHelper) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProjectToHistory(ApplicationUser user,
Project project)
Add a
Project to the user hsitory list. |
Project |
getCurrentProject(int permission,
ApplicationUser user)
Gets the last viewed project that the user visted and still has permission to see.
|
List<UserHistoryItem> |
getProjectHistoryWithoutPermissionChecks(ApplicationUser user)
Retreive the user's project history queue.
|
List<Project> |
getProjectHistoryWithPermissionChecks(int permission,
ApplicationUser user)
Retreive the user's project history queue.
|
List<Project> |
getProjectHistoryWithPermissionChecks(ProjectAction projectAction,
ApplicationUser user)
Retreive the user's project history queue.
|
boolean |
hasProjectHistory(int permission,
ApplicationUser user)
Determines whether the user has a current project history.
|
public DefaultUserProjectHistoryManager(UserHistoryManager userHistoryManager, ProjectManager projectManager, PermissionManager permissionManager, InternalProjectPermissionHelper projectPermissionHelper)
public void addProjectToHistory(ApplicationUser user, Project project)
UserProjectHistoryManagerProject to the user hsitory list.
A null users history should still be stored, even if only for duration of sessionaddProjectToHistory in interface UserProjectHistoryManageruser - The user to add the history item toproject - The project to add to the history listpublic boolean hasProjectHistory(int permission,
ApplicationUser user)
UserProjectHistoryManagerhasProjectHistory in interface UserProjectHistoryManagerpermission - the permission to check againstuser - The user to check for.public Project getCurrentProject(int permission, ApplicationUser user)
UserProjectHistoryManagergetCurrentProject in interface UserProjectHistoryManagerpermission - the permission the user must have for the projectuser - The user to get teh history for.public List<UserHistoryItem> getProjectHistoryWithoutPermissionChecks(ApplicationUser user)
UserProjectHistoryManagergetProjectHistoryWithoutPermissionChecks in interface UserProjectHistoryManageruser - The user to get the history project items for.public List<Project> getProjectHistoryWithPermissionChecks(int permission, ApplicationUser user)
UserProjectHistoryManagergetProjectHistoryWithPermissionChecks in interface UserProjectHistoryManagerpermission - The permission the user must have for the projectuser - The user to get the history project items for.public List<Project> getProjectHistoryWithPermissionChecks(ProjectAction projectAction, ApplicationUser user)
UserProjectHistoryManagergetProjectHistoryWithPermissionChecks in interface UserProjectHistoryManagerprojectAction - The projectAction the user must have for the projectuser - The user to get the history project items for.Copyright © 2002-2022 Atlassian. All Rights Reserved.