
package de.ivu.elect.presentation.statistik.exchange;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import de.ivu.elect.business.exchange.control.AbstractImporter;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.statistik.boundary.StatistikLaufImporter;
import de.ivu.elect.business.statistik.control.StatistikLaufImportContext;
import de.ivu.elect.business.statistik.entity.StatistikLaufMitKennzeichen;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportBestaetigenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(StatistikLaufImportBestaetigenView.COMPONENT_NAME)
@View(viewId = StatistikLaufImportBestaetigenView.VIEW_ID, useCase = UseCasePermission.STATISTIK_LAUF_IMPORTIEREN)
public class StatistikLaufImportBestaetigenView
    extends
      AbstractImportBestaetigenView<List<StatistikLaufMitKennzeichen>, StatistikLaufImportContext> {

  public static final String COMPONENT_NAME = "statistikLaufImportBestaetigenView";

  public static final String VIEW_ID = "/statistik/statistik-lauf-import-bestaetigen.xhtml";

  private static final long serialVersionUID = 1L;

  @Inject
  private transient StatistikLaufImporter importer;

  @Inject
  private transient StatistikLaufImportDescription importDescription;

  public StatistikLaufImportBestaetigenView() {
    super();
  }

  @Override
  protected AbstractImporter<List<StatistikLaufMitKennzeichen>, StatistikLaufImportContext, ? > getImporter() {
    return importer;
  }

  @Override
  protected StatistikLaufImportContext getContext() {
    return new StatistikLaufImportContext(getSelectedWahltermin());
  }

  @Override
  protected ImportDescription getImportDescription() {
    return importDescription;
  }
}
