|
||||||||||
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.RejectingState
public class RejectingState
This class contains the logic necessary to reject the job. Calling makeTransition method will cause the job to be rejected.
Field Summary | |
---|---|
private java.lang.String |
comment
|
private java.lang.String |
destination
|
private java.lang.String |
errorMessage
|
private FileHandler |
ftpHandler
|
private TransitionInfo |
info
|
private Job |
job
|
private Phase |
nextPhase
|
private User |
nextUser
|
private Phase |
phase
|
private java.lang.String |
source
|
private User |
user
|
private WorkStation |
workstation
|
Constructor Summary | |
---|---|
RejectingState(Job job,
User user,
WorkStation workstation,
User nextUser,
Phase nextPhase,
java.lang.String comment)
Creates a new instance of RejectingState. |
Method Summary | |
---|---|
void |
canReject_FileLevelInfo(java.util.ArrayList<FileLevelInfo> todoInfo,
java.util.ArrayList<FileLevelInfo> nextInfo,
Phase currentPhase,
int nextPhaseID)
Determines whether the job can be rejected to the given phase because of FileLevelInfo or not. |
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 reject the job. |
boolean |
makeForcedTransition()
Rejects the job by force. |
boolean |
makeTransition()
Rejects the job. |
private boolean |
makeTransition(boolean forced)
Rejects the job. |
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 User nextUser
private Phase nextPhase
private java.lang.String comment
private Phase phase
private FileHandler ftpHandler
private java.lang.String source
private java.lang.String destination
private java.lang.String errorMessage
Constructor Detail |
---|
public RejectingState(Job job, User user, WorkStation workstation, User nextUser, Phase nextPhase, java.lang.String comment) throws java.lang.Exception
job
- The job to reject.user
- The user who is rejecting the job.workstation
- The workstation from which the job will be rejected.nextUser
- The User entity representing the suggested user.nextPhase
- The Phase entity representing the suggested phase.comment
- The reason the job is to be redirected.
java.lang.Exception
- If the information necessary to reject 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 boolean makeForcedTransition()
private boolean makeTransition(boolean forced)
forced
- Determines which stored procudre is called. If true Job_RejectForced is called otherwise Job_Reject is called.
public void canReject_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 rejected from this phase to the given next phase.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 |