
package de.ivu.elect.presentation.wahl.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.wahl.boundary.WahlKonfigurationImporter;
import de.ivu.elect.business.wahl.entity.WahlKonfiguration;
import de.ivu.elect.business.wahl.entity.WahlKonfigurationExchangeContext;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportBestaetigenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

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

  public static final String COMPONENT_NAME = "wahlKonfigurationImportBestaetigenView";

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

  @Inject
  private transient WahlKonfigurationImporter importer;

  @Inject
  private transient WahlKonfigurationImportDescription importDescription;

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

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

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