|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bibalex.daf.entities.job.JobState org.bibalex.daf.entities.job.RedirectingState
public class RedirectingState
This class contains the logic necessary to redirect the job. Calling makeTransition method will cause the job to be redirected.
Field Summary | |
---|---|
private java.lang.String |
comment
|
private Phase |
currentPhase
|
private java.lang.String |
destination
|
private java.lang.String |
errorMessage
|
private FileHandler |
ftpHandler
|
private TransitionInfo |
info
|
private Job |
job
|
private int |
nextPhase
|
private int |
nextUser
|
private java.lang.String |
source
|
private User |
user
|
private WorkStation |
workstation
|
Constructor Summary | |
---|---|
RedirectingState(Job job,
User user,
WorkStation workstation,
int nextUser,
int nextPhase,
java.lang.String comment)
Creates a new instance of RedirectingState. |
Method Summary | |
---|---|
void |
canRedirect_FileLevelInfo(java.util.ArrayList<FileLevelInfo> todoInfo,
java.util.ArrayList<FileLevelInfo> nextInfo,
Phase currentPhase,
int nextPhaseID)
Determines whether the job can be redirected to the given phase because of the FileLevelInfo or not. A Job can be redirected to the given phase, if it satisfies the following conditions: 1) All the ToDo entries that point to this phase are done. 2) The given phase is equal to or less than the minimum phase in the ToDo and Next FileLevelInfo. |
java.lang.String |
getErrorMessage()
This method gets the mesage that is to be displaed to the user |
java.lang.String |
getName()
Gets the name of the state. |
int |
getNoOfFiles()
Gets the number of files required to be transferred in order to redirect the job. |
boolean |
makeTransition()
Redirects the job. |
private void |
updateFileLevelInfo(java.util.ArrayList<FileLevelInfo> todoFileLevelInfo)
Updates the FileLevelInfo after finishing the phase. Entries that point to the this phase will be updated to point to the next phase if it has been revisited before. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Job job
private User user
private WorkStation workstation
private TransitionInfo info
private int nextUser
private int nextPhase
private java.lang.String comment
private Phase currentPhase
private FileHandler ftpHandler
private java.lang.String source
private java.lang.String destination
private java.lang.String errorMessage
Constructor Detail |
---|
public RedirectingState(Job job, User user, WorkStation workstation, int nextUser, int nextPhase, java.lang.String comment) throws java.lang.Exception
job
- The job to redirect.user
- The user who is redirecting the job.workstation
- The workstation from which the job will be redirected.nextUser
- The ID of the suggested user.nextPhase
- The ID of the suggested phase.comment
- The reason the job is to be redirected.
java.lang.Exception
- If the information necessary to redirect the job cannot be obtained.Method Detail |
---|
public java.lang.String getName()
getName
in class JobState
public int getNoOfFiles()
getNoOfFiles
in class JobState
public boolean makeTransition()
makeTransition
in class JobState
public void canRedirect_FileLevelInfo(java.util.ArrayList<FileLevelInfo> todoInfo, java.util.ArrayList<FileLevelInfo> nextInfo, Phase currentPhase, int nextPhaseID) throws java.lang.Exception
todoInfo
- An ArrayList holding the 'ToDo' FileLevelInfo.nextInfo
- An ArrayList holding the 'Next' FileLevelInfo.currentPhase
- The current phase of the job.nextPhaseID
- The suggested phase to redirect the job to.
java.lang.Exception
- if the job cannot be redirected from this phase to the given next phase.private void updateFileLevelInfo(java.util.ArrayList<FileLevelInfo> todoFileLevelInfo) throws java.lang.Exception
todoFileLevelInfo
- The FileLevelInfo to update.
java.lang.Exception
- If the next phase couldn't be obtained.public java.lang.String getErrorMessage()
JobState
getErrorMessage
in class JobState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |