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

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

import de.ivu.elect.business.datei.entity.DateiImportBerichtCustomData;
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.AbstractImportSearchView;
import de.ivu.elect.presentation.exchange.ImportDescription;
import de.ivu.elect.presentation.hilfe.OnlineHilfeId;

@Named(InternetKonfigurationImportSearchView.COMPONENT_NAME)
@View(viewId = InternetKonfigurationImportSearchView.VIEW_ID, useCase = UseCasePermission.INTERNET_KONFIGURATION_IMPORTIEREN)
@OnlineHilfeId(value = "753",mehrfachVergebenOk = true)
public class InternetKonfigurationImportSearchView extends AbstractImportSearchView<InternetKonfigurationExchangeObject, InternetKonfigurationExchangeContext> {

  public static final String COMPONENT_NAME = "internetKonfigurationImportSearchView";

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

  @Inject
  private transient InternetKonfigurationImporter importer;

  @Inject
  private transient InternetKonfigurationImportDescription importDescription;

  public InternetKonfigurationImportSearchView() {
    super();
  }

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

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

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

  @Override
  protected DateiImportBerichtCustomData createNewDateiImportBerichtCustomData() {
    return new DateiImportBerichtCustomData();
  }
}
