org.kuali.student.lum.workflow
Class CoursePostProcessorBase

java.lang.Object
  extended by org.kuali.student.lum.workflow.KualiStudentPostProcessorBase
      extended by org.kuali.student.lum.workflow.CoursePostProcessorBase
All Implemented Interfaces:
PostProcessor

@Transactional(readOnly=true,
               rollbackFor=java.lang.Throwable.class)
public class CoursePostProcessorBase
extends KualiStudentPostProcessorBase

A base post processor class for Course document types in Workflow.


Constructor Summary
CoursePostProcessorBase()
           
 
Method Summary
protected  String getCluStateForRouteStatus(String currentCluState, String newWorkflowStatusCode, String docType)
          This method returns the state a clu should go to, based on the Proposal's docType and the newWorkflow StatusCode which are passed in.
protected  String getCourseId(ProposalInfo proposalInfo)
           
protected  CourseService getCourseService()
           
protected  CourseStateChangeServiceImpl getCourseStateChangeService()
           
protected  String getCourseStateFromNewState(String currentCourseState, String newCourseState)
          Default behavior is to return the newCluState variable only if it differs from the currentCluState value.
protected  boolean preProcessCourseSave(IDocumentEvent iDocumentEvent, CourseInfo courseInfo)
           
protected  boolean processCustomActionTaken(ActionTakenEvent actionTakenEvent, ActionTaken actionTaken, ProposalInfo proposalInfo)
           
protected  boolean processCustomRouteStatusChange(DocumentRouteStatusChange statusChangeEvent, ProposalInfo proposalInfo)
          This method takes a clu proposal, determines what the "new state" of the clu should be, then routes the clu I, and the new state to CourseStateChangeServiceImpl.java
protected  void processWithdrawActionTaken(ActionTakenEvent actionTakenEvent, ProposalInfo proposalInfo)
          This method changes the state of the course when a Withdraw action is processed on a proposal.
protected  void retireCourseByProposalCopyAndSave(String courseState, CourseInfo courseInfo, ProposalInfo proposalInfo)
          In this method, the proposal object fields are copied to the cluInfo object fields to pass validation.
 void statementTreeViewInfoStateSetter(String courseState, Iterator<StatementTreeViewInfo> itr)
           
protected  void updateCourse(IDocumentEvent iDocumentEvent, String courseState, CourseInfo courseInfo, ProposalInfo proposalInfo)
           
 
Methods inherited from class org.kuali.student.lum.workflow.KualiStudentPostProcessorBase
afterActionTaken, afterProcess, beforeProcess, doActionTaken, doDeleteRouteHeader, doRouteLevelChange, doRouteStatusChange, getDocumentIdsToLock, getPrincipalIdForSystemUser, getProposalService, getProposalStateForRouteStatus, getProposalStateFromNewState, getStateFromNewState, getWorkflowDocumentService, preProcessProposalSave, processActionTakenOnAdhocRequest, processCustomRouteLevelChange, processCustomRouteStatusSavedStatusChange, processCustomSaveActionTaken, processSuperUserDisapproveActionTaken, removeCommentAdhocPermissions, removeEditAdhocPermissions, updateProposal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoursePostProcessorBase

public CoursePostProcessorBase()
Method Detail

processWithdrawActionTaken

protected void processWithdrawActionTaken(ActionTakenEvent actionTakenEvent,
                                          ProposalInfo proposalInfo)
                                   throws Exception
This method changes the state of the course when a Withdraw action is processed on a proposal. For create and modify proposals, a new clu was created which needs to be cancelled via setting it to "not approved." For retirement proposals, a clu is never actually created, therefore we don't update the clu at all if it is withdrawn.

Overrides:
processWithdrawActionTaken in class KualiStudentPostProcessorBase
Parameters:
actionTakenEvent - - contains the docId, the action taken (code "d"), the principalId which submitted it, etc
proposalInfo - - The proposal object being withdrawn
Throws:
Exception

processCustomActionTaken

protected boolean processCustomActionTaken(ActionTakenEvent actionTakenEvent,
                                           ActionTaken actionTaken,
                                           ProposalInfo proposalInfo)
                                    throws Exception
Overrides:
processCustomActionTaken in class KualiStudentPostProcessorBase
Throws:
Exception

processCustomRouteStatusChange

protected boolean processCustomRouteStatusChange(DocumentRouteStatusChange statusChangeEvent,
                                                 ProposalInfo proposalInfo)
                                          throws Exception
This method takes a clu proposal, determines what the "new state" of the clu should be, then routes the clu I, and the new state to CourseStateChangeServiceImpl.java

Overrides:
processCustomRouteStatusChange in class KualiStudentPostProcessorBase
Throws:
Exception

retireCourseByProposalCopyAndSave

protected void retireCourseByProposalCopyAndSave(String courseState,
                                                 CourseInfo courseInfo,
                                                 ProposalInfo proposalInfo)
                                          throws Exception
In this method, the proposal object fields are copied to the cluInfo object fields to pass validation. This method copies data from the custom Retire By Proposal proposalInfo Object Fields into the courseInfo object so that upon save it will pass validation. Admin Retire and Retire by Proposal both end up here. This Route will get you here, Route Statuses: 'S' Saved 'R' Enroute 'A' Approved - After final approve, status is set to 'A' 'P' Processed - During this run through coursepostprocessorbase, assuming doctype is Retire, we end up here.

Parameters:
courseState - - used to confirm state is retired
courseInfo - - course object we are updating
proposalInfo - - proposal object which has the on-screen fields we are copying from
Throws:
Exception

getCourseId

protected String getCourseId(ProposalInfo proposalInfo)
                      throws OperationFailedException
Throws:
OperationFailedException

getCluStateForRouteStatus

protected String getCluStateForRouteStatus(String currentCluState,
                                           String newWorkflowStatusCode,
                                           String docType)
This method returns the state a clu should go to, based on the Proposal's docType and the newWorkflow StatusCode which are passed in.

Parameters:
currentCluState - - the current state set on the CLU
newWorkflowStatusCode - - the new route status code that is getting set on the workflow document
docType - - The doctype of the proposal which kicked off this workflow.
Returns:
the CLU state to set or null if the CLU does not need it's state changed

getCourseStateFromNewState

protected String getCourseStateFromNewState(String currentCourseState,
                                            String newCourseState)
Default behavior is to return the newCluState variable only if it differs from the currentCluState value. Otherwise null will be returned.


updateCourse

@Transactional(readOnly=false,
               noRollbackFor=DoesNotExistException.class,
               rollbackFor=java.lang.Throwable.class)
protected void updateCourse(IDocumentEvent iDocumentEvent,
                                                                                                                              String courseState,
                                                                                                                              CourseInfo courseInfo,
                                                                                                                              ProposalInfo proposalInfo)
                     throws Exception
Throws:
Exception

preProcessCourseSave

protected boolean preProcessCourseSave(IDocumentEvent iDocumentEvent,
                                       CourseInfo courseInfo)

getCourseService

protected CourseService getCourseService()

getCourseStateChangeService

protected CourseStateChangeServiceImpl getCourseStateChangeService()

statementTreeViewInfoStateSetter

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


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