org.bibalex.daf.entities.job
Class JobState

java.lang.Object
  extended by org.bibalex.daf.entities.job.JobState
Direct Known Subclasses:
ChangingTypeState, CheckingInState, DownloadingState, FinishingState, RedirectingState, RejectingState, StartingState, UploadingState

public abstract class JobState
extends java.lang.Object

Represents the state of the job.
Direct known sub classes are:
CheckingInState, StartingState, FinishingState, RedirectingState, RejectingState, UploadingState, DownloadingState and ChangingJobTypeState.

Author:
Shehab.Kamal

Constructor Summary
JobState()
           
 
Method Summary
abstract  java.lang.String getErrorMessage()
          This method gets the mesage that is to be displaed to the user
abstract  java.lang.String getName()
          Gets the user friendly name of the state.
abstract  int getNoOfFiles()
          Gets the number of files required to complete the transition of the job.
abstract  boolean makeTransition()
          Makes the transition that will bring the job to the desired state.
For example: If the current state is StartingState and makeTransition is invoked and completes successfully, the job will be considered started (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobState

public JobState()
Method Detail

getName

public abstract java.lang.String getName()
Gets the user friendly name of the state.

Returns:
The name of the state.

getNoOfFiles

public abstract int getNoOfFiles()
Gets the number of files required to complete the transition of the job.

Returns:
The number of files.

makeTransition

public abstract boolean makeTransition()
Makes the transition that will bring the job to the desired state.
For example: If the current state is StartingState and makeTransition is invoked and completes successfully, the job will be considered started (i.e. in started state).

Returns:
True if the all the actions has been completed successfully, otherwise false.

getErrorMessage

public abstract java.lang.String getErrorMessage()
This method gets the mesage that is to be displaed to the user

Returns:
The error message to be dispalayed to the user