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

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

import de.ivu.elect.business.wahl.boundary.WahlartChangeEvent;
import de.ivu.elect.business.wahl.boundary.WahlartConversationSelect;
import de.ivu.elect.business.wahl.entity.Wahlart;
import de.ivu.elect.presentation.menu.AbstractActionEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractWahlartAction extends AbstractActionEntry<Wahlart> {

  private static final long serialVersionUID = 1L;

  @Inject
  protected WahlartConversationSelect conversationSelect;

  @Inject
  private WahlartChangeEvent changeEvent;

  public AbstractWahlartAction() {
    super();
  }

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

  @Override
  public boolean isDisabledInternal(@Nonnull Wahlart entity) {
    return false;
  }

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

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