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

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

import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.wahlrechtspruefung.boundary.PruefkriteriumImporter;
import de.ivu.elect.business.wahlrechtspruefung.entity.PruefkriteriumImportContext;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportFormatFestlegenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(PruefkriteriumImportFormatFestlegenView.COMPONENT_NAME)
@View(viewId = PruefkriteriumImportFormatFestlegenView.VIEW_ID, useCase = UseCasePermission.PRUEFKRITERIUM_IMPORT)
public class PruefkriteriumImportFormatFestlegenView extends AbstractImportFormatFestlegenView<PruefkriteriumImportContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "pruefkriteriumImportFormatFestlegenView";

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

  @Inject
  private transient PruefkriteriumImporter pruefkriteriumImporter;

  @Inject
  private transient PruefkriteriumImportDescription pruefkriteriumImportDescription;

  public PruefkriteriumImportFormatFestlegenView() {
    super();
  }

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

  @Override
  protected PruefkriteriumImporter getImporter() {
    return pruefkriteriumImporter;
  }

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