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

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

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.wahl.boundary.WahlKonfigurationImporter;
import de.ivu.elect.business.wahl.entity.WahlKonfigurationExchangeContext;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportFormatFestlegenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(WahlKonfigurationImportFormatFestlegenView.COMPONENT_NAME)
@View(viewId = WahlKonfigurationImportFormatFestlegenView.VIEW_ID, useCase = UseCasePermission.WAHL_KONFIGURATION_IMPORTIEREN)
public class WahlKonfigurationImportFormatFestlegenView extends AbstractImportFormatFestlegenView<WahlKonfigurationExchangeContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "wahlKonfigurationImportFormatFestlegenView";

  public static final String VIEW_ID = "/wahl/wahl-konfiguration-import-format-festlegen.xhtml";

  @Inject
  private transient WahlKonfigurationImportDescription importDescription;

  @Inject
  private transient WahlKonfigurationImporter importer;

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

  @Override
  protected WahlKonfigurationImporter getImporter() {
    return importer;
  }

  @Override
  protected WahlKonfigurationExchangeContext getContext() {
    return new WahlKonfigurationExchangeContext(getMandant());
  }
}
