コード例 #1
0
 private List<LprInfo> getWaitlistMasterLprs(
     Map<String, Set<String>> rgIdToAoIds, ContextInfo context)
     throws MissingParameterException, InvalidParameterException, OperationFailedException,
         PermissionDeniedException {
   List<LprInfo> waitListLprs = new ArrayList<>();
   for (String rgId : rgIdToAoIds.keySet()) {
     List<LprInfo> lprs = lprService.getLprsByLui(rgId, context);
     for (LprInfo lpr : lprs) {
       if (LprServiceConstants.WAITLIST_RG_LPR_TYPE_KEY.equals(lpr.getTypeKey())) {
         waitListLprs.add(lpr);
       }
     }
   }
   return waitListLprs;
 }
コード例 #2
0
 @Override
 public AltActivityWaitListEntryInfo getActivityWaitListEntry(
     String activityWaitListEntryId, ContextInfo contextInfo)
     throws DoesNotExistException, InvalidParameterException, MissingParameterException,
         OperationFailedException, PermissionDeniedException {
   LprInfo aoLpr = lprService.getLpr(activityWaitListEntryId, contextInfo);
   AltActivityWaitListEntryInfo info = new AltActivityWaitListEntryInfo();
   info.setPersonId(aoLpr.getPersonId());
   info.setStateKey(aoLpr.getStateKey()); // For now, don't translate
   info.setTypeKey(aoLpr.getTypeKey()); // For now, don't translate
   info.setId(aoLpr.getMasterLprId());
   info.setAttributes(aoLpr.getAttributes());
   info.setEffectiveDate(aoLpr.getEffectiveDate());
   info.setExpirationDate(aoLpr.getExpirationDate());
   return info;
 }
コード例 #3
0
 @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;
 }