
package de.ivu.elect.presentation.konfiguration.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.konfiguration.boundary.KonfigurationImporter;
import de.ivu.elect.business.konfiguration.entity.Konfiguration;
import de.ivu.elect.business.konfiguration.entity.KonfigurationExchangeContext;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportBestaetigenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(KonfigurationImportBestaetigenView.COMPONENT_NAME)
@View(viewId = KonfigurationImportBestaetigenView.VIEW_ID, useCase = UseCasePermission.KONFIGURATION_IMPORTIEREN)
public class KonfigurationImportBestaetigenView extends AbstractImportBestaetigenView<List<Konfiguration>, KonfigurationExchangeContext> {

  public static final String COMPONENT_NAME = "konfigurationImportBestaetigenView";

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

  @Inject
  transient KonfigurationImporter konfigurationImporter;

  @Inject
  transient KonfigurationImportDescription konfigurationImportDescription;

  @Override
  protected AbstractImporter<List<Konfiguration>, KonfigurationExchangeContext, ? > getImporter() {
    return konfigurationImporter;
  }

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


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

}
