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

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

import de.ivu.elect.business.mandant.boundary.MandantChangeEvent;
import de.ivu.elect.business.mandant.entity.Mandant;
import de.ivu.elect.presentation.menu.AbstractActionEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractMandantAction extends AbstractActionEntry<Mandant> {

  private static final long serialVersionUID = 1L;

  @Inject
  private MandantChangeEvent changeEvent;

  public AbstractMandantAction() {
    super();
  }

  @Override
  public boolean isDisabledInternal(@Nonnull Mandant mandant) {
    return false;
  }

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

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

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