cdc.impex.imports.CheckedSheetImporter Maven / Gradle / Ivy
The newest version!
package cdc.impex.imports;
import cdc.impex.ImpExStatus;
import cdc.impex.templates.SheetTemplate;
import cdc.impex.templates.SheetTemplateInstance;
import cdc.issues.Issue;
import cdc.issues.IssuesHandler;
public class CheckedSheetImporter implements SheetImporter {
protected ImpExStatus status = ImpExStatus.WORKBOOK;
public CheckedSheetImporter() {
super();
}
protected void checkStatus(ImpExStatus expected) {
ImpExStatus.checkStatus(status, expected);
}
@Override
public void beginSheetImport(String systemId,
String sheetName,
SheetTemplate template,
IssuesHandler issuesHandler) {
checkStatus(ImpExStatus.WORKBOOK);
status = ImpExStatus.SHEET;
}
@Override
public void importHeader(SheetTemplateInstance templateInstance,
IssuesHandler issuesHandler) {
checkStatus(ImpExStatus.SHEET);
}
@Override
public void importRow(ImportRow row,
IssuesHandler issuesHandler) {
checkStatus(ImpExStatus.SHEET);
}
@Override
public void endSheetImport(String systemId,
String sheetName,
SheetTemplateInstance templateInstance,
IssuesHandler issuesHandler) {
checkStatus(ImpExStatus.SHEET);
status = ImpExStatus.WORKBOOK;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy