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

import java.util.List;

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

import de.ivu.elect.business.benutzerverwaltung.boundary.RolleImporter;
import de.ivu.elect.business.benutzerverwaltung.entity.Rolle;
import de.ivu.elect.business.benutzerverwaltung.entity.RolleExchangeContext;
import de.ivu.elect.business.exchange.control.AbstractImporter;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.View;
import de.ivu.elect.presentation.exchange.AbstractImportBestaetigenView;
import de.ivu.elect.presentation.exchange.ImportDescription;

@Named(RolleImportBestaetigenView.COMPONENT_NAME)
@View(viewId = RolleImportBestaetigenView.VIEW_ID, useCase = UseCasePermission.ROLLE_IMPORTIEREN)
public class RolleImportBestaetigenView extends AbstractImportBestaetigenView<List<Rolle>, RolleExchangeContext> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "rolleImportBestaetigenView";

  public static final String VIEW_ID = "/benutzerverwaltung/rolle-import-bestaetigen.xhtml";

  @Inject
  private transient RolleImporter rolleImporter;

  @Inject
  private transient RolleImportDescription rolleImportDescription;

  public RolleImportBestaetigenView() {
    super();
  }

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

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

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