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

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

import de.ivu.elect.business.exchange.control.AbstractImporter;
import de.ivu.elect.business.internet.boundary.InternetKonfigurationImporter;
import de.ivu.elect.business.internet.entity.InternetKonfigurationExchangeContext;
import de.ivu.elect.business.internet.entity.InternetKonfigurationExchangeObject;
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(InternetKonfigurationImportBestaetigenView.COMPONENT_NAME)
@View(viewId = InternetKonfigurationImportBestaetigenView.VIEW_ID, useCase = UseCasePermission.INTERNET_KONFIGURATION_IMPORTIEREN)
public class InternetKonfigurationImportBestaetigenView extends AbstractImportBestaetigenView<InternetKonfigurationExchangeObject, InternetKonfigurationExchangeContext> {

  public static final String COMPONENT_NAME = "internetKonfigurationImportBestaetigenView";

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

  private static final long serialVersionUID = 1L;

  @Inject
  private transient InternetKonfigurationImporter importer;

  @Inject
  private transient InternetKonfigurationImportDescription importDescription;

  public InternetKonfigurationImportBestaetigenView() {
    super();
  }

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

  @Override
  protected InternetKonfigurationExchangeContext getContext() {
    return new InternetKonfigurationExchangeContext(getSelectedWahl(), false);
  }

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