use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method goToOrganizationalUnitsTest.
@Test
public void goToOrganizationalUnitsTest() {
final PlaceRequest placeRequest = new DefaultPlaceRequest(LibraryPlaces.ORGANIZATIONAL_UNITS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(placeRequest);
part.setSelectable(false);
libraryPlaces.goToOrganizationalUnits();
verify(projectContextChangeEvent).fire(projectContextChangeEventArgumentCaptor.capture());
assertNull(projectContextChangeEventArgumentCaptor.getValue().getOrganizationalUnit());
final ArgumentCaptor<WorkspaceProjectContextChangeEvent> eventArgumentCaptor = ArgumentCaptor.forClass(WorkspaceProjectContextChangeEvent.class);
verify(projectContextChangeEvent).fire(eventArgumentCaptor.capture());
final WorkspaceProjectContextChangeEvent event = eventArgumentCaptor.getValue();
assertNull(event.getOrganizationalUnit());
assertNull(event.getWorkspaceProject());
verify(placeManager).closeAllPlacesOrNothing();
verify(placeManager).goTo(eq(part), any(PanelDefinition.class));
verify(libraryPlaces).setupLibraryBreadCrumbs();
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method goToOrgUnitsMetricsTest.
@Test
public void goToOrgUnitsMetricsTest() {
final PlaceRequest metricsScreen = new DefaultPlaceRequest(LibraryPlaces.ORG_UNITS_METRICS_SCREEN);
final PartDefinitionImpl part = new PartDefinitionImpl(metricsScreen);
part.setSelectable(false);
libraryPlaces.goToOrgUnitsMetrics();
verify(placeManager).goTo(eq(part), any(PanelDefinition.class));
verify(libraryPlaces).setupLibraryBreadCrumbsForOrgUnitsMetrics();
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class ServerManagementPerspective method buildPerspective.
@Perspective
public PerspectiveDefinition buildPerspective() {
final PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(StaticWorkbenchPanelPresenter.class.getName());
perspective.setName("ServerManagementPerspective");
perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest("ServerManagementBrowser")));
return perspective;
}
use of org.uberfire.workbench.model.impl.PartDefinitionImpl in project kie-wb-common by kiegroup.
the class ProvisioningManagementPerspective method buildPerspective.
@Perspective
public PerspectiveDefinition buildPerspective() {
final PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(StaticWorkbenchPanelPresenter.class.getName());
perspective.setName(IDENTIFIER);
perspective.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest(ProvisioningManagementBrowserPresenter.IDENTIFIER)));
return perspective;
}
Aggregations