org.kuali.student.lum.workflow
Class CourseStateChangeServiceImpl

java.lang.Object
  extended by org.kuali.student.lum.workflow.CourseStateChangeServiceImpl

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


Constructor Summary
CourseStateChangeServiceImpl()
           
 
Method Summary
protected  void activateCourse(CourseInfo courseToActivate, String prevEndTermAtpId, ContextInfo contextInfo)
          Activate a course version.
 StatusInfo changeState(String courseId, String newState, String prevEndTermAtpId, ContextInfo contextInfo)
          Change the state of a course to a new state.
protected  CourseInfo getCurrentVersionOfCourse(CourseInfo course, ContextInfo contextInfo)
          Get the current version of course from another version of course
protected  void retireCourse(CourseInfo courseToRetire, ContextInfo contextInfo)
          Retire a course version.
 void setCourseService(CourseService courseService)
           
 void updateStatementTreeViewInfoState(CourseInfo courseInfo, ContextInfo contextInfo)
          This method will load all the statements in a course from the course web service, recursively update the state of each statement in the statement tree, and save the update statements back to the web service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourseStateChangeServiceImpl

public CourseStateChangeServiceImpl()
Method Detail

changeState

public StatusInfo changeState(String courseId,
                              String newState,
                              String prevEndTermAtpId,
                              ContextInfo contextInfo)
                       throws Exception
Change the state of a course to a new state. This method exists to help handle some extra logic that was required to implement Pilot courses, Administrative Retire and Retire by Proposal.

Parameters:
courseId - id of course
newState - the new state for the course
prevEndTermAtpId - the current version end date of course
Returns:
Throws:
Exception

activateCourse

protected void activateCourse(CourseInfo courseToActivate,
                              String prevEndTermAtpId,
                              ContextInfo contextInfo)
                       throws Exception
Activate a course version. Only course with a state of "Approved" can be activated.

Parameters:
courseToActivate -
prevEndTermAtpId - the end term we set on the current version
Throws:
Exception

retireCourse

protected void retireCourse(CourseInfo courseToRetire,
                            ContextInfo contextInfo)
                     throws Exception
Retire a course version. Only course with a state of "Active" or "Suspended" can be retired

Parameters:
courseToRetire - the course to retire
Throws:
Exception

getCurrentVersionOfCourse

protected CourseInfo getCurrentVersionOfCourse(CourseInfo course,
                                               ContextInfo contextInfo)
                                        throws Exception
Get the current version of course from another version of course

Throws:
Exception

setCourseService

public void setCourseService(CourseService courseService)

updateStatementTreeViewInfoState

public void updateStatementTreeViewInfoState(CourseInfo courseInfo,
                                             ContextInfo contextInfo)
                                      throws DoesNotExistException,
                                             InvalidParameterException,
                                             MissingParameterException,
                                             OperationFailedException,
                                             PermissionDeniedException,
                                             DataValidationErrorException,
                                             CircularReferenceException,
                                             VersionMismatchException
This method will load all the statements in a course from the course web service, recursively update the state of each statement in the statement tree, and save the update statements back to the web service.

Parameters:
courseInfo - The course to update (call setState() in this object to set the state)
Throws:
DoesNotExistException
InvalidParameterException
MissingParameterException
OperationFailedException
PermissionDeniedException
DataValidationErrorException
CircularReferenceException
VersionMismatchException


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.