@Transactional(noRollbackFor=DoesNotExistException.class, rollbackFor=java.lang.Throwable.class) public class MajorDisciplineStateChangeServiceImpl extends Object implements StateChangeService
We have a separate class because the operations need to be marked with the @Transactional annotation.
THIS CLASS IS DUPLICATED FOR MAJOR DISCIPLINE, CORE, AND CREDENTIAL PROGRAMS SINCE THERE ARE DIFFERENT SERVICE METHODS FOR EACH OF THESE TYPES (THOUGH THEY ARE SIMILAR)
Constructor and Description |
---|
MajorDisciplineStateChangeServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
changeState(String majorDisciplineId,
String newState,
ContextInfo contextInfo)
This method is called by workflow when the state changes.
|
void |
changeState(String endEntryTerm,
String endEnrollTerm,
String endInstAdmitTerm,
String majorDisciplineId,
String newState,
ContextInfo contextInfo)
This method is called from the UI (servlet) when state changes.
|
protected MajorDisciplineInfo |
getCurrentVersion(MajorDisciplineInfo majorDisciplineInfo,
ContextInfo contextInfo)
Get the current version of program given the selected version of program
|
void |
setAtpService(AtpService atpService) |
void |
setProgramService(ProgramService programService)
This method is used by Spring to inject the program service into this bean.
|
void |
updateRequirementsState(List<String> programRequirementIds,
String newState,
ContextInfo contextInfo)
This method will update the requirement state.
|
void |
updateVariationsRequirementsState(List<ProgramVariationInfo> variationList,
String newState,
ContextInfo contextInfo)
This method will update the requirements of each variation.
|
public MajorDisciplineStateChangeServiceImpl()
public void changeState(String majorDisciplineId, String newState, ContextInfo contextInfo) throws Exception
changeState
in interface StateChangeService
majorDisciplineId
- newState
- Exception
public void changeState(String endEntryTerm, String endEnrollTerm, String endInstAdmitTerm, String majorDisciplineId, String newState, ContextInfo contextInfo) throws Exception
changeState
in interface StateChangeService
endEntryTerm
- endEnrollTerm
- contextInfo
- majorDisciplineId
- newState
- Exception
protected MajorDisciplineInfo getCurrentVersion(MajorDisciplineInfo majorDisciplineInfo, ContextInfo contextInfo) throws Exception
majorDisciplineInfo
- contextInfo
- Exception
public void updateRequirementsState(List<String> programRequirementIds, String newState, ContextInfo contextInfo) throws Exception
Note that it uses StatementUtil to update the statement tree.
programRequirementIds
- newState
- contextInfo
- Exception
public void updateVariationsRequirementsState(List<ProgramVariationInfo> variationList, String newState, ContextInfo contextInfo) throws Exception
We need to do this here as opposed to in the assemblers, since we need to make calls out to a separate web service. Also, this needs to be done here because changing state no longer calls the save function.
Note that core and credential programs do not have variations so this method isn't necessary.
variationList
- newState
- Exception
public void setProgramService(ProgramService programService)
programService
- public void setAtpService(AtpService atpService)
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.