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

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

import de.ivu.elect.business.gruppe.boundary.GruppeChangeEvent;
import de.ivu.elect.business.gruppe.boundary.GruppeConversationSelect;
import de.ivu.elect.business.gruppe.entity.Gruppe;
import de.ivu.elect.presentation.menu.AbstractActionEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractGruppeAction extends AbstractActionEntry<Gruppe> {

  private static final long serialVersionUID = 1L;

  @Inject
  protected GruppeChangeEvent gruppeChangeEvent;

  @Inject
  protected GruppeConversationSelect gruppeConversationSelect;

  public AbstractGruppeAction() {
    super();
  }

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

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

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

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