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

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

import de.ivu.elect.business.staat.boundary.StaatChangeEvent;
import de.ivu.elect.business.staat.entity.Staat;
import de.ivu.elect.presentation.menu.AbstractActionEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractStaatAction extends AbstractActionEntry<Staat> {

  private static final long serialVersionUID = 1L;

  @Inject
  private StaatChangeEvent changeEvent;

  public AbstractStaatAction() {
    super();
  }

  @Override
  public boolean isDisabledInternal(@Nonnull Staat staat) {
    return false;
  }

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

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

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