org.bibalex.daf.managers.checkin
Class RetrievalProgressDialog.RetrievalStarter

java.lang.Object
  extended by java.lang.Thread
      extended by org.bibalex.daf.managers.checkin.RetrievalProgressDialog.RetrievalStarter
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
RetrievalProgressDialog

private class RetrievalProgressDialog.RetrievalStarter
extends java.lang.Thread

Starts any Retrieval Operation.

Author:
Niveen Nagy

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  Job job
           
private  java.lang.String mediaBarcode
           
private  boolean removeExtraFiles
           
private  boolean result
           
(package private)  IRetrievalPlugin retrievalPlugin
           
private  int transactionLogID
           
private  int version
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RetrievalProgressDialog.RetrievalStarter(IRetrievalPlugin retrievalPlugin, Job job, int version, java.lang.String mediaBarcode, int transactionLogID, boolean removeExtraFiles)
          Creates a new RetrievalStarter.
 
Method Summary
 boolean getResult()
          Gets the result of applying the retrieval actions.
Note: This method must be called after the thread finishes its job.
private  StatusDef initializeBackUpStatusDef(Job job, int transactionLogID)
          Initialized the BackUp Info from the StatusDef object.
 void run()
          Applies the state actions.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

result

private boolean result

job

private Job job

transactionLogID

private int transactionLogID

version

private int version

mediaBarcode

private java.lang.String mediaBarcode

retrievalPlugin

IRetrievalPlugin retrievalPlugin

removeExtraFiles

private boolean removeExtraFiles
Constructor Detail

RetrievalProgressDialog.RetrievalStarter

public RetrievalProgressDialog.RetrievalStarter(IRetrievalPlugin retrievalPlugin,
                                                Job job,
                                                int version,
                                                java.lang.String mediaBarcode,
                                                int transactionLogID,
                                                boolean removeExtraFiles)
Creates a new RetrievalStarter.

Parameters:
retrievalPlugin - The implementation of the IRetrievalPlugin interface to be used.
job - The Job object to retrieve.
version - The version of the Job to be retrieved.
mediaBarcode - The Barcode of the Media to retrieve the Job from.
transactionLogID - The Transaction Log ID in the DB representing the Backup entry of this Job for that version.
Method Detail

run

public void run()
Applies the state actions.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

initializeBackUpStatusDef

private StatusDef initializeBackUpStatusDef(Job job,
                                            int transactionLogID)
                                     throws StatusDefException
Initialized the BackUp Info from the StatusDef object. And adjusts upon wether it is an old or new Job.

Parameters:
job - The Job to work on.
transactionLogID - The transactionLogID to extract the status data from.
Returns:
The StatusDef of that Job at this TransactionLog entry.
Throws:
StatusDefException

getResult

public boolean getResult()
Gets the result of applying the retrieval actions.
Note: This method must be called after the thread finishes its job.

Returns:
The result of applying the retrieval actions