|
||||||||||
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.FinishingState
public class FinishingState
This class contains the logic necessary to finish the job. Calling makeTransition method will cause the job to be finished.
Field Summary | |
---|---|
private static int |
BACKUP_PHASE_ID
|
private Phase |
currentPhase
|
private java.lang.String |
destination
|
private java.lang.String |
errorMessage
|
private boolean |
fromCommandLine
|
private FileHandler |
ftpHandler
|
private TransitionInfo |
info
|
private Job |
job
|
private static int |
QUICK_BACKUP_PHASE_ID
Holds the ID of the backup phase. |
private java.lang.String |
source
|
private User |
user
|
private WorkStation |
workstation
|
Constructor Summary | |
---|---|
FinishingState(Job job,
User user,
WorkStation workstation,
boolean fromCommandLine)
Creates a new instance of FinishingState. |
Method Summary | |
---|---|
private void |
canFinish_FileLevelInfo(java.util.ArrayList<FileLevelInfo> todoInfo,
java.util.ArrayList<FileLevelInfo> nextInfo,
int phaseID)
Determines whether the user can finish the job because of the FileLevelInfo or not A job cannot be finsihed in the following 2 cases: 1) There exist entries in the 'Next' FileLeveloInfo file. |
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 finish the job. |
boolean |
makeTransition()
Finishes the job. |
private void |
updateFileLevelInfo(java.util.ArrayList<FileLevelInfo> todoFileLevelInfo,
Phase currentPhase)
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 static int QUICK_BACKUP_PHASE_ID
private static int BACKUP_PHASE_ID
private Job job
private User user
private WorkStation workstation
private TransitionInfo info
private Phase currentPhase
private FileHandler ftpHandler
private java.lang.String source
private java.lang.String destination
private boolean fromCommandLine
private java.lang.String errorMessage
Constructor Detail |
---|
public FinishingState(Job job, User user, WorkStation workstation, boolean fromCommandLine) throws java.lang.Exception
job
- The job to finish.user
- The user who is finishing the job.workstation
- The workstation form which the job is being finished.fromCommandLine
- Whether the job is beuing finsihed from the command line or not.java.lang.Exception
- If the information necessary to finish 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
private void canFinish_FileLevelInfo(java.util.ArrayList<FileLevelInfo> todoInfo, java.util.ArrayList<FileLevelInfo> nextInfo, int phaseID) throws java.lang.Exception
todoInfo
- The 'ToDo' FileLevelInfo.nextInfo
- The 'Next' FileLevelInfo.phaseID
- The current phase ID.
java.lang.Exception
- If the user cannot finish the job.private void updateFileLevelInfo(java.util.ArrayList<FileLevelInfo> todoFileLevelInfo, Phase currentPhase) throws java.lang.Exception
todoFileLevelInfo
- The FileLevelInfo to update.currentPhase
- The current phase of the job.
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 |