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

import de.ivu.elect.business.email.entity.EmailVorgang;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

import javax.inject.Inject;
import javax.inject.Named;
import java.util.ArrayList;
import java.util.List;

@Named(EmailVorgangActionMenu.COMPONENT_NAME)
public class EmailVorgangActionMenu extends AbstractActionMenuModelBuilder<EmailVorgang> {

  public static final String COMPONENT_NAME = "emailVorgangActionMenu";

  private static final long serialVersionUID = 1L;

  @Inject
  protected EmailVorgangEmpfaengerAnzeigenAction emailVorgangEmpfaengerAnzeigenAction;

  @Inject
  protected EmailVorgangSendeAlleErneutAction emailVorgangSendeAlleErneutAction;

  @Inject
  protected EmailVorgangSendeFehlerhafteErneutAction emailVorgangSendeFehlerhafteErneutAction;

  @Inject
  protected EmailVorgangSendenAbbrechenAction emailVorgangSendenAbbrechenAction;

  @Inject
  protected EmailVorgangDeleteAction emailVorgangDeleteAction;

  public EmailVorgangActionMenu() {
    super();
  }

  @Override
  protected List<ActionEntry<EmailVorgang>> getActionEntriesSorted() {
    List<ActionEntry<EmailVorgang>> result = new ArrayList<>();

    result.add(emailVorgangEmpfaengerAnzeigenAction);
    result.add(emailVorgangSendeAlleErneutAction);
    result.add(emailVorgangSendeFehlerhafteErneutAction);
    result.add(emailVorgangSendenAbbrechenAction);
    result.add(emailVorgangDeleteAction);

    return result;
  }
}
