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

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

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

import de.ivu.elect.business.mandant.entity.Mandant;
import de.ivu.elect.jee.presentation.action.AbstractActionMenuModelBuilder;
import de.ivu.elect.jee.presentation.action.ActionEntry;

@Named(MandantActionMenu.COMPONENT_NAME)
public class MandantActionMenu extends AbstractActionMenuModelBuilder<Mandant> {

  public static final String COMPONENT_NAME = "mandantActionMenu";

  private static final long serialVersionUID = 1L;

  @Inject
  private transient  MandantEditAction editAction;

  @Inject
  private transient MandantAdminPasswortResetAction mandantAdminPasswortResetAction;

  @Inject
  private transient MandantResetAction mandantResetAction;

  @Inject
  private transient MandantBackupAction mandantBackupAction;

  @Inject
  private transient  MandantDeleteAction deleteAction;

  public MandantActionMenu() {
    super();
  }

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

    result.add(editAction);
    result.add(mandantAdminPasswortResetAction);
    result.add(mandantResetAction);
    result.add(mandantBackupAction);
    result.add(deleteAction);

    return result;
  }
}
