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

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

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

import org.primefaces.event.SelectEvent;

import de.ivu.elect.business.dokumente.entity.DokumentVorlage;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

@Named(DokumentVorlageLeerformularActionMenu.COMPONENT_NAME)
public class DokumentVorlageLeerformularActionMenu extends AbstractActionMenuModelBuilder<DokumentVorlage> {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "dokumentVorlageLeerformularActionMenu";

  @Inject
  private transient DokumentVorlageDownloadAction dokumentVorlageDownloadAction;

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

  @Override
  public void onRowDblselect(SelectEvent event) {
    // Deaktiviert, Download funkioniert nicht..., super.onRowDblselect(event);
  }
}
