@Test public void testConfigureTree_Perspectives() { tree.configureTree(); verify(perspectiveTreeProvider).setPerspectiveName(eq(HOME), eq("HomePage")); verify(perspectiveTreeProvider).setPerspectiveName(eq(ADMIN), eq("Admin")); verify(perspectiveTreeProvider).setPerspectiveName(eq(SECURITY_MANAGEMENT), eq("SecurityManagement")); verify(perspectiveTreeProvider).setPerspectiveName(eq(GUVNOR_M2REPO), eq("ArtifactRepository")); verify(perspectiveTreeProvider).setPerspectiveName(eq(DATASET_AUTHORING), eq("DataSets")); verify(perspectiveTreeProvider).setPerspectiveName(eq(DATASOURCE_MANAGEMENT), eq("DataSources")); verify(perspectiveTreeProvider).setPerspectiveName(eq(LIBRARY), eq("ProjectAuthoring")); verify(perspectiveTreeProvider).setPerspectiveName(eq(CONTENT_MANAGEMENT), eq("Content_Management")); verify(perspectiveTreeProvider).setPerspectiveName(eq(PROVISIONING), eq("Provisioning")); verify(perspectiveTreeProvider).setPerspectiveName(eq(SERVER_MANAGEMENT), eq("Rule_Deployments")); verify(perspectiveTreeProvider).setPerspectiveName(eq(PROCESS_DEFINITIONS), eq("ProcessDefinitions")); verify(perspectiveTreeProvider).setPerspectiveName(eq(PROCESS_INSTANCES), eq("ProcessInstances")); verify(perspectiveTreeProvider).setPerspectiveName(eq(TASKS_ADMIN), eq("Tasks")); verify(perspectiveTreeProvider).setPerspectiveName(eq(JOBS), eq("Jobs")); verify(perspectiveTreeProvider).setPerspectiveName(eq(EXECUTION_ERRORS), eq("ExecutionErrors")); verify(perspectiveTreeProvider).setPerspectiveName(eq(TASKS), eq("Task_Inbox")); verify(perspectiveTreeProvider).setPerspectiveName(eq(PROCESS_DASHBOARD), eq("Process_Reports")); verify(perspectiveTreeProvider).setPerspectiveName(eq(TASK_DASHBOARD), eq("Task_Reports")); verify(perspectiveTreeProvider).setPerspectiveName(eq(APPS), eq("Apps")); }
public void configureTree() { perspectiveTreeProvider.setPerspectiveName(HOME, i18n.HomePage()); perspectiveTreeProvider.setPerspectiveName(ADMIN, i18n.Admin()); perspectiveTreeProvider.setPerspectiveName(SECURITY_MANAGEMENT, i18n.SecurityManagement()); perspectiveTreeProvider.setPerspectiveName(GUVNOR_M2REPO, i18n.ArtifactRepository()); perspectiveTreeProvider.setPerspectiveName(DATASET_AUTHORING, i18n.DataSets()); perspectiveTreeProvider.setPerspectiveName(DATASOURCE_MANAGEMENT, i18n.DataSources()); perspectiveTreeProvider.setPerspectiveName(LIBRARY, i18n.ProjectAuthoring()); perspectiveTreeProvider.setPerspectiveName(CONTENT_MANAGEMENT, i18n.Content_Management()); perspectiveTreeProvider.setPerspectiveName(PROVISIONING, i18n.Provisioning()); perspectiveTreeProvider.setPerspectiveName(SERVER_MANAGEMENT, i18n.Rule_Deployments()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DEFINITIONS, i18n.ProcessDefinitions()); perspectiveTreeProvider.setPerspectiveName(PROCESS_INSTANCES, i18n.ProcessInstances()); perspectiveTreeProvider.setPerspectiveName(TASKS_ADMIN, i18n.Tasks()); perspectiveTreeProvider.setPerspectiveName(JOBS, i18n.Jobs()); perspectiveTreeProvider.setPerspectiveName(EXECUTION_ERRORS, i18n.ExecutionErrors()); perspectiveTreeProvider.setPerspectiveName(TASKS, i18n.Task_Inbox()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DASHBOARD, i18n.Process_Reports()); perspectiveTreeProvider.setPerspectiveName(TASK_DASHBOARD, i18n.Task_Reports()); perspectiveTreeProvider.setPerspectiveName(APPS, i18n.Apps()); perspectiveTreeProvider.excludePerspectiveId("AuthoringPerspectiveNoContext"); perspectiveTreeProvider.excludePerspectiveId("FormDisplayPerspective"); perspectiveTreeProvider.excludePerspectiveId("Drools Tasks"); perspectiveTreeProvider.excludePerspectiveId("Experimental Paging"); perspectiveTreeProvider.excludePerspectiveId("StandaloneEditorPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresTreesPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresGridsDemoPerspective"); perspectiveTreeProvider.excludePerspectiveId("PreferencesCentralPerspective"); perspectiveTreeProvider.excludePerspectiveId(ADMINISTRATION); perspectiveTreeProvider.excludePerspectiveId(PLUGIN_AUTHORING); perspectiveTreeProvider.excludePerspectiveId(APPS); perspectiveTreeProvider.excludePerspectiveId(SSH_KEYS_EDITOR); editorTreeProvider.registerEditor(GUIDED_DECISION_TREE, i18n.GuidedDecisionTree()); editorTreeProvider.registerEditor(GUIDED_SCORE_CARD, i18n.GuidedScoreCard()); editorTreeProvider.registerEditor(XLS_SCORE_CARD, i18n.XLSScoreCard()); editorTreeProvider.registerEditor(STUNNER_DESIGNER, i18n.StunnerDesigner()); editorTreeProvider.registerEditor(CASE_MODELLER, i18n.CaseModeller()); editorTreeProvider.registerEditor(SCENARIO_SIMULATION_DESIGNER, i18n.ScenarioSimulationEditor()); workbenchTreeProvider.setRootNodePosition(0); perspectiveTreeProvider.setRootNodePosition(1); editorTreeProvider.setRootNodePosition(2); if (!orgUnitTreeProvider.isUnsatisfied()) { orgUnitTreeProvider.get().setRootNodePosition(3); } if (!repositoryTreeProvider.isUnsatisfied()) { repositoryTreeProvider.get().setRootNodePosition(4); } }
PermissionTreeSetup { public void configureTree() { perspectiveTreeProvider.setPerspectiveName(HOME, i18n.HomePage()); perspectiveTreeProvider.setPerspectiveName(ADMIN, i18n.Admin()); perspectiveTreeProvider.setPerspectiveName(SECURITY_MANAGEMENT, i18n.SecurityManagement()); perspectiveTreeProvider.setPerspectiveName(GUVNOR_M2REPO, i18n.ArtifactRepository()); perspectiveTreeProvider.setPerspectiveName(DATASET_AUTHORING, i18n.DataSets()); perspectiveTreeProvider.setPerspectiveName(DATASOURCE_MANAGEMENT, i18n.DataSources()); perspectiveTreeProvider.setPerspectiveName(LIBRARY, i18n.ProjectAuthoring()); perspectiveTreeProvider.setPerspectiveName(CONTENT_MANAGEMENT, i18n.Content_Management()); perspectiveTreeProvider.setPerspectiveName(PROVISIONING, i18n.Provisioning()); perspectiveTreeProvider.setPerspectiveName(SERVER_MANAGEMENT, i18n.Rule_Deployments()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DEFINITIONS, i18n.ProcessDefinitions()); perspectiveTreeProvider.setPerspectiveName(PROCESS_INSTANCES, i18n.ProcessInstances()); perspectiveTreeProvider.setPerspectiveName(TASKS_ADMIN, i18n.Tasks()); perspectiveTreeProvider.setPerspectiveName(JOBS, i18n.Jobs()); perspectiveTreeProvider.setPerspectiveName(EXECUTION_ERRORS, i18n.ExecutionErrors()); perspectiveTreeProvider.setPerspectiveName(TASKS, i18n.Task_Inbox()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DASHBOARD, i18n.Process_Reports()); perspectiveTreeProvider.setPerspectiveName(TASK_DASHBOARD, i18n.Task_Reports()); perspectiveTreeProvider.setPerspectiveName(APPS, i18n.Apps()); perspectiveTreeProvider.excludePerspectiveId("AuthoringPerspectiveNoContext"); perspectiveTreeProvider.excludePerspectiveId("FormDisplayPerspective"); perspectiveTreeProvider.excludePerspectiveId("Drools Tasks"); perspectiveTreeProvider.excludePerspectiveId("Experimental Paging"); perspectiveTreeProvider.excludePerspectiveId("StandaloneEditorPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresTreesPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresGridsDemoPerspective"); perspectiveTreeProvider.excludePerspectiveId("PreferencesCentralPerspective"); perspectiveTreeProvider.excludePerspectiveId(ADMINISTRATION); perspectiveTreeProvider.excludePerspectiveId(PLUGIN_AUTHORING); perspectiveTreeProvider.excludePerspectiveId(APPS); perspectiveTreeProvider.excludePerspectiveId(SSH_KEYS_EDITOR); editorTreeProvider.registerEditor(GUIDED_DECISION_TREE, i18n.GuidedDecisionTree()); editorTreeProvider.registerEditor(GUIDED_SCORE_CARD, i18n.GuidedScoreCard()); editorTreeProvider.registerEditor(XLS_SCORE_CARD, i18n.XLSScoreCard()); editorTreeProvider.registerEditor(STUNNER_DESIGNER, i18n.StunnerDesigner()); editorTreeProvider.registerEditor(CASE_MODELLER, i18n.CaseModeller()); editorTreeProvider.registerEditor(SCENARIO_SIMULATION_DESIGNER, i18n.ScenarioSimulationEditor()); workbenchTreeProvider.setRootNodePosition(0); perspectiveTreeProvider.setRootNodePosition(1); editorTreeProvider.setRootNodePosition(2); if (!orgUnitTreeProvider.isUnsatisfied()) { orgUnitTreeProvider.get().setRootNodePosition(3); } if (!repositoryTreeProvider.isUnsatisfied()) { repositoryTreeProvider.get().setRootNodePosition(4); } } }
PermissionTreeSetup { public void configureTree() { perspectiveTreeProvider.setPerspectiveName(HOME, i18n.HomePage()); perspectiveTreeProvider.setPerspectiveName(ADMIN, i18n.Admin()); perspectiveTreeProvider.setPerspectiveName(SECURITY_MANAGEMENT, i18n.SecurityManagement()); perspectiveTreeProvider.setPerspectiveName(GUVNOR_M2REPO, i18n.ArtifactRepository()); perspectiveTreeProvider.setPerspectiveName(DATASET_AUTHORING, i18n.DataSets()); perspectiveTreeProvider.setPerspectiveName(DATASOURCE_MANAGEMENT, i18n.DataSources()); perspectiveTreeProvider.setPerspectiveName(LIBRARY, i18n.ProjectAuthoring()); perspectiveTreeProvider.setPerspectiveName(CONTENT_MANAGEMENT, i18n.Content_Management()); perspectiveTreeProvider.setPerspectiveName(PROVISIONING, i18n.Provisioning()); perspectiveTreeProvider.setPerspectiveName(SERVER_MANAGEMENT, i18n.Rule_Deployments()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DEFINITIONS, i18n.ProcessDefinitions()); perspectiveTreeProvider.setPerspectiveName(PROCESS_INSTANCES, i18n.ProcessInstances()); perspectiveTreeProvider.setPerspectiveName(TASKS_ADMIN, i18n.Tasks()); perspectiveTreeProvider.setPerspectiveName(JOBS, i18n.Jobs()); perspectiveTreeProvider.setPerspectiveName(EXECUTION_ERRORS, i18n.ExecutionErrors()); perspectiveTreeProvider.setPerspectiveName(TASKS, i18n.Task_Inbox()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DASHBOARD, i18n.Process_Reports()); perspectiveTreeProvider.setPerspectiveName(TASK_DASHBOARD, i18n.Task_Reports()); perspectiveTreeProvider.setPerspectiveName(APPS, i18n.Apps()); perspectiveTreeProvider.excludePerspectiveId("AuthoringPerspectiveNoContext"); perspectiveTreeProvider.excludePerspectiveId("FormDisplayPerspective"); perspectiveTreeProvider.excludePerspectiveId("Drools Tasks"); perspectiveTreeProvider.excludePerspectiveId("Experimental Paging"); perspectiveTreeProvider.excludePerspectiveId("StandaloneEditorPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresTreesPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresGridsDemoPerspective"); perspectiveTreeProvider.excludePerspectiveId("PreferencesCentralPerspective"); perspectiveTreeProvider.excludePerspectiveId(ADMINISTRATION); perspectiveTreeProvider.excludePerspectiveId(PLUGIN_AUTHORING); perspectiveTreeProvider.excludePerspectiveId(APPS); perspectiveTreeProvider.excludePerspectiveId(SSH_KEYS_EDITOR); editorTreeProvider.registerEditor(GUIDED_DECISION_TREE, i18n.GuidedDecisionTree()); editorTreeProvider.registerEditor(GUIDED_SCORE_CARD, i18n.GuidedScoreCard()); editorTreeProvider.registerEditor(XLS_SCORE_CARD, i18n.XLSScoreCard()); editorTreeProvider.registerEditor(STUNNER_DESIGNER, i18n.StunnerDesigner()); editorTreeProvider.registerEditor(CASE_MODELLER, i18n.CaseModeller()); editorTreeProvider.registerEditor(SCENARIO_SIMULATION_DESIGNER, i18n.ScenarioSimulationEditor()); workbenchTreeProvider.setRootNodePosition(0); perspectiveTreeProvider.setRootNodePosition(1); editorTreeProvider.setRootNodePosition(2); if (!orgUnitTreeProvider.isUnsatisfied()) { orgUnitTreeProvider.get().setRootNodePosition(3); } if (!repositoryTreeProvider.isUnsatisfied()) { repositoryTreeProvider.get().setRootNodePosition(4); } } PermissionTreeSetup(); @Inject  PermissionTreeSetup(final WorkbenchTreeProvider workbenchTreeProvider,
                               final PerspectiveTreeProvider perspectiveTreeProvider,
                               final EditorTreeProvider editorTreeProvider,
                               final Instance<OrganizationalUnitTreeProvider> orgUnitTreeProvider,
                               final Instance<RepositoryTreeProvider> repositoryTreeProvider); }
PermissionTreeSetup { public void configureTree() { perspectiveTreeProvider.setPerspectiveName(HOME, i18n.HomePage()); perspectiveTreeProvider.setPerspectiveName(ADMIN, i18n.Admin()); perspectiveTreeProvider.setPerspectiveName(SECURITY_MANAGEMENT, i18n.SecurityManagement()); perspectiveTreeProvider.setPerspectiveName(GUVNOR_M2REPO, i18n.ArtifactRepository()); perspectiveTreeProvider.setPerspectiveName(DATASET_AUTHORING, i18n.DataSets()); perspectiveTreeProvider.setPerspectiveName(DATASOURCE_MANAGEMENT, i18n.DataSources()); perspectiveTreeProvider.setPerspectiveName(LIBRARY, i18n.ProjectAuthoring()); perspectiveTreeProvider.setPerspectiveName(CONTENT_MANAGEMENT, i18n.Content_Management()); perspectiveTreeProvider.setPerspectiveName(PROVISIONING, i18n.Provisioning()); perspectiveTreeProvider.setPerspectiveName(SERVER_MANAGEMENT, i18n.Rule_Deployments()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DEFINITIONS, i18n.ProcessDefinitions()); perspectiveTreeProvider.setPerspectiveName(PROCESS_INSTANCES, i18n.ProcessInstances()); perspectiveTreeProvider.setPerspectiveName(TASKS_ADMIN, i18n.Tasks()); perspectiveTreeProvider.setPerspectiveName(JOBS, i18n.Jobs()); perspectiveTreeProvider.setPerspectiveName(EXECUTION_ERRORS, i18n.ExecutionErrors()); perspectiveTreeProvider.setPerspectiveName(TASKS, i18n.Task_Inbox()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DASHBOARD, i18n.Process_Reports()); perspectiveTreeProvider.setPerspectiveName(TASK_DASHBOARD, i18n.Task_Reports()); perspectiveTreeProvider.setPerspectiveName(APPS, i18n.Apps()); perspectiveTreeProvider.excludePerspectiveId("AuthoringPerspectiveNoContext"); perspectiveTreeProvider.excludePerspectiveId("FormDisplayPerspective"); perspectiveTreeProvider.excludePerspectiveId("Drools Tasks"); perspectiveTreeProvider.excludePerspectiveId("Experimental Paging"); perspectiveTreeProvider.excludePerspectiveId("StandaloneEditorPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresTreesPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresGridsDemoPerspective"); perspectiveTreeProvider.excludePerspectiveId("PreferencesCentralPerspective"); perspectiveTreeProvider.excludePerspectiveId(ADMINISTRATION); perspectiveTreeProvider.excludePerspectiveId(PLUGIN_AUTHORING); perspectiveTreeProvider.excludePerspectiveId(APPS); perspectiveTreeProvider.excludePerspectiveId(SSH_KEYS_EDITOR); editorTreeProvider.registerEditor(GUIDED_DECISION_TREE, i18n.GuidedDecisionTree()); editorTreeProvider.registerEditor(GUIDED_SCORE_CARD, i18n.GuidedScoreCard()); editorTreeProvider.registerEditor(XLS_SCORE_CARD, i18n.XLSScoreCard()); editorTreeProvider.registerEditor(STUNNER_DESIGNER, i18n.StunnerDesigner()); editorTreeProvider.registerEditor(CASE_MODELLER, i18n.CaseModeller()); editorTreeProvider.registerEditor(SCENARIO_SIMULATION_DESIGNER, i18n.ScenarioSimulationEditor()); workbenchTreeProvider.setRootNodePosition(0); perspectiveTreeProvider.setRootNodePosition(1); editorTreeProvider.setRootNodePosition(2); if (!orgUnitTreeProvider.isUnsatisfied()) { orgUnitTreeProvider.get().setRootNodePosition(3); } if (!repositoryTreeProvider.isUnsatisfied()) { repositoryTreeProvider.get().setRootNodePosition(4); } } PermissionTreeSetup(); @Inject  PermissionTreeSetup(final WorkbenchTreeProvider workbenchTreeProvider,
                               final PerspectiveTreeProvider perspectiveTreeProvider,
                               final EditorTreeProvider editorTreeProvider,
                               final Instance<OrganizationalUnitTreeProvider> orgUnitTreeProvider,
                               final Instance<RepositoryTreeProvider> repositoryTreeProvider); void configureTree(); }
PermissionTreeSetup { public void configureTree() { perspectiveTreeProvider.setPerspectiveName(HOME, i18n.HomePage()); perspectiveTreeProvider.setPerspectiveName(ADMIN, i18n.Admin()); perspectiveTreeProvider.setPerspectiveName(SECURITY_MANAGEMENT, i18n.SecurityManagement()); perspectiveTreeProvider.setPerspectiveName(GUVNOR_M2REPO, i18n.ArtifactRepository()); perspectiveTreeProvider.setPerspectiveName(DATASET_AUTHORING, i18n.DataSets()); perspectiveTreeProvider.setPerspectiveName(DATASOURCE_MANAGEMENT, i18n.DataSources()); perspectiveTreeProvider.setPerspectiveName(LIBRARY, i18n.ProjectAuthoring()); perspectiveTreeProvider.setPerspectiveName(CONTENT_MANAGEMENT, i18n.Content_Management()); perspectiveTreeProvider.setPerspectiveName(PROVISIONING, i18n.Provisioning()); perspectiveTreeProvider.setPerspectiveName(SERVER_MANAGEMENT, i18n.Rule_Deployments()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DEFINITIONS, i18n.ProcessDefinitions()); perspectiveTreeProvider.setPerspectiveName(PROCESS_INSTANCES, i18n.ProcessInstances()); perspectiveTreeProvider.setPerspectiveName(TASKS_ADMIN, i18n.Tasks()); perspectiveTreeProvider.setPerspectiveName(JOBS, i18n.Jobs()); perspectiveTreeProvider.setPerspectiveName(EXECUTION_ERRORS, i18n.ExecutionErrors()); perspectiveTreeProvider.setPerspectiveName(TASKS, i18n.Task_Inbox()); perspectiveTreeProvider.setPerspectiveName(PROCESS_DASHBOARD, i18n.Process_Reports()); perspectiveTreeProvider.setPerspectiveName(TASK_DASHBOARD, i18n.Task_Reports()); perspectiveTreeProvider.setPerspectiveName(APPS, i18n.Apps()); perspectiveTreeProvider.excludePerspectiveId("AuthoringPerspectiveNoContext"); perspectiveTreeProvider.excludePerspectiveId("FormDisplayPerspective"); perspectiveTreeProvider.excludePerspectiveId("Drools Tasks"); perspectiveTreeProvider.excludePerspectiveId("Experimental Paging"); perspectiveTreeProvider.excludePerspectiveId("StandaloneEditorPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresTreesPerspective"); perspectiveTreeProvider.excludePerspectiveId("WiresGridsDemoPerspective"); perspectiveTreeProvider.excludePerspectiveId("PreferencesCentralPerspective"); perspectiveTreeProvider.excludePerspectiveId(ADMINISTRATION); perspectiveTreeProvider.excludePerspectiveId(PLUGIN_AUTHORING); perspectiveTreeProvider.excludePerspectiveId(APPS); perspectiveTreeProvider.excludePerspectiveId(SSH_KEYS_EDITOR); editorTreeProvider.registerEditor(GUIDED_DECISION_TREE, i18n.GuidedDecisionTree()); editorTreeProvider.registerEditor(GUIDED_SCORE_CARD, i18n.GuidedScoreCard()); editorTreeProvider.registerEditor(XLS_SCORE_CARD, i18n.XLSScoreCard()); editorTreeProvider.registerEditor(STUNNER_DESIGNER, i18n.StunnerDesigner()); editorTreeProvider.registerEditor(CASE_MODELLER, i18n.CaseModeller()); editorTreeProvider.registerEditor(SCENARIO_SIMULATION_DESIGNER, i18n.ScenarioSimulationEditor()); workbenchTreeProvider.setRootNodePosition(0); perspectiveTreeProvider.setRootNodePosition(1); editorTreeProvider.setRootNodePosition(2); if (!orgUnitTreeProvider.isUnsatisfied()) { orgUnitTreeProvider.get().setRootNodePosition(3); } if (!repositoryTreeProvider.isUnsatisfied()) { repositoryTreeProvider.get().setRootNodePosition(4); } } PermissionTreeSetup(); @Inject  PermissionTreeSetup(final WorkbenchTreeProvider workbenchTreeProvider,
                               final PerspectiveTreeProvider perspectiveTreeProvider,
                               final EditorTreeProvider editorTreeProvider,
                               final Instance<OrganizationalUnitTreeProvider> orgUnitTreeProvider,
                               final Instance<RepositoryTreeProvider> repositoryTreeProvider); void configureTree();  }