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

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

import de.ivu.elect.business.gruppe.boundary.GruppeImporter;
import de.ivu.elect.business.gruppe.control.GruppeExchangeContext;
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(GruppeImportFormatFestlegenView.COMPONENT_NAME)
@View(viewId = GruppeImportFormatFestlegenView.VIEW_ID, useCase = UseCasePermission.GRUPPE_IMPORTIEREN)
public class GruppeImportFormatFestlegenView extends AbstractImportFormatFestlegenView<GruppeExchangeContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "gruppeImportFormatFestlegenView";

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

  @Inject
  private transient GruppeImportDescription gruppeImportDescription;

  @Inject
  private transient GruppeImporter gruppeImporter;

  public GruppeImportFormatFestlegenView() {
    super();
  }

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

  @Override
  protected GruppeImporter getImporter() {
    return gruppeImporter;
  }

  @Override
  protected GruppeExchangeContext getContext() {
    return new GruppeExchangeContext(getSelectedWahl());
  }
}
