org.dspace.checker
Class CheckerCommand

java.lang.Object
  extended by org.dspace.checker.CheckerCommand

public final class CheckerCommand
extends Object

Main class for the checksum checker tool, which calculates checksums for each bitstream whose ID is in the most_recent_checksum table, and compares it against the last calculated checksum for that bitstream.

Author:
Jim Downing, Grace Carpenter, Nathan Sarr

Constructor Summary
CheckerCommand()
          Default constructor uses DSpace plugin manager to construct dependencies.
 
Method Summary
 ChecksumResultsCollector getCollector()
          Get the collector that holds/logs the results for this process run.
 BitstreamDispatcher getDispatcher()
          Get dispatcher being used by this run of the checker.
 Date getProcessStartDate()
          Get time at which checker process began.
 boolean isReportVerbose()
          Determine if any errors are reported
 void process()
           Uses the options set up on this checker to determine a mode of execution, and then accepts bitstream ids from the dispatcher and checks their bitstreams against the db records.
 void setCollector(ChecksumResultsCollector collector)
          Set the collector that holds/logs the results for this process run.
 void setDispatcher(BitstreamDispatcher dispatcher)
          Set the dispatcher to be used by this run of the checker.
 void setProcessStartDate(Date startDate)
          Set time at which checker process began.
 void setReportVerbose(boolean reportVerbose)
          Set report errors only
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckerCommand

public CheckerCommand()
Default constructor uses DSpace plugin manager to construct dependencies.

Method Detail

process

public void process()

Uses the options set up on this checker to determine a mode of execution, and then accepts bitstream ids from the dispatcher and checks their bitstreams against the db records.

N.B. a valid BitstreamDispatcher must be provided using setBitstreamDispatcher before calling this method


getDispatcher

public BitstreamDispatcher getDispatcher()
Get dispatcher being used by this run of the checker.

Returns:
the dispatcher being used by this run.

setDispatcher

public void setDispatcher(BitstreamDispatcher dispatcher)
Set the dispatcher to be used by this run of the checker.

Parameters:
dispatcher - Dispatcher to use.

getCollector

public ChecksumResultsCollector getCollector()
Get the collector that holds/logs the results for this process run.

Returns:
The ChecksumResultsCollecter being used.

setCollector

public void setCollector(ChecksumResultsCollector collector)
Set the collector that holds/logs the results for this process run.

Parameters:
collector - the collector to be used for this run

getProcessStartDate

public Date getProcessStartDate()
Get time at which checker process began.

Returns:
start time

setProcessStartDate

public void setProcessStartDate(Date startDate)
Set time at which checker process began.

Parameters:
startDate - start time

isReportVerbose

public boolean isReportVerbose()
Determine if any errors are reported

Returns:
true if only errors reported

setReportVerbose

public void setReportVerbose(boolean reportVerbose)
Set report errors only

Parameters:
reportErrorsOnly - true to report only errors in the logs.


Copyright © 2010 DuraSpace. All Rights Reserved.