|
||||||||||
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.ChangingTypeState
public class ChangingTypeState
This class contains the logic necessary to change the type of the job. Calling makeTransition method will cause the job to have its type changed.
Field Summary | |
---|---|
private boolean |
assign
|
private int |
assignJobTypeID
|
private int |
assignPhaseID
|
private int |
assignUserID
|
private java.lang.String |
errorMessage
|
private FileHandler |
ftpHandler
|
private TransitionInfo |
info
|
private Job |
job
|
private boolean |
jobInWorkingDir
|
private java.lang.String |
serverDir
|
private User |
user
|
private java.lang.String |
workingDir
|
private WorkStation |
workstation
|
Constructor Summary | |
---|---|
ChangingTypeState(Job job,
User user,
WorkStation workstation,
boolean jobInWorkingDir,
int assignJobTypeID,
int assignPhaseID,
int assignUserID,
boolean assign)
Creates a new instance of ChangingTypeState. |
Method Summary | |
---|---|
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 change the type of the job. |
boolean |
makeTransition()
Changes the type of the job. In order to change the type of a job the following actions take place: 1) See if the job has the right to change its type or not (database wise). 2) Apply the phase checks on the job. 4) Make the following database modifications, as needed. a) Update the job to change its type. b) Move the job entries from the oldTransactionLog to the TransactionLog. c) Add an assign entry for the job new phase and user. 5) Copies the job folder back to the production server. |
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 java.lang.String workingDir
private java.lang.String serverDir
private FileHandler ftpHandler
private int assignJobTypeID
private int assignPhaseID
private int assignUserID
private boolean jobInWorkingDir
private boolean assign
private java.lang.String errorMessage
Constructor Detail |
---|
public ChangingTypeState(Job job, User user, WorkStation workstation, boolean jobInWorkingDir, int assignJobTypeID, int assignPhaseID, int assignUserID, boolean assign) throws java.lang.Exception
job
- The job to change its job type.user
- The user who is changing the type of the job.workstation
- The workstation from which the job will uploaded.jobInWorkingDir
- Whether the job is in the working directory or at the production server.assignJobTypeID
- The ID of the job type that will be the new type of the job.assignPhaseID
- The ID of the phase to which the job will be assigned.
This parameter is used to apply the pre-phase checks on the job folder.assignUserID
- The ID of the user to whom the job will be assigned.assign
- Whether to add an assign entry for the job to the new phase and user.
java.lang.Exception
- If the information necessary to change the type of 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 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 |