Source:
public String getProjectDetails(@PathVariable("projectid") String projectid, Principal principal, Model model) throws QuadrigaStorageException, NoSuchRoleException, QuadrigaAccessException { String userName = principal.getName(); IProject project = projectManager.getProjectDetails(projectid); List<IWorkSpace> workspaceList = wsManager.listActiveWorkspace(projectid, userName); List<IWorkSpace> collaboratorWorkspaceList = wsManager.listActiveWorkspaceByCollaborator(projectid, userName); List<IWorkSpace> deactiveWorkspaceList = wsManager.listDeactivatedWorkspace(projectid, userName); List<IWorkSpace> archivedWorkspaceList = wsManager.listArchivedWorkspace(projectid, userName); int deactivatedWSSize = deactiveWorkspaceList == null ? 0 : deactiveWorkspaceList.size(); int archivedWSSize = archivedWorkspaceList == null ? 0 : archivedWorkspaceList.size(); projectCollaboratorManager.getProjectCollaborators(projectid); model.addAttribute("project", project); model.addAttribute("workspaceList", workspaceList); model.addAttribute("collabworkspacelist", collaboratorWorkspaceList); model.addAttribute("deactivatedWSSize", deactivatedWSSize); model.addAttribute("archivedWSSize", archivedWSSize); List<String> collaboratorRoles = projectSecurity.getCollaboratorRoles(userName, projectid); if (projectSecurity.isProjectOwner(userName, projectid)) { model.addAttribute("owner", true); } else { model.addAttribute("owner", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_EDITOR)) { model.addAttribute("isProjectEditor", true); } else { model.addAttribute("isProjectEditor", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_ADMIN)) { model.addAttribute("isProjectAdmin", true); } else { model.addAttribute("isProjectAdmin", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_CONTRIBUTOR)) { model.addAttribute("isProjectContributor", true); } else { model.addAttribute("isProjectContributor", false); } return "auth/workbench/project"; }

Target:
public String getProjectDetails(@PathVariable("projectid") String projectid, Principal principal, Model model) throws QuadrigaStorageException, NoSuchRoleException, QuadrigaAccessException { String userName = principal.getName(); IProject project = projectManager.getProjectDetails(projectid); List<IWorkSpace> workspaceList = wsManager.listActiveWorkspace(projectid, userName); List<IWorkSpace> collaboratorWorkspaceList = wsManager.listActiveWorkspaceByCollaborator(projectid, userName); List<IWorkSpace> deactiveWorkspaceList = wsManager.listDeactivatedWorkspace(projectid, userName); List<IWorkSpace> archivedWorkspaceList = wsManager.listArchivedWorkspace(projectid, userName); int deactivatedWSSize = deactiveWorkspaceList == null ? 0 : deactiveWorkspaceList.size(); int archivedWSSize = archivedWorkspaceList == null ? 0 : archivedWorkspaceList.size(); model.addAttribute("project", project); model.addAttribute("workspaceList", workspaceList); model.addAttribute("collabworkspacelist", collaboratorWorkspaceList); model.addAttribute("deactivatedWSSize", deactivatedWSSize); model.addAttribute("archivedWSSize", archivedWSSize); List<String> collaboratorRoles = projectSecurity.getCollaboratorRoles(userName, projectid); if (projectSecurity.isProjectOwner(userName, projectid)) { model.addAttribute("owner", true); } else { model.addAttribute("owner", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_EDITOR)) { model.addAttribute("isProjectEditor", true); } else { model.addAttribute("isProjectEditor", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_ADMIN)) { model.addAttribute("isProjectAdmin", true); } else { model.addAttribute("isProjectAdmin", false); } if (collaboratorRoles.contains(RoleNames.ROLE_PROJ_COLLABORATOR_CONTRIBUTOR)) { model.addAttribute("isProjectContributor", true); } else { model.addAttribute("isProjectContributor", false); } return "auth/workbench/project"; }