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

import de.ivu.elect.business.email.entity.EmailVorlage;
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(EmailVorlageActionMenu.COMPONENT_NAME)
public class EmailVorlageActionMenu extends AbstractActionMenuModelBuilder<EmailVorlage> {

  public static final String COMPONENT_NAME = "emailVorlageActionMenu";

  private static final long serialVersionUID = 1L;

  @Inject
  protected EmailVorlageEditAction emailVorlageEditAction;

  @Inject
  protected EmailVorlageTestenAction emailVorlageTestenAction;

  @Inject
  protected EmailVorlageDeleteAction emailVorlageDeleteAction;

  public EmailVorlageActionMenu() {
    super();
  }

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

    result.add(emailVorlageEditAction);
    result.add(emailVorlageTestenAction);
    result.add(emailVorlageDeleteAction);

    return result;
  }
}
