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

import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import de.ivu.elect.business.wahl.entity.Wahl;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

@Named(WahlActionMenu.COMPONENT_NAME)
public class WahlActionMenu extends AbstractActionMenuModelBuilder<Wahl> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "wahlActionMenu";

  @Inject
  protected transient WahlEditAction wahlEditAction;

  @Inject
  protected transient WahlDeleteAction wahlDeleteAction;

  @Override
  protected List<ActionEntry<Wahl>> getActionEntriesSorted() {
    List<ActionEntry<Wahl>> result = new ArrayList<>();
    result.add(wahlEditAction);
    result.add(wahlDeleteAction);
    return result;
  }

}
