use of org.uberfire.mvp.impl.DefaultPlaceRequest 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.mvp.impl.DefaultPlaceRequest 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.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class ScreenEventPublisherTest method setUp.
@Before
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
screenEventPublisher = new ScreenEventPublisher(diagramEditorMaximizedEventEvent, diagramEditorMinimizedEventEvent, activityBeansCache);
String screenId = "editor";
PlaceRequest placeRequest = new DefaultPlaceRequest(screenId);
when(placeMaximizedEvent.getPlace()).thenReturn(placeRequest);
when(placeMinimizedEvent.getPlace()).thenReturn(placeRequest);
when(activityBeansCache.getActivity(screenId)).thenReturn(syncBeanDef);
when(syncBeanDef.getQualifiers()).thenReturn(Stream.of(annotationForMap(DiagramEditor.class, new HashMap<>())).collect(toSet()));
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class DefaultAdminPageHelper method addAdminBreadcrumbs.
private void addAdminBreadcrumbs(final String perspective, final String label, final Command accessCommand) {
breadcrumbs.clearBreadcrumbs(perspective);
breadcrumbs.addBreadCrumb(perspective, constants.Admin(), new DefaultPlaceRequest(ADMIN));
breadcrumbs.addBreadCrumb(perspective, label, accessCommand);
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class DataModellerDocksHandler method provideDocks.
@Override
public Collection<UberfireDock> provideDocks(String perspectiveIdentifier) {
List<UberfireDock> result = new ArrayList<>();
if (lastActiveContext == null) {
lastActiveContext = dataModelerWBContext.getActiveContext();
}
if (isGraphicMode(lastActiveContext)) {
result.add(new UberfireDock(UberfireDockPosition.EAST, "RANDOM", new DefaultPlaceRequest("DroolsDomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksDroolsJBPMTitle()));
result.add(new UberfireDock(UberfireDockPosition.EAST, "BRIEFCASE", new DefaultPlaceRequest("JPADomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksPersistenceTitle()));
result.add(new UberfireDock(UberfireDockPosition.EAST, "COG", new DefaultPlaceRequest("AdvancedDomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksAdvancedTitle()));
if (authorizationManager.authorize(WorkbenchFeatures.PLANNER_AVAILABLE, sessionInfo.getIdentity())) {
result.add(new UberfireDock(UberfireDockPosition.EAST, WorkbenchImageResources.INSTANCE.optaPlannerDisabledIcon(), WorkbenchImageResources.INSTANCE.optaPlannerEnabledIcon(), new DefaultPlaceRequest("PlannerDomainScreen"), perspectiveIdentifier).withSize(450).withLabel(constants.DocksOptaPlannerTitle()));
}
}
return result;
}
Aggregations