Exemple #1
0
 /**
  * Gets the site roles mapping.
  *
  * @return the site roles mapping
  */
 @Transient
 public Map<String, List<String>> getSiteRolesMapping() {
   Map<String, List<String>> siteRolesMap = new HashMap<String, List<String>>();
   List<String> roleCodeList = null;
   for (SiteResearchStaff siteResearchStaff : getSiteResearchStaffs()) {
     for (SiteResearchStaffRole siteResearchStaffRole :
         siteResearchStaff.getSiteResearchStaffRoles()) {
       roleCodeList = new ArrayList<String>();
       roleCodeList.add(siteResearchStaffRole.getRoleCode());
     }
     siteRolesMap.put(siteResearchStaff.getOrganization().getNciInstituteCode(), roleCodeList);
   }
   return siteRolesMap;
 }
Exemple #2
0
 /**
  * Gets the all roles.
  *
  * @return the all roles
  */
 @Transient
 public List<String> getAllRoles() {
   Set<String> roleSet = new HashSet<String>();
   for (SiteResearchStaff siteResearchStaff : getSiteResearchStaffs()) {
     for (SiteResearchStaffRole siteResearchStaffRole :
         siteResearchStaff.getSiteResearchStaffRoles()) {
       if (siteResearchStaffRole.isActive()) {
         roleSet.add(siteResearchStaffRole.getRoleCode());
       }
     }
   }
   List<String> roleList = new ArrayList<String>();
   roleList.addAll(roleSet);
   return roleList;
 }