// this method should be invoked from within the transaction wrapper that covers the request
 // processing so
 // that the db-calls in this method do not each generate new transactions. If executed from within
 // the context
 // of display rendering, this logic will be quite expensive due to the number of new transactions
 // needed.
 @Override
 public Collection<CMT> getAssignmentCommittees(
     String protocolLeadUnit, String docRouteStatus, String currentCommitteeId) {
   Collection<CMT> assignmentCommittees = new ArrayList<CMT>();
   // get the initial list of all valid committees; some of them will be filtered out by the logic
   // below
   Collection<CMT> candidateCommittees = getCandidateCommittees();
   if (CollectionUtils.isNotEmpty(candidateCommittees)) {
     if (isSaved(docRouteStatus)) {
       // Use the lead unit of the protocol to determine committees
       Set<String> unitIds = getProtocolUnitIds(protocolLeadUnit);
       for (CMT committee : candidateCommittees) {
         if (StringUtils.equalsIgnoreCase(committee.getCommitteeDocument().getDocStatusCode(), "F")
             && unitIds.contains(committee.getHomeUnit().getUnitNumber())) {
           assignmentCommittees.add(committee);
         }
       }
     } else {
       // we check the current user's authorization to assign committees
       String principalId = GlobalVariables.getUserSession().getPerson().getPrincipalId();
       for (CMT committee : candidateCommittees) {
         if (isCurrentUserAuthorizedToAssignThisCommittee(principalId, committee)
             || committee.getCommitteeId().equals(currentCommitteeId)) {
           assignmentCommittees.add(committee);
         }
       }
     }
   }
   return assignmentCommittees;
 }