org.kuali.student.lum.lu.ui.course.server.gwt
Class CourseStateChangeServiceImpl

java.lang.Object
  extended by org.kuali.student.lum.lu.ui.course.server.gwt.CourseStateChangeServiceImpl

@Transactional(noRollbackFor=DoesNotExistException.class,
               rollbackFor=java.lang.Throwable.class)
public class CourseStateChangeServiceImpl
extends Object


Field Summary
private  CourseService courseService
           
 
Constructor Summary
CourseStateChangeServiceImpl()
           
 
Method Summary
 StatusInfo changeState(String courseId, String newState, Date currentVersionStart)
           
 void setCourseService(CourseService courseService)
           
 void statementTreeViewInfoStateSetter(String courseState, Iterator<StatementTreeViewInfo> itr)
           
private  void updateCourseVersionStates(CourseInfo thisVerCourse, String thisVerNewState, CourseInfo currVerCourse, String currVerNewState, boolean makeCurrent, Date currentVersionStart)
          Based on null values, updates states of thisVerCourse and currVerCourse and sets thisVerCourse as the current version.
 void updateStatementTreeViewInfoState(CourseInfo courseInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

courseService

private CourseService courseService
Constructor Detail

CourseStateChangeServiceImpl

public CourseStateChangeServiceImpl()
Method Detail

changeState

public StatusInfo changeState(String courseId,
                              String newState,
                              Date currentVersionStart)
                       throws Exception
Throws:
Exception

updateCourseVersionStates

@Transactional(readOnly=false)
private void updateCourseVersionStates(CourseInfo thisVerCourse,
                                                             String thisVerNewState,
                                                             CourseInfo currVerCourse,
                                                             String currVerNewState,
                                                             boolean makeCurrent,
                                                             Date currentVersionStart)
                                throws Exception
Based on null values, updates states of thisVerCourse and currVerCourse and sets thisVerCourse as the current version. Attempts to rollback transaction on exception.

Parameters:
thisVerCourse - this is the version that the user selected to change the state
thisVerNewState - this is state that the user selected to change thisVerCourse to
currVerCourse - this is the current version of the course (currentVersionStartDt <= now && currentVersionEndDt > now)
currVerNewState - this is the state that we need to set the current version to. Set to null to not update the currVerCourse state.
makeCurrent - if true we'll set thisVerCourse as the current version.
currentVersionStart - the start date for the new current version to start on and the old current version to end on. Set to null to use now as the start date.
Throws:
Exception

setCourseService

public void setCourseService(CourseService courseService)

statementTreeViewInfoStateSetter

public void statementTreeViewInfoStateSetter(String courseState,
                                             Iterator<StatementTreeViewInfo> itr)

updateStatementTreeViewInfoState

public void updateStatementTreeViewInfoState(CourseInfo courseInfo)
                                      throws DoesNotExistException,
                                             InvalidParameterException,
                                             MissingParameterException,
                                             OperationFailedException,
                                             PermissionDeniedException,
                                             DataValidationErrorException,
                                             CircularReferenceException,
                                             VersionMismatchException
Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DataValidationErrorException
CircularReferenceException
VersionMismatchException


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.