protected List<? extends MenuItem> getWorkViews() {
    final List<MenuItem> result = new ArrayList<>(4);

    result.add(
        MenuFactory.newSimpleItem(constants.Tasks_List())
            .perspective("DataSet Tasks")
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Tasks_List_Admin())
            .perspective("Tasks Admin")
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Data_Sets())
            .perspective("DataSetAuthoringPerspective")
            .endMenu()
            .build()
            .getItems()
            .get(0));

    return result;
  }
  protected List<? extends MenuItem> getDashboardsViews() {
    final List<MenuItem> result = new ArrayList<>(2);

    result.add(
        MenuFactory.newSimpleItem(constants.Process_Dashboard())
            .perspective("DashboardPerspective")
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Business_Dashboard())
            .respondsWith(
                () ->
                    Window.open(
                        DashboardURLBuilder.getDashboardURL(
                            "/dashbuilder/workspace",
                            null,
                            LocaleInfo.getCurrentLocale().getLocaleName()),
                        "_blank",
                        ""))
            .endMenu()
            .build()
            .getItems()
            .get(0));

    return result;
  }
  protected List<? extends MenuItem> getExperimentalViews() {
    final List<MenuItem> result = new ArrayList<>(3);

    result.add(
        MenuFactory.newSimpleItem(constants.Grid_Base_Test())
            .perspective("Grid Base Test")
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Logs())
            .perspective("Logs")
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Documents())
            .perspective("Documents Perspective")
            .endMenu()
            .build()
            .getItems()
            .get(0));

    return result;
  }
  protected List<? extends MenuItem> getProcessManagementViews() {
    final List<MenuItem> result = new ArrayList<>(3);

    result.add(
        MenuFactory.newSimpleItem(constants.Process_Definitions())
            .perspective("Process Definitions")
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Process_Instances())
            .perspective("DataSet Process Instances With Variables")
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Process_Instances_Admin())
            .perspective("Process Admin")
            .endMenu()
            .build()
            .getItems()
            .get(0));

    return result;
  }
  protected List<? extends MenuItem> getAuthoringViews() {
    final List<MenuItem> result = new ArrayList<>(1);

    result.add(
        MenuFactory.newSimpleItem(constants.Process_Authoring())
            .perspective(constants.Authoring())
            .endMenu()
            .build()
            .getItems()
            .get(0));

    return result;
  }
  protected List<? extends MenuItem> getDeploymentViews() {
    final List<MenuItem> result = new ArrayList<>(3);

    result.add(
        MenuFactory.newSimpleItem(constants.Execution_Servers())
            .place(new DefaultPlaceRequest("ServerManagementPerspective"))
            .endMenu()
            .build()
            .getItems()
            .get(0));
    result.add(
        MenuFactory.newSimpleItem(constants.Jobs())
            .perspective("Jobs")
            .endMenu()
            .build()
            .getItems()
            .get(0));

    return result;
  }
  @Override
  protected void setupMenu() {

    final AbstractWorkbenchPerspectiveActivity defaultPerspective =
        menusHelper.getDefaultPerspectiveActivity();
    final Menus menus =
        MenuFactory.newTopLevelMenu(constants.Home())
            .place(new DefaultPlaceRequest(defaultPerspective.getIdentifier()))
            .endMenu()
            .newTopLevelMenu(constants.Authoring())
            .withItems(getAuthoringViews())
            .endMenu()
            .newTopLevelMenu(constants.Deploy())
            .withItems(getDeploymentViews())
            .endMenu()
            .newTopLevelMenu(constants.Case_Management())
            .withItems(getCaseManagementViews())
            .endMenu()
            .newTopLevelMenu(constants.Process_Management())
            .withItems(getProcessManagementViews())
            .endMenu()
            .newTopLevelMenu(constants.Work())
            .withItems(getWorkViews())
            .endMenu()
            .newTopLevelMenu(constants.Dashboards())
            .withItems(getDashboardsViews())
            .endMenu()
            .newTopLevelMenu(constants.Extensions())
            .withItems(menusHelper.getExtensionsViews())
            .endMenu()
            .newTopLevelMenu(constants.Experimental())
            .withItems(getExperimentalViews())
            .endMenu()
            .newTopLevelCustomMenu(iocManager.lookupBean(SearchMenuBuilder.class).getInstance())
            .endMenu()
            .build();

    menuBar.addMenus(menus);

    menusHelper.addRolesMenuItems();
    menusHelper.addGroupsMenuItems();
    menusHelper.addWorkbenchConfigurationMenuItem();
    menusHelper.addUtilitiesMenuItems();
  }
  protected List<? extends MenuItem> getCaseManagementViews() {
    final List<MenuItem> result = new ArrayList<>(1);

    result.add(
        MenuFactory.newSimpleItem(constants.Cases())
            .perspective("Cases")
            .endMenu()
            .build()
            .getItems()
            .get(0));

    return result;
  }