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

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

import de.ivu.elect.business.dokumente.boundary.DokumentVorlageChangeEvent;
import de.ivu.elect.business.dokumente.entity.DokumentVorlage;
import de.ivu.elect.presentation.menu.AbstractActionEntry;
import de.ivu.elect.presentation.security.AbstractGebietSecurity;

public abstract class AbstractDokumentVorlageAction extends AbstractActionEntry<DokumentVorlage> {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient DokumentVorlageChangeEvent dokumentVorlageChangeEvent;

  public AbstractDokumentVorlageAction() {
    super();
  }

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

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

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

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