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

import javax.annotation.Nonnull;
import javax.inject.Inject;

import de.ivu.elect.business.person.boundary.PersonendatenChangeEvent;
import de.ivu.elect.business.personenpruefung.entity.PersonenKonflikt;
import de.ivu.elect.presentation.menu.AbstractActionEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractPersonenKonfliktAction extends AbstractActionEntry<PersonenKonflikt> {

  private static final long serialVersionUID = 1L;

  @Inject
  private PersonendatenChangeEvent changeEvent;

  public AbstractPersonenKonfliktAction() {
    super();
  }

  @Override
  public boolean isDisabledInternal(@Nonnull PersonenKonflikt entity) {
    return entity == null;
  }

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

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

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