|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucsb.nceas.metacat.harvesterClient.HarvestLog
Manages log entries to be inserted to the HARVEST_LOG table.
Constructor Summary | |
HarvestLog(Harvester harvester,
java.sql.Connection conn,
int harvestLogID,
java.util.Date harvestDate,
int status,
java.lang.String message,
java.lang.String harvestOperationCode,
int siteScheduleID)
Creates a new instance of HarvestLog. |
|
HarvestLog(Harvester harvester,
java.sql.Connection conn,
int harvestLogID,
int detailLogID,
java.util.Date harvestDate,
int status,
java.lang.String message,
java.lang.String harvestOperationCode,
int siteScheduleID,
HarvestDocument harvestDocument,
java.lang.String errorMessage)
Creates a new instance of HarvestLog and inserts this entry to the HARVEST_LOG table. |
Method Summary | |
int |
getCodeLevelValue(java.lang.String codeLevel)
Maps each code level to an integer value. |
java.lang.String |
getExplanation(java.lang.String harvestOperationCode)
Returns an explanation string based on the value of a harvestOperationCode string. |
java.lang.String |
getHarvestOperationCodeLevel(java.lang.String harvestOperationCode)
Returns a code level string based on a harvestOperationCode string. |
void |
printOutput(java.io.PrintStream out,
java.lang.String maxLevel)
Prints the contents of this HarvestLog object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HarvestLog(Harvester harvester, java.sql.Connection conn, int harvestLogID, java.util.Date harvestDate, int status, java.lang.String message, java.lang.String harvestOperationCode, int siteScheduleID)
harvester
- the parent Harvester objectconn
- the database connectionharvestLogID
- the primary key in the HARVEST_LOG tableharvestDate
- the date of this harveststatus
- the status of the harvest operationmessage
- the message text of the harvest operationharvestOperationCode
- the harvest operation codesiteScheduleID
- the siteScheduleID for which this operation was
performed. 0 indicates that the operation did not
involve a particular harvest site.public HarvestLog(Harvester harvester, java.sql.Connection conn, int harvestLogID, int detailLogID, java.util.Date harvestDate, int status, java.lang.String message, java.lang.String harvestOperationCode, int siteScheduleID, HarvestDocument harvestDocument, java.lang.String errorMessage)
harvester
- the parent Harvester objectconn
- the database connectionharvestLogID
- the primary key in the HARVEST_LOG tabledetailLogID
- the primary key in the HARVEST_DETAIL_LOG tableharvestDate
- the date of this harveststatus
- the status of the harvest operationmessage
- the message text of the harvest operationharvestOperationCode
- the harvest operation codesiteScheduleID
- the siteScheduleID for which this operation was
performed. 0 indicates that the operation did not
involve a particular harvest site.harvestDocument
- the HarvestDocument involved in this operationerrorMessage
- the error message generated by this operationMethod Detail |
public int getCodeLevelValue(java.lang.String codeLevel)
codeLevel
- the code level: "error", "warning", "notice",
"info", or "debug"
public java.lang.String getExplanation(java.lang.String harvestOperationCode)
harvestOperationCode
- string value of the harvest operation code
public java.lang.String getHarvestOperationCodeLevel(java.lang.String harvestOperationCode)
harvestOperationCode
- string value of the harvest operation code
public void printOutput(java.io.PrintStream out, java.lang.String maxLevel)
out
- the PrintStream to write tomaxLevel
- the maximum code level to output. If this log entry has a
higher code level than the maxLevel, no output
is issued. For example, if the maxLevel is "error"
(level 1), then anything lower ("warning", "notice", etc.)
will not generate any output.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |