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

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

import de.ivu.elect.business.datei.entity.DateiImportBerichtCustomData;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.business.wahl.control.WahlImportObject;
import de.ivu.elect.business.wahl.entity.WahlImportContext;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportSearchView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(AbstractWahlImportSearchView.COMPONENT_NAME)
@View(viewId = AbstractWahlImportSearchView.VIEW_ID, useCase = UseCasePermission.WAHL_IMPORTIEREN)
public abstract class AbstractWahlImportSearchView extends AbstractImportSearchView<WahlImportObject, WahlImportContext> {

  public static final String COMPONENT_NAME = "wahlImportSearchView";

  public static final String VIEW_ID = "/wahl/wahl-import-search.xhtml";

  @Inject
  private transient WahlImportDescription importDescription;

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

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

  @Override
  protected DateiImportBerichtCustomData createNewDateiImportBerichtCustomData() {
    return new DateiImportBerichtCustomData();
  }

}
