|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.lum.workflow.MajorDisciplineStateChangeServiceImpl
@Transactional(noRollbackFor=DoesNotExistException.class, rollbackFor=java.lang.Throwable.class) public class MajorDisciplineStateChangeServiceImpl
This class is called whenever the state of a major discipline changes.
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)
Field Summary | |
---|---|
private AtpService |
atpService
|
private ProgramService |
programService
The program service - injected by spring. |
Constructor Summary | |
---|---|
MajorDisciplineStateChangeServiceImpl()
|
Method Summary | |
---|---|
void |
changeState(String majorDisciplineId,
String newState)
This method is called by workflow when the state changes. |
void |
changeState(String endEntryTerm,
String endEnrollTerm,
String endInstAdmitTerm,
String majorDisciplineId,
String newState)
This method is called from the UI (servlet) when state changes. |
protected MajorDisciplineInfo |
getCurrentVersion(MajorDisciplineInfo majorDisciplineInfo)
Get the current version of program given the selected version of program |
private void |
makeCurrent(MajorDisciplineInfo majorDisciplineInfo)
This method will make this version of the major discipline the current one. |
void |
setAtpService(AtpService atpService)
|
private void |
setEndTerms(MajorDisciplineInfo majorDisciplineInfo,
String endEntryTerm,
String endEnrollTerm,
String endInstAdmitTerm)
This method updates the end terms for the major discipline passed into it. |
void |
setProgramService(ProgramService programService)
This method is used by Spring to inject the program service into this bean. |
private void |
updateMajorDisciplineInfoState(MajorDisciplineInfo majorDisciplineInfo,
String newState)
This method will update the state of this object and all associated objects. |
private void |
updatePreviousVersions(MajorDisciplineInfo selectedVersion,
String endEntryTerm,
String endEnrollTerm,
String endInstAdmitTerm)
This method finds all previous versions of program and sets all previous ACTIVE,APPROVED,DRAFT versions to SUPERSEDED and sets new end terms for previous current version. |
void |
updateRequirementsState(List<String> programRequirementIds,
String newState)
This method will update the requirement state. |
void |
updateVariationsRequirementsState(List<ProgramVariationInfo> variationList,
String newState)
This method will update the requirements of each variation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ProgramService programService
private AtpService atpService
Constructor Detail |
---|
public MajorDisciplineStateChangeServiceImpl()
Method Detail |
---|
public void changeState(String majorDisciplineId, String newState) throws Exception
changeState
in interface StateChangeService
majorDisciplineId
- state
-
Exception
public void changeState(String endEntryTerm, String endEnrollTerm, String endInstAdmitTerm, String majorDisciplineId, String newState) throws Exception
changeState
in interface StateChangeService
endEntryTerm
- endEnrollTerm
- programType
- majorDisciplineId
- newState
-
Exception
private void updateMajorDisciplineInfoState(MajorDisciplineInfo majorDisciplineInfo, String newState) throws Exception
It is needed because we need to make separate web service calls to update the state of these objects.
majorDisciplineInfo
- newState
-
Exception
private void makeCurrent(MajorDisciplineInfo majorDisciplineInfo) throws Exception
majorDisciplineInfo
-
Exception
private void updatePreviousVersions(MajorDisciplineInfo selectedVersion, String endEntryTerm, String endEnrollTerm, String endInstAdmitTerm) throws Exception
majorDisciplineInfo
- The version of major discipline program being activatedendEntryTerm
- The new end entry term to set on previous active versionendEnrollTerm
- The new end enroll term to set on previous active version
Exception
protected MajorDisciplineInfo getCurrentVersion(MajorDisciplineInfo majorDisciplineInfo) throws Exception
verIndId
-
Exception
private void setEndTerms(MajorDisciplineInfo majorDisciplineInfo, String endEntryTerm, String endEnrollTerm, String endInstAdmitTerm) throws InvalidParameterException, MissingParameterException, OperationFailedException, DoesNotExistException
You must still call updateState() to save the object using the web service.
majorDisciplineInfo
- endEntryTerm
- endEnrollTerm
- endInstAdmitTerm
-
OperationFailedException
MissingParameterException
InvalidParameterException
DoesNotExistException
public void updateRequirementsState(List<String> programRequirementIds, String newState) throws Exception
Note that it uses StatementUtil to update the statement tree.
majorDisciplineInfo
- newState
-
Exception
public void updateVariationsRequirementsState(List<ProgramVariationInfo> variationList, String newState) 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.
majorDisciplineInfo
- newState
-
Exception
public void setProgramService(ProgramService programService)
programService
- public void setAtpService(AtpService atpService)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |