001: /*
002: * Copyright (c) 2004-2005, Hewlett-Packard Company and Massachusetts
003: * Institute of Technology. All rights reserved.
004: *
005: * Redistribution and use in source and binary forms, with or without
006: * modification, are permitted provided that the following conditions are
007: * met:
008: *
009: * - Redistributions of source code must retain the above copyright
010: * notice, this list of conditions and the following disclaimer.
011: *
012: * - Redistributions in binary form must reproduce the above copyright
013: * notice, this list of conditions and the following disclaimer in the
014: * documentation and/or other materials provided with the distribution.
015: *
016: * - Neither the name of the Hewlett-Packard Company nor the name of the
017: * Massachusetts Institute of Technology nor the names of their
018: * contributors may be used to endorse or promote products derived from
019: * this software without specific prior written permission.
020: *
021: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
022: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
023: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
024: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
025: * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
026: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
027: * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
028: * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
029: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
030: * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
031: * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
032: * DAMAGE.
033: */
034: package org.dspace.checker;
035:
036: import java.io.IOException;
037: import java.io.OutputStreamWriter;
038: import java.util.Date;
039:
040: /**
041: *
042: * Simple Reporting Class which can return several different reports.
043: *
044: * @author Jim Downing
045: * @author Grace Carpenter
046: * @author Nathan Sarr
047: *
048: */
049: public interface SimpleReporter {
050: /**
051: * Returns the bitstreams set found to be deleted for the specified date
052: * range.
053: *
054: * @param startDate
055: * the start date range
056: * @param endDate
057: * the end date range
058: * @param osw
059: * the output stream writer to write to
060: *
061: * @return number of bitstreams found
062: *
063: * @throws IOException
064: * if io error occurs
065: */
066: public int getDeletedBitstreamReport(Date startDate, Date endDate,
067: OutputStreamWriter osw) throws IOException;
068:
069: /**
070: * The a report of bitstreams found where the checksum has been changed
071: * since the last check for the specified date range.
072: *
073: * @param startDate
074: * the start date range.
075: * @param endDate
076: * then end date range.
077: * @param osw
078: * the output stream writer to write to
079: *
080: * @return number of bitstreams found
081: *
082: * @throws IOException
083: * if io error occurs
084: */
085: public int getChangedChecksumReport(Date startDate, Date endDate,
086: OutputStreamWriter osw) throws IOException;
087:
088: /**
089: * The report of bitstreams for the specified date range where it was
090: * determined the bitstreams can no longer be found.
091: *
092: * @param startDate
093: * the start date range.
094: * @param endDate
095: * the end date range.
096: * @param osw
097: * the output stream writer to write to
098: *
099: * @return number of bitstreams found
100: *
101: * @throws IOException
102: * if io error occurs
103: */
104: public int getBitstreamNotFoundReport(Date startDate, Date endDate,
105: OutputStreamWriter osw) throws IOException;
106:
107: /**
108: * The bitstreams that were set to not be processed report for the specified
109: * date range.
110: *
111: * @param startDate
112: * the start date range.
113: * @param endDate
114: * the end date range.
115: * @param osw
116: * the output stream writer to write to
117: *
118: * @throws IOException
119: * if io error occurs
120: *
121: */
122: public int getNotToBeProcessedReport(Date startDate, Date endDate,
123: OutputStreamWriter osw) throws IOException;
124:
125: /**
126: * The bitstreams that are not known to the checksum checker. This means
127: * they are in the bitstream table but not in the most recent checksum table
128: *
129: * @param osw
130: * the output stream writer to write to
131: *
132: * @return number of bitstreams found
133: *
134: * @throws IOException
135: * if io error occurs
136: *
137: */
138: public int getUncheckedBitstreamsReport(OutputStreamWriter osw)
139: throws IOException;
140: }
|