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

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

import de.ivu.elect.business.kandidatur.boundary.ListenkandidaturExtendedDAO;
import de.ivu.elect.business.wahlvorschlag.entity.Liste;

@Specializes
public class NlListeZulassungAblehnenAction extends ListeZulassungAblehnenAction{


  private static final long serialVersionUID = 1L;

  @Inject
  private transient NlListeActionDisabled nlListeActionDisabled;

  @Inject
  private transient ListenkandidaturExtendedDAO listenkandidaturExtendedDAO;

  @Override
  public boolean isDisabledInternal(@Nonnull Liste liste) {
    liste.setListenkandidaturenPreloader(listenkandidaturExtendedDAO);
    return nlListeActionDisabled.isDisabled(liste) || super.isDisabledInternal(liste);
  }
}
