Class AvailableRolesBean
- java.lang.Object
-
- jetbrains.buildServer.controllers.user.AvailableRolesBean
-
public class AvailableRolesBean extends Object
- Author:
- Pavel.Sher Date: 15.10.2007
-
-
Constructor Summary
Constructors Constructor Description AvailableRolesBean(RolesManager rolesManager, SecurityContextEx securityContext, ProjectManager projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ProjectHierarchyBean>collectProjects(Map<RoleBean,Set<SProject>> projectMap)Collects unique projects from a project mapList<RoleBean>getAvailableRoles()Map<RoleBean,Set<SProject>>getProjectsMap()Returns map of role to projects where this role can be assigned, in project itself or in any of subprojects.Map<String,RoleProjectsBean>getRoleProjects()booleanisRoleCanBeGranted(Role role, SProject project)voidsetEditee(RolesHolder editee)If editee is set then getAvailableRoles and getProjectsMap methods will return only those combinations of role - project that are not yet assigned to the editee
-
-
-
Constructor Detail
-
AvailableRolesBean
public AvailableRolesBean(@NotNull RolesManager rolesManager, @NotNull SecurityContextEx securityContext, @NotNull ProjectManager projectManager)
-
-
Method Detail
-
setEditee
public void setEditee(RolesHolder editee)
If editee is set then getAvailableRoles and getProjectsMap methods will return only those combinations of role - project that are not yet assigned to the editee- Parameters:
editee-
-
getProjectsMap
public Map<RoleBean,Set<SProject>> getProjectsMap()
Returns map of role to projects where this role can be assigned, in project itself or in any of subprojects. Set can contain null element - this element indicates "All projects" option.- Returns:
-
collectProjects
public List<ProjectHierarchyBean> collectProjects(Map<RoleBean,Set<SProject>> projectMap)
Collects unique projects from a project map- Parameters:
projectMap- project map- Returns:
- a sorted list of project hierarchy beans
-
getRoleProjects
@NotNull public Map<String,RoleProjectsBean> getRoleProjects()
-
-