
package de.ivu.elect.presentation.exchange;

import javax.enterprise.event.Observes;
import javax.enterprise.event.Reception;
import javax.enterprise.inject.Specializes;

import org.apache.deltaspike.core.api.scope.ConversationGroup;
import org.apache.deltaspike.core.api.scope.GroupedConversationScoped;

import de.ivu.elect.business.gebietsbaum.boundary.GebietChangeEvent;
import de.ivu.elect.business.gebietsbaum.boundary.GebietCreateEvent;
import de.ivu.elect.business.gebietsbaum.boundary.GebietSelectChangeEvent;
import de.ivu.elect.business.wahl.boundary.WahlChangeEvent;
import de.ivu.elect.business.wahl.boundary.WahlCreateEvent;

@Specializes
@GroupedConversationScoped
@ConversationGroup(SupportedFileFormatErmittler.class)
public class NlWasSupportedFileFormatErmittler extends WasSupportedFileFormatErmittler {

  private static final long serialVersionUID = 1L;

  public NlWasSupportedFileFormatErmittler() {
    super();
  }

  public void onGebietCreateEvent(@Observes(notifyObserver = Reception.IF_EXISTS) GebietCreateEvent event) {
    reset(); // Stimmbezirke Import
  }

  public void onGebietCreateEvent(@Observes(notifyObserver = Reception.IF_EXISTS) GebietChangeEvent event) {
    reset(); // Stimmbezirke Import
  }

  public void onWahlCreateEvent(@Observes(notifyObserver = Reception.IF_EXISTS) WahlCreateEvent event) {
    reset(); // ELECT-9791 nur eine Wahl
  }

  public void onWahlChangeEvent(@Observes(notifyObserver = Reception.IF_EXISTS) WahlChangeEvent event) {
    reset(); // ELECT-9791 nur eine Wahl
  }

  public void onGebietSelectChangeEvent(@Observes(notifyObserver = Reception.IF_EXISTS) GebietSelectChangeEvent event) {
    reset(); // Gebietsabhängige Exporter
  }

}
