@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; }
@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; }