use of org.openforis.collect.relational.event.InitializeRDBEvent in project collect by openforis.
the class RepositoryEventHandler method handleEvent.
private void handleEvent(SurveyEvent event, final KeepAlive keepAlive) {
ProgressListener keepAliveListener = createProgressListener(keepAlive);
String surveyName = event.getSurveyName();
if (event instanceof RecordTransaction) {
repositories.process((RecordTransaction) event);
} else if (event instanceof SurveyCreatedEvent) {
repositories.createRepositories(surveyName, null, keepAliveListener);
} else if (event instanceof SurveyUpdatedEvent) {
repositories.updateRepositories(surveyName, null, keepAliveListener);
} else if (event instanceof SurveyDeletedEvent) {
repositories.deleteRepositories(surveyName);
} else if (event instanceof InitializeRDBEvent) {
repositories.createRepository(surveyName, ((InitializeRDBEvent) event).getStep(), null, keepAliveListener);
}
}
Aggregations