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

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

import de.ivu.elect.business.konfiguration.boundary.KonfigurationImporter;
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.AbstractImportFormatFestlegenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(KonfigurationImportFormatFestlegenView.COMPONENT_NAME)
@View(viewId = KonfigurationImportFormatFestlegenView.VIEW_ID, useCase = UseCasePermission.KONFIGURATION_IMPORTIEREN)
public class KonfigurationImportFormatFestlegenView extends AbstractImportFormatFestlegenView<KonfigurationExchangeContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "konfigurationImportFormatFestlegenView";

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

  @Inject
  private transient KonfigurationImportDescription konfigurationImportDescription;

  @Inject
  private transient KonfigurationImporter konfigurationImporter;

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

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

  @Override
  protected KonfigurationImporter getImporter() {
    return konfigurationImporter;
  }
}
