
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.AbstractExporter;
import de.ivu.elect.business.konfiguration.boundary.KonfigurationExporter;
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.AbstractExportSearchView;
import de.ivu.elect.presentation.exchange.ExportDescription;

@Named(KonfigurationExportView.COMPONENT_NAME)
@View(viewId = KonfigurationExportView.VIEW_ID, useCase = UseCasePermission.KONFIGURATION_EXPORTIEREN)
public class KonfigurationExportView extends AbstractExportSearchView<List<Konfiguration>, KonfigurationExchangeContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "konfigurationExportView";

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

  @Inject
  private transient KonfigurationExporter konfigurationExporter;

  @Inject
  private transient KonfigurationExportDescription konfigurationExportDescription;

  public KonfigurationExportView() {
    super();
  }

  @Override
  protected AbstractExporter<List<Konfiguration>, KonfigurationExchangeContext> getExporter() {
    return konfigurationExporter;
  }

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

  @Override
  public ExportDescription getExportDescription() {
    return konfigurationExportDescription;
  }
}
