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

import javax.inject.Inject;
import javax.inject.Named;
import java.util.List;

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.person.boundary.BerufImporter;
import de.ivu.elect.business.person.entity.Beruf;
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;

@Named(BerufImportSearchView.COMPONENT_NAME)
@View(viewId = BerufImportSearchView.VIEW_ID, useCase = UseCasePermission.BERUF_IMPORTIEREN)
public class BerufImportSearchView extends AbstractImportSearchView<List<Beruf>, NoContext> {

  public static final String COMPONENT_NAME = "berufImportSearchView";

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

  @Inject
  private BerufImporter rolleImporter;

  @Inject
  private BerufImportDescription importDescription;

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

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

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

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