org.bibalex.daf.managers.archive
Class ArchiverManagerGUI.Archiver

java.lang.Object
  extended by java.lang.Thread
      extended by org.bibalex.daf.managers.archive.ArchiverManagerGUI.Archiver
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ArchiverManagerGUI

private class ArchiverManagerGUI.Archiver
extends java.lang.Thread

This thread carries out downloading jobs folders and forming medias


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  java.util.ArrayList<java.lang.Object> argList
           
(package private)  java.lang.Class c
           
(package private)  java.lang.String className
           
(package private)  DBConnection conn
           
(package private)  java.lang.String destFolder
           
(package private)  java.lang.String ftpPWD
           
(package private)  java.lang.String ftpUser
           
(package private)  java.lang.String hostIP
           
(package private)  float mediaSize
           
(package private)  java.lang.String methodName
           
(package private)  int MTID
           
(package private)  java.lang.String newMediaBarCode
           
(package private)  int newMediaID
           
(package private)  OperationInfo opInfo
           
(package private)  java.lang.Class[] parameters
           
(package private)  boolean returnVal
           
(package private)  java.lang.String updateDAK
           
(package private)  int userID
           
(package private)  java.lang.reflect.Method userMethod
           
(package private)  java.lang.String userName
           
(package private)  int workstationID
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private ArchiverManagerGUI.Archiver()
           
 
Method Summary
private  boolean checkSelectedJobs(CheckBoxList readyToArchiveCheckList, int mediaType)
          This method checks the validity of recording all the checked jobs in the archive list to DB
private  void clearGUI()
           
private  boolean createMedia()
          Thie method creates new media instance
private  boolean initialize()
          This methos initialize variables used by run() method
private  boolean initRepository()
          This methos initialize connection to Repository in order to update it with archived data
private  boolean recordJobsToDB(CheckBoxList readyToArchiveCheckList, int mediaType, int mediaID)
           
 void run()
          This method creats media and fill it up with job versions
 
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

MTID

int MTID

userID

int userID

workstationID

int workstationID

newMediaID

int newMediaID

mediaSize

float mediaSize

destFolder

java.lang.String destFolder

userName

java.lang.String userName

hostIP

java.lang.String hostIP

ftpUser

java.lang.String ftpUser

ftpPWD

java.lang.String ftpPWD

conn

DBConnection conn

argList

java.util.ArrayList<java.lang.Object> argList

opInfo

OperationInfo opInfo

newMediaBarCode

java.lang.String newMediaBarCode

updateDAK

java.lang.String updateDAK

className

java.lang.String className

methodName

java.lang.String methodName

c

java.lang.Class c

parameters

java.lang.Class[] parameters

userMethod

java.lang.reflect.Method userMethod

returnVal

boolean returnVal
Constructor Detail

ArchiverManagerGUI.Archiver

private ArchiverManagerGUI.Archiver()
Method Detail

initialize

private boolean initialize()
This methos initialize variables used by run() method


createMedia

private boolean createMedia()
Thie method creates new media instance

Returns:
true on success, false otherwise

initRepository

private boolean initRepository()
This methos initialize connection to Repository in order to update it with archived data

Returns:
true on success, false otherwise

run

public void run()
This method creats media and fill it up with job versions

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

clearGUI

private void clearGUI()

checkSelectedJobs

private boolean checkSelectedJobs(CheckBoxList readyToArchiveCheckList,
                                  int mediaType)
This method checks the validity of recording all the checked jobs in the archive list to DB

Parameters:
readyToArchiveCheckList - The list of the checked jobs to be archived
mediaType - The type of media to archive jobs to
Returns:
true if all the checked versions can be recorded to database with the given media, false if any of these versions has been recorded befor with this media type

recordJobsToDB

private boolean recordJobsToDB(CheckBoxList readyToArchiveCheckList,
                               int mediaType,
                               int mediaID)