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

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.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportFormatFestlegenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(StatistikLaufImportFormatFestlegenView.COMPONENT_NAME)
@View(viewId = StatistikLaufImportFormatFestlegenView.VIEW_ID, useCase = UseCasePermission.STATISTIK_LAUF_IMPORTIEREN)
public class StatistikLaufImportFormatFestlegenView extends AbstractImportFormatFestlegenView<StatistikLaufImportContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "statistikLaufImportFormatFestlegenView";

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

  @Inject
  private StatistikLaufImporter importer;

  @Inject
  private StatistikLaufImportDescription importDescription;

  public StatistikLaufImportFormatFestlegenView() {
    super();
  }

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

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

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