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

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

import de.ivu.elect.business.internet.boundary.InternetKonfigurationImporter;
import de.ivu.elect.business.internet.entity.InternetKonfigurationExchangeContext;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportFormatFestlegenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(InternetKonfigurationImportFormatFestlegenView.COMPONENT_NAME)
@View(viewId = InternetKonfigurationImportFormatFestlegenView.VIEW_ID, useCase = UseCasePermission.INTERNET_KONFIGURATION_IMPORTIEREN)
public class InternetKonfigurationImportFormatFestlegenView extends AbstractImportFormatFestlegenView<InternetKonfigurationExchangeContext> {

  public static final String COMPONENT_NAME = "internetKonfigurationImportFormatFestlegenView";

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

  private static final long serialVersionUID = 1L;

  @Inject
  private transient InternetKonfigurationImportDescription importDescription;

  @Inject
  private transient InternetKonfigurationImporter importer;

  public InternetKonfigurationImportFormatFestlegenView() {
    super();
  }

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

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

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