class SpreadsheetImportHealthChecker implements HealthChecker<SpreadsheetImportActivity> {

	public VisitReport visit(SpreadsheetImportActivity activity, List<Object> ancestors) {
		Processor p = (Processor) VisitReport.findAncestor(ancestors, Processor.class);
		if (p == null) {
			return null;
		}
		JsonNode configuration = activity.getConfiguration();
		if (configuration == null) {
			return new VisitReport(HealthCheck.getInstance(), p, "Spreadsheet import has not been configured", HealthCheck.NO_CONFIGURATION, Status.SEVERE);
		}
		return new VisitReport(HealthCheck.getInstance(), p, "Spreadsheet OK", HealthCheck.NO_PROBLEM, Status.OK);
	}

}