Class AvailableRolesBean


  • public class AvailableRolesBean
    extends Object
    Author:
    Pavel.Sher Date: 15.10.2007
    • Method Detail

      • isRoleCanBeGranted

        public boolean isRoleCanBeGranted​(Role role,
                                          SProject project)
      • 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 -
      • getAvailableRoles

        public List<RoleBean> getAvailableRoles()
      • 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