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

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

import javax.inject.Inject;

import de.ivu.elect.business.datei.entity.DateiExport;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

public abstract class AbstractDateiExportSearchActionMenu extends AbstractActionMenuModelBuilder<DateiExport> {

  private static final long serialVersionUID = 1L;

  @Inject
  protected transient DateiExportVorschauAction dateiExportVorschauAction;

  @Inject
  protected transient DateiExportDownloadAction dateiExportDownloadAction;

  @Inject
  protected transient DateiExportDeleteAction dateiExportDeleteAction;

  protected AbstractDateiExportSearchActionMenu() {
    super();
  }

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

    result.add(dateiExportVorschauAction);

    addDownloadAction(result);

    addDeleteAction(result);

    return result;
  }

  protected void addDownloadAction(List<ActionEntry<DateiExport>> result) {
    result.add(dateiExportDownloadAction);
  }

  protected void addDeleteAction(List<ActionEntry<DateiExport>> result) {
    result.add(dateiExportDeleteAction);
  }
}
