@Override
 public AltCourseWaitListEntryInfo getCourseWaitListEntry(
     String courseWaitListEntryId, ContextInfo contextInfo)
     throws DoesNotExistException, InvalidParameterException, MissingParameterException,
         OperationFailedException, PermissionDeniedException {
   List<LprInfo> lprs = lprService.getLprsByMasterLprId(courseWaitListEntryId, contextInfo);
   LprInfo rgLpr = null, coLpr = null;
   for (LprInfo lpr : lprs) {
     if (lpr.getTypeKey().equals(LprServiceConstants.WAITLIST_CO_LPR_TYPE_KEY)) {
       coLpr = lpr;
     } else if (lpr.getTypeKey().equals(LprServiceConstants.WAITLIST_RG_LPR_TYPE_KEY)) {
       rgLpr = lpr;
     }
   }
   if (rgLpr == null || coLpr == null) {
     throw new DoesNotExistException("Either RG WL LPR or CO WL LPR is missing");
   }
   AltCourseWaitListEntryInfo info = new AltCourseWaitListEntryInfo();
   info.setPersonId(rgLpr.getPersonId());
   info.setStateKey(rgLpr.getStateKey()); // For now, don't translate
   info.setTypeKey(rgLpr.getTypeKey()); // For now, don't translate
   info.setTermId(rgLpr.getAtpId());
   info.setCourseOfferingId(coLpr.getLuiId());
   info.setRegistrationGroupId(rgLpr.getLuiId());
   info.setId(rgLpr.getMasterLprId());
   info.setCrossListedCode(rgLpr.getCrossListedCode());
   info.setAttributes(rgLpr.getAttributes());
   for (String rvgKey : rgLpr.getResultValuesGroupKeys()) {
     if (rvgKey.startsWith(LrcServiceConstants.RESULT_GROUP_KEY_GRADE_BASE)) {
       info.setGradingOptionId(rvgKey);
     } else if (rvgKey.startsWith(
         LrcServiceConstants.RESULT_GROUP_KEY_KUALI_CREDITTYPE_CREDIT_BASE)) {
       // This will be replaced with just the key in the future
       info.setCredits(
           new KualiDecimal(
               rvgKey.substring(
                   LrcServiceConstants.RESULT_GROUP_KEY_KUALI_CREDITTYPE_CREDIT_BASE.length())));
     }
   }
   info.setEffectiveDate(rgLpr.getEffectiveDate());
   info.setExpirationDate(rgLpr.getExpirationDate());
   info.setMeta(rgLpr.getMeta());
   return info;
 }
  private List<WaitlistInfo> getPotentialWaitlistInfos(
      Map<String, Set<String>> rgIdToAoIds, ContextInfo contextInfo)
      throws MissingParameterException, PermissionDeniedException, InvalidParameterException,
          OperationFailedException, DoesNotExistException {

    List<LprInfo> lprInfos = getWaitlistMasterLprs(rgIdToAoIds, contextInfo);
    List<WaitlistInfo> waitlistInfos = new ArrayList<>();

    for (LprInfo masterLpr : lprInfos) {
      String rgId = masterLpr.getLuiId();
      String personId = masterLpr.getPersonId();
      String masterLprId = masterLpr.getMasterLprId();
      String atpId = masterLpr.getAtpId();
      waitlistInfos.add(new WaitlistInfo(rgId, personId, masterLprId, atpId));
    }

    return waitlistInfos;
  }