|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.edu.agh.cast.importer.base.logging.AbstractImportLogger
pl.edu.agh.cast.importer.base.logging.FileImportLogger
public class FileImportLogger
An observer of the import process, which logs events to file. It increments the row and column indices by one, for better user readability.
| Field Summary | |
|---|---|
static String |
LOG_DIRECTORY
The output directory to store the logger files in. |
| Fields inherited from class pl.edu.agh.cast.importer.base.logging.AbstractImportLogger |
|---|
LEFT_BRACKET, RIGHT_BRACKET, SEPARATOR_COMMA, SEPARATOR_SEMICOMMA |
| Constructor Summary | |
|---|---|
FileImportLogger(String projectLocation)
The default constructor. |
|
| Method Summary | |
|---|---|
void |
finish(String dataSetId)
Closes the logger file handler and renames the log file, using the specified data set identifier. |
String |
getLogDirPath()
|
void |
initialize(String importedFilePath,
String templateName)
Initializes the layout, appender and logger and logs the start of the import operation into the log file. |
void |
initialize(String importedFilePath,
String templateName,
String sheetName)
Initializes the layout, appender and logger and logs the start of the import operation into the log file. |
void |
notifyError(AbstractErrorLogData error)
Notifies when an error occurs. |
void |
notifyRemoved(DataRow row)
Notifies when a row is removed. |
void |
notifyRestored(DataRow row)
Notifies when a row is restored. |
void |
notifyValueChanged(DataRow row,
int index,
Object oldValue,
Object newValue)
Notifies when new value is set in a specified row. |
void |
setFooterData(int rowsImported,
int rowsNotImported,
String dataSetName)
Sets the data necessary for the import logger footer. |
| Methods inherited from class pl.edu.agh.cast.importer.base.logging.AbstractImportLogger |
|---|
createErrorMsg |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOG_DIRECTORY
| Constructor Detail |
|---|
public FileImportLogger(String projectLocation)
projectLocation - the location of the project| Method Detail |
|---|
public void notifyError(AbstractErrorLogData error)
error - the error that occurredIImportLogger.notifyError(
pl.edu.agh.cast.importer.base.stat.AbstractErrorLogData)public void notifyRemoved(DataRow row)
row - the row which is removedIImportDataObserver.notifyRemoved(
pl.edu.agh.cast.importer.base.data.DataRow)public void notifyRestored(DataRow row)
row - the row which is restoredIImportDataObserver.notifyRestored(
pl.edu.agh.cast.importer.base.data.DataRow)
public void notifyValueChanged(DataRow row,
int index,
Object oldValue,
Object newValue)
row - the row which is editedindex - the position, on which the change had occurredoldValue - the old valuenewValue - the new valueIImportDataObserver.notifyValueChanged(
pl.edu.agh.cast.importer.base.data.DataRow, int, java.lang.Object, java.lang.Object)public void finish(String dataSetId)
dataSetId - the id of the data set
public void initialize(String importedFilePath,
String templateName,
String sheetName)
importedFilePath - the path to the imported filetemplateName - the template name used by the import operationsheetName - the name of the sheet for data with multiple sheets
public void initialize(String importedFilePath,
String templateName)
importedFilePath - the path to the imported filetemplateName - the template name used by the import operation
public void setFooterData(int rowsImported,
int rowsNotImported,
String dataSetName)
rowsImported - the number of rows importedrowsNotImported - the number of rows not importeddataSetName - the name of the data setpublic String getLogDirPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||