Revision 2086
Added by Duane Costa about 20 years ago
HarvestLog.java | ||
---|---|---|
6 | 6 |
|
7 | 7 |
package edu.ucsb.nceas.metacat.harvesterClient; |
8 | 8 |
|
9 |
import java.io.PrintStream; |
|
9 | 10 |
import java.sql.Connection; |
10 | 11 |
import java.sql.ResultSet; |
11 | 12 |
import java.sql.SQLException; |
... | ... | |
264 | 265 |
|
265 | 266 |
/** |
266 | 267 |
* Prints the contents of this HarvestLog object. Used in generating reports. |
268 |
* |
|
269 |
* @param out the PrintStream to write to |
|
267 | 270 |
*/ |
268 |
void printOutput() { |
|
269 |
System.out.println("");
|
|
270 |
System.out.println(marker);
|
|
271 |
System.out.println("*");
|
|
272 |
System.out.println("* harvestLogID: " + harvestLogID);
|
|
273 |
System.out.println("* harvestDate: " + harvestDate);
|
|
274 |
System.out.println("* status: " + status);
|
|
275 |
System.out.println("* message: " + message);
|
|
276 |
System.out.println("* harvestOperationCode: " + harvestOperationCode);
|
|
271 |
void printOutput(PrintStream out) {
|
|
272 |
out.println(""); |
|
273 |
out.println(marker); |
|
274 |
out.println("*"); |
|
275 |
out.println("* harvestLogID: " + harvestLogID); |
|
276 |
out.println("* harvestDate: " + harvestDate); |
|
277 |
out.println("* status: " + status); |
|
278 |
out.println("* message: " + message); |
|
279 |
out.println("* harvestOperationCode: " + harvestOperationCode); |
|
277 | 280 |
|
278 | 281 |
if (harvestOperationCode.equals("GetDocListSuccess") || |
279 | 282 |
harvestOperationCode.equals("GetDocListError")) { |
280 | 283 |
if (siteScheduleID != 0) { |
281 |
harvester.printHarvestSiteSchedule(siteScheduleID); |
|
284 |
harvester.printHarvestSiteSchedule(out, siteScheduleID);
|
|
282 | 285 |
} |
283 | 286 |
} |
284 | 287 |
|
285 | 288 |
if (harvestDetailLog != null) { |
286 |
harvestDetailLog.printOutput(); |
|
289 |
harvestDetailLog.printOutput(out);
|
|
287 | 290 |
} |
288 | 291 |
|
289 |
System.out.println("*");
|
|
290 |
System.out.println(marker);
|
|
292 |
out.println("*"); |
|
293 |
out.println(marker); |
|
291 | 294 |
} |
292 | 295 |
|
293 | 296 |
} |
Also available in: Unified diff
Implement harvester scheduing capabilities and sending email reports to the Harvester Administrator