/** * Gets a CLU. * * @param cluId CLU id * @return CLU * @throws OperationFailedException If retrieving CLU fails */ public CluInfo getCluInfo(String cluId, ContextInfo contextInfo) throws OperationFailedException { if (cluId == null) { return null; } try { VersionDisplayInfo versionInfo = cluService.getCurrentVersion(CluServiceConstants.CLU_NAMESPACE_URI, cluId, null); CluInfo clu = this.cluService.getClu(versionInfo.getId(), contextInfo); return clu; } catch(Exception e) { throw new OperationFailedException(e.getMessage(), e); } }
/** * Get the current version of course from another version of course * * */ protected CourseInfo getCurrentVersionOfCourse(CourseInfo course,ContextInfo contextInfo) throws Exception { // Get version independent id of course String verIndId = course.getVersion().getVersionIndId(); // Get id of current version of course given the versionindependen id VersionDisplayInfo curVerDisplayInfo = courseService.getCurrentVersion( CourseServiceConstants.COURSE_NAMESPACE_URI, verIndId,contextInfo); String curVerId = curVerDisplayInfo.getId(); // Return the current version of the course CourseInfo currVerCourse = courseService.getCourse(curVerId,contextInfo); return currVerCourse; }
/** * Get the current version of program given the selected version of program * * @param majorDisciplineInfo * @param contextInfo */ protected MajorDisciplineInfo getCurrentVersion(MajorDisciplineInfo majorDisciplineInfo, ContextInfo contextInfo) throws Exception { // Get version independent id of program String verIndId = majorDisciplineInfo.getVersion().getVersionIndId(); // Get id of current version of program given the version independent id VersionDisplayInfo curVerDisplayInfo = null; curVerDisplayInfo = programService.getCurrentVersion(ProgramServiceConstants.PROGRAM_NAMESPACE_MAJOR_DISCIPLINE_URI, verIndId, contextInfo); String curVerId = null; curVerId = curVerDisplayInfo.getId(); // Return the current version of the course MajorDisciplineInfo currentVersion = programService.getMajorDiscipline(curVerId, contextInfo); return currentVersion; }
/** * Get the current version of program given the selected version of program * * @param verIndId */ protected CoreProgramInfo getCurrentVersion(CoreProgramInfo coreProgramInfo) throws Exception { // Get version independent id of program String verIndId = coreProgramInfo.getVersion().getVersionIndId(); // Get id of current version of program given the version independent id VersionDisplayInfo curVerDisplayInfo = programService.getCurrentVersion(ProgramServiceConstants.PROGRAM_NAMESPACE_MAJOR_DISCIPLINE_URI, verIndId,ContextUtils.getContextInfo()); String curVerId = curVerDisplayInfo.getId(); // Return the current version of the course CoreProgramInfo currentVersion = programService.getCoreProgram(curVerId,ContextUtils.getContextInfo()); return currentVersion; }
/** * Get the current version of program given the selected version of program * * @param credentialProgramInfo */ protected CredentialProgramInfo getCurrentVersion(CredentialProgramInfo credentialProgramInfo) throws Exception { // Get version independent id of program String verIndId = credentialProgramInfo.getVersion().getVersionIndId(); // Get id of current version of program given the version independent id VersionDisplayInfo curVerDisplayInfo = programService.getCurrentVersion( ProgramServiceConstants.PROGRAM_NAMESPACE_MAJOR_DISCIPLINE_URI, verIndId,ContextUtils.getContextInfo()); String curVerId = curVerDisplayInfo.getId(); // Return the current version of the course CredentialProgramInfo currentVersion = programService.getCredentialProgram(curVerId,ContextUtils.getContextInfo()); return currentVersion; }
/** * Get the current version of program given the selected version of program * * @param verIndId */ protected MajorDisciplineInfo getCurrentVersion(MajorDisciplineInfo majorDisciplineInfo) throws Exception { // Get version independent id of program String verIndId = majorDisciplineInfo.getVersion().getVersionIndId(); // Get id of current version of program given the version independent id VersionDisplayInfo curVerDisplayInfo = null; curVerDisplayInfo = programService.getCurrentVersion(ProgramServiceConstants.PROGRAM_NAMESPACE_MAJOR_DISCIPLINE_URI, verIndId,ContextUtils.getContextInfo()); String curVerId = curVerDisplayInfo.getId(); // Return the current version of the course MajorDisciplineInfo currentVersion = programService.getMajorDiscipline(curVerId,ContextUtils.getContextInfo()); return currentVersion; }
boolean updateState = isVersionNewerThanCurrentVersion && !isVersionSelectedVersion; if (updateState) { CredentialProgramInfo otherProgram = programService.getCredentialProgram(versionInfo.getId(),ContextUtils.getContextInfo()); if (otherProgram.getStateKey().equals(DtoConstants.STATE_APPROVED) || otherProgram.getStateKey().equals(DtoConstants.STATE_ACTIVE)){
boolean updateState = isVersionNewerThanCurrentVersion && !isVersionSelectedVersion; if (updateState) { CoreProgramInfo otherProgram = programService.getCoreProgram(versionInfo.getId(),ContextUtils.getContextInfo()); if (otherProgram.getStateKey().equals(DtoConstants.STATE_APPROVED) || otherProgram.getStateKey().equals(DtoConstants.STATE_ACTIVE)){
for (VersionDisplayInfo versionInfo : versions) { if (versionInfo.getSequenceNumber().equals(sequenceNumber)) { previousVersion = programService.getMajorDiscipline(versionInfo.getId(),ContextUtils.getContextInfo()); break;
if (versionInfo.getSequenceNumber() >= startSeq && versionInfo.getSequenceNumber() != selectedVersion.getVersion().getSequenceNumber()) { MajorDisciplineInfo otherProgram = null; otherProgram = programService.getMajorDiscipline(versionInfo.getId(), contextInfo); if (otherProgram.getStateKey().equals(DtoConstants.STATE_APPROVED) || otherProgram.getStateKey().equals(DtoConstants.STATE_ACTIVE)){
boolean updateState = isVersionNewerThanCurrentVersion && !isVersionSelectedVersion; if (updateState) { MajorDisciplineInfo otherProgram = programService.getMajorDiscipline(versionInfo.getId(),ContextUtils.getContextInfo()); if (otherProgram.getStateKey().equals(DtoConstants.STATE_APPROVED) || otherProgram.getStateKey().equals(DtoConstants.STATE_ACTIVE)){
mdInfo = programService.getMajorDiscipline(mdVersionInfo.getId(),ContextUtils.getContextInfo());
if (oldClu == null || !versionInFuture.getId().equals(oldClu.getId())) { VersionEntity futureClu; try { futureClu = luDao.fetch(Clu.class, versionInFuture.getId()); } catch (org.kuali.student.r2.common.exceptions.DoesNotExistException ex) { throw new DoesNotExistException(versionInFuture.getId(), ex);
if (versionInfo.getSequenceNumber() >= startSeq) { CourseInfo otherCourse = courseService .getCourse(versionInfo.getId(),contextInfo); if (otherCourse.getStateKey().equals( DtoConstants.STATE_APPROVED)