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

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

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

import de.ivu.elect.business.wahlvorschlag.entity.ReferendumOption;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

@Named(ReferendumOptionActionMenu.COMPONENT_NAME)
public class ReferendumOptionActionMenu extends AbstractActionMenuModelBuilder<ReferendumOption> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "referendumOptionActionMenu";

  @Inject
  private transient ReferendumOptionEditAction referendumOptionEditAction;

  @Inject
  private transient ReferendumOptionDeleteAction referendumOptionDeleteAction;

  public ReferendumOptionActionMenu() {
    super();
  }

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

    result.add(referendumOptionEditAction);
    result.add(referendumOptionDeleteAction);

    return result;
  }
}
