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

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

import de.ivu.elect.business.wahlvorschlag.boundary.ReferendumOptionChangeEvent;
import de.ivu.elect.business.wahlvorschlag.boundary.ReferendumOptionConversationSelect;
import de.ivu.elect.business.wahlvorschlag.entity.ReferendumOption;
import de.ivu.elect.presentation.menu.AbstractActionEntry;

public abstract class AbstractReferendumOptionAction extends AbstractActionEntry<ReferendumOption> {

  private static final long serialVersionUID = 1L;

  @Inject
  protected transient ReferendumOptionConversationSelect referendumOptionSelect;

  @Inject
  protected transient ReferendumOptionChangeEvent referendumOptionChangeEvent;

  public AbstractReferendumOptionAction() {
    super();
  }

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

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

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