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

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

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

import de.ivu.elect.business.internet.entity.InternetWidget;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

@Named(InternetWidgetActionMenu.COMPONENT_NAME)
public class InternetWidgetActionMenu extends AbstractActionMenuModelBuilder<InternetWidget> {

  public static final String COMPONENT_NAME = "internetWidgetActionMenu";

  private static final long serialVersionUID = 1L;

  @Inject
  private transient InternetWidgetEditAction editAction;

  @Inject
  private transient InternetWidgetKopieAction internetWidgetKopieAction;

  @Inject
  private transient InternetWidgetSearchFilesAction internetWidgetSearchFilesAction;

  @Inject
  private transient InternetWidgetDeleteAction deleteAction;

  public InternetWidgetActionMenu() {
    super();
  }

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

    result.add(editAction);
    result.add(internetWidgetSearchFilesAction);
    result.add(internetWidgetKopieAction);
    result.add(deleteAction);

    return result;
  }
}
