
package de.ivu.elect.presentation.system.menu;

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

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

import de.ivu.elect.jee.presentation.menu.MenuEntry;
import de.ivu.elect.presentation.ui.AbstractPageMenuModelBuilder;

@Named(SystemPageMenu.COMPONENT_NAME)
public class SystemPageMenu extends AbstractPageMenuModelBuilder {

  private static final long serialVersionUID = 1L;

  public static final String COMPONENT_NAME = "systemPageMenu";

  @Inject
  protected transient SystemLogSearchMenuItemEntry systemLogSearchMenuItemEntry;

  @Inject
  protected transient MemoryMonitorMenuItemEntry memoryMonitorMenuItemEntry;

  @Inject
  protected transient DatabaseMonitorMenuItemEntry databaseMonitorMenuItemEntry;

  @Inject
  protected transient ThreadDumpMenuItemEntry threadDumpMenuItemEntry;

  @Inject
  protected transient SystemInfoMenuItemEntry systemInfoMenuItemEntry;

  @Inject
  protected transient SystemUebersichtMenuItemEntry systemUebersichtMenuItemEntry;

  @Inject
  protected transient DateiStatusuebersichtMenuItemEntry dateiStatusuebersichtMenuItemEntry;

  @Inject
  protected transient HibernateStatistikMenuItemEntry hibernateStatistikMenuItemEntry;

  @Inject
  protected transient HibernateStatistikResetCacheMenuItemEntry hibernateStatistikResetCacheMenuItemEntry;

  @Inject
  protected transient PerformanceStatistikMenuItemEntry performanceStatistikMenuItemEntry;

  @Inject
  protected transient BackgroundServiceMenuItemEntry backgroundServiceMenuItemEntry;

  @Inject
  protected transient TimerMenuItemEntry timerMenuItemEntry;

  @Inject
  protected transient SkriptConsoleMenuItemEntry skriptConsoleMenuItemEntry;

  @Inject
  protected transient ThirdPartyMainMenuEntry thirdPartyMainMenuEntry;

  public SystemPageMenu() {
    super();
  }

  @Override
  protected List<MenuEntry> getMenuEntriesSorted() {
    List<MenuEntry> result = new ArrayList<>();

    result.add(systemLogSearchMenuItemEntry);
    result.add(backgroundServiceMenuItemEntry);
    result.add(timerMenuItemEntry);
    result.add(systemUebersichtMenuItemEntry);
    result.add(systemInfoMenuItemEntry);
    result.add(threadDumpMenuItemEntry);
    result.add(hibernateStatistikMenuItemEntry);
    result.add(hibernateStatistikResetCacheMenuItemEntry);
    result.add(performanceStatistikMenuItemEntry);
    result.add(memoryMonitorMenuItemEntry);
    result.add(databaseMonitorMenuItemEntry);
    result.add(dateiStatusuebersichtMenuItemEntry);
    result.add(skriptConsoleMenuItemEntry);
    result.add(thirdPartyMainMenuEntry);

    return result;
  }
}
