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

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

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.wertelisten.boundary.WertelistenImporter;
import de.ivu.elect.business.wertelisten.control.WertelistenExchangeContext;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportFormatFestlegenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(WertelistenImportFormatFestlegenView.COMPONENT_NAME)
@View(viewId = WertelistenImportFormatFestlegenView.VIEW_ID, useCase = UseCasePermission.WERTELISTEN_IMPORTIEREN)
public class WertelistenImportFormatFestlegenView extends AbstractImportFormatFestlegenView<WertelistenExchangeContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "wertelistenImportFormatFestlegenView";

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

  @Inject
  private WertelistenImportDescription importDescription;

  @Inject
  private WertelistenImporter importer;

  public WertelistenImportFormatFestlegenView() {
    super();
  }

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

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

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