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

import java.util.List;

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

import de.ivu.elect.business.datei.entity.DateiImportBerichtCustomData;
import de.ivu.elect.business.exchange.control.AbstractImporter;
import de.ivu.elect.business.exchange.control.NoContext;
import de.ivu.elect.business.geodata.boundary.GeodataOrtImporter;
import de.ivu.elect.business.geodata.entity.GeodataOrt;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportSearchView;
import de.ivu.elect.presentation.exchange.ImportDescription;
import de.ivu.elect.presentation.hilfe.OnlineHilfeId;

@OnlineHilfeId(value = "364", mehrfachVergebenOk = true)
@Named(GeodataOrtImportSearchView.COMPONENT_NAME)
@View(viewId = GeodataOrtImportSearchView.VIEW_ID, useCase = UseCasePermission.GEODATA_ORT_IMPORTIEREN)
public class GeodataOrtImportSearchView extends AbstractImportSearchView<List<GeodataOrt>, NoContext> {

  public static final String COMPONENT_NAME = "geodataOrtImportSearchView";

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

  @Inject
  private GeodataOrtImporter geodataOrtImporter;

  @Inject
  private GeodataOrtImportDescription geodataOrtImportDescription;

  public GeodataOrtImportSearchView() {
    super();
  }

  @Override
  protected AbstractImporter<List<GeodataOrt>, NoContext, ? > getImporter() {
    return geodataOrtImporter;
  }

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

  @Override
  protected NoContext getContext() {
    return NoContext.NO_CONTEXT;
  }

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