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

import javax.inject.Inject;

import de.ivu.elect.business.datei.boundary.DateiImportChangeEvent;
import de.ivu.elect.business.datei.entity.DateiImport;
import de.ivu.elect.business.security.UseCasePermission;
import de.ivu.elect.presentation.exchange.ImportDescriptionSelect;
import de.ivu.elect.presentation.menu.AbstractActionEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractDateiImportAction extends AbstractActionEntry<DateiImport> {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient DateiImportChangeEvent changeEvent;

  @Inject
  protected transient ImportDescriptionSelect importDescriptionState;

  @Override
  protected void fireChangeEvent() {
    changeEvent.sendChangeEvent();
  }

  @Override
  protected boolean isFireChangeEvent() {
    return false;
  }

  @Override
  protected UseCasePermission getRequiredPermission() {
    return importDescriptionState.getUseCasePermission();
  }

  @Override
  protected AbstractGebietSecurity getGebietSecurity() {
    return KEINE_GEBIET_SECURITY;
  }
}
