congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PlaceManager.getStatus
Code IndexAdd Tabnine to your IDE (free)

How to use
getStatus
method
in
org.uberfire.client.mvp.PlaceManager

Best Java code snippets using org.uberfire.client.mvp.PlaceManager.getStatus (Showing top 20 results out of 315)

origin: kiegroup/jbpm-wb

public void openProcessDetailsScreen() {
  PlaceStatus status = placeManager.getStatus(PROCESS_INSTANCE_DETAILS_SCREEN);
  if (status == PlaceStatus.CLOSE) {
    placeManager.goTo(PROCESS_INSTANCE_DETAILS_SCREEN);
  }
}
origin: kiegroup/drools-wb

private Optional<RightPanelView> getRightPanelView() {
  final DefaultPlaceRequest placeRequest = new DefaultPlaceRequest(RightPanelPresenter.IDENTIFIER);
  if (PlaceStatus.OPEN.equals(placeManager.getStatus(placeRequest))) {
    final AbstractWorkbenchActivity rightPanelActivity = (AbstractWorkbenchActivity) placeManager.getActivity(placeRequest);
    return Optional.of((RightPanelView) rightPanelActivity.getWidget());
  } else {
    return Optional.empty();
  }
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onPreferencesSaveOutsideLibraryTest() {
  doReturn(PlaceStatus.CLOSE).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  doReturn(PlaceStatus.CLOSE).when(placeManager).getStatus(any(PlaceRequest.class));
  libraryPlaces.onPreferencesSave(mock(PreferencesCentralSaveEvent.class));
  verify(libraryPlaces,
      never()).goToProject();
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onSelectPlaceOutsideLibraryTest() {
  doReturn(PlaceStatus.CLOSE).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  doReturn(PlaceStatus.CLOSE).when(placeManager).getStatus(any(PlaceRequest.class));
  final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
  libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
  verify(placeGainFocusEvent,
      never()).getPlace();
}
origin: org.jbpm/jbpm-console-ng-dashboard-client

@Test
public void testOpenInstanceDetails() {
  when(placeManager.getStatus(ProcessDashboard.PROCESS_DETAILS_SCREEN_ID)).thenReturn(PlaceStatus.CLOSE);
  presenter.tableCellSelected(COLUMN_PROCESS_INSTANCE_ID, 3);
  verify(instanceSelectionEvent).fire(any(ProcessInstanceSelectionEvent.class));
  verify(processDashboardFocusEvent).fire(any(ProcessDashboardFocusEvent.class));
  verify(placeManager).goTo(ProcessDashboard.PROCESS_DETAILS_SCREEN_ID);
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onClosedProjectDeleted() {
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(anyString());
  final Repository anotherRepository = mock(Repository.class);
  doReturn("anotherRepository").when(anotherRepository).getIdentifier();
  libraryPlaces.onProjectDeleted(new RepositoryRemovedEvent(anotherRepository));
  verify(projectContextChangeEvent, never()).fire(any());
  verify(libraryPlaces, never()).closeAllPlaces();
  verify(libraryPlaces, never()).goToLibrary();
  verify(notificationEvent, never()).fire(any());
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onOpenedProjectDeleted() {
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(anyString());
  libraryPlaces.onProjectDeleted(new RepositoryRemovedEvent(activeRepository));
  final InOrder inOrder = inOrder(projectContextChangeEvent, libraryPlaces, notificationEvent);
  inOrder.verify(projectContextChangeEvent).fire(any());
  inOrder.verify(libraryPlaces).closeAllPlaces();
  inOrder.verify(libraryPlaces).goToLibrary();
  inOrder.verify(notificationEvent).fire(any());
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onPreferencesSaveTest() {
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  doNothing().when(libraryPlaces).goToProject();
  libraryPlaces.onPreferencesSave(mock(PreferencesCentralSaveEvent.class));
  verify(libraryPlaces).goToProject();
}
origin: org.jbpm/jbpm-wb-dashboard-client

@Test
public void testOpenInstanceDetails() {
  when(taskService.getTask(anyString(),
               anyString(),
               anyLong())).thenReturn(mock(TaskSummary.class));
  when(placeManager.getStatus(TASK_DETAILS_SCREEN)).thenReturn(PlaceStatus.CLOSE);
  TableDisplayer tableDisplayer = presenter.getTasksTable();
  tableDisplayer.selectCell(COLUMN_TASK_ID,
               0);
  verify(taskSelectionEvent).fire(any(TaskSelectionEvent.class));
  verify(placeManager).goTo(TASK_DETAILS_SCREEN);
}
origin: kiegroup/jbpm-wb

@Test
public void testOpenInstanceDetails() {
  when(taskService.getTask(anyString(),
               anyString(),
               anyLong())).thenReturn(mock(TaskSummary.class));
  when(placeManager.getStatus(TASK_DETAILS_SCREEN)).thenReturn(PlaceStatus.CLOSE);
  TableDisplayer tableDisplayer = presenter.getTasksTable();
  tableDisplayer.selectCell(COLUMN_TASK_ID,
               0);
  verify(taskSelectionEvent).fire(any(TaskSelectionEvent.class));
  verify(placeManager).goTo(TASK_DETAILS_SCREEN);
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onSelectAssetTest() {
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  final ObservablePath path = mock(ObservablePath.class);
  final PathPlaceRequest pathPlaceRequest = mock(PathPlaceRequest.class);
  doReturn(path).when(pathPlaceRequest).getPath();
  final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
  doReturn(pathPlaceRequest).when(placeGainFocusEvent).getPlace();
  libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
  verify(libraryBreadcrumbs).setupForAsset(libraryPlaces.getActiveWorkspace(), path);
  verify(libraryPlaces).showDocks();
}
origin: kiegroup/drools-wb

@Test
public void onPlaceHiddenEvent() {
  PlaceHiddenEvent mockPlaceHiddenEvent = mock(PlaceHiddenEvent.class);
  when(mockPlaceHiddenEvent.getPlace()).thenReturn(placeRequestMock);
  when(placeManagerMock.getStatus(placeRequestMock)).thenReturn(PlaceStatus.OPEN);
  presenter.onPlaceHiddenEvent(mockPlaceHiddenEvent);
  verify(scenarioSimulationDocksHandlerMock).removeDocks();
  verify(testRunnerReportingScreenMock).reset();
  verify(scenarioGridMock, times(1)).clearSelections();
}
origin: org.jbpm/jbpm-console-ng-process-runtime-client

public void refreshNewProcessInstance( @Observes NewProcessInstanceEvent newProcessInstance ) {
  placeIdentifier = "Advanced Process Details Multi";
  PlaceStatus definitionDetailsStatus = placeManager.getStatus( new DefaultPlaceRequest( placeIdentifier ) );
  if ( definitionDetailsStatus == PlaceStatus.OPEN ) {
    placeManager.closePlace( placeIdentifier );
  }
  placeManager.goTo( "Process Instance Details Multi" );
  processInstanceSelected.fire( new ProcessInstanceSelectionEvent( newProcessInstance.getDeploymentId(),
                                   newProcessInstance.getNewProcessInstanceId(),
                                   newProcessInstance.getNewProcessDefId(), newProcessInstance.getProcessDefName(), newProcessInstance.getNewProcessInstanceStatus() ) );
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void testOnSocialFileSelected_Repository() {
  doReturn(mock(WorkspaceProject.class)).when(projectService).resolveProject(any(Path.class));
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  final SocialFileSelectedEvent event = new SocialFileSelectedEvent(ExtendedTypes.NEW_REPOSITORY_EVENT.name(),
                                   null);
  libraryPlaces.onSocialFileSelected(event);
  verify(placeManager).goTo(LibraryPlaces.REPOSITORY_STRUCTURE_SCREEN);
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onSelectProjectTest() {
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.PROJECT_SCREEN);
  final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
  doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
  libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
  verify(libraryPlaces).hideDocks();
  verify(libraryBreadcrumbs).setupForProject(libraryPlaces.getActiveWorkspace());
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void testOnSocialFileSelected_Module() {
  doReturn(mock(WorkspaceProject.class)).when(projectService).resolveProject(any(Path.class));
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  final PlaceRequest libraryPerspective = libraryPlaces.getLibraryPlaceRequestWithoutRefresh();
  final SocialFileSelectedEvent event = new SocialFileSelectedEvent(ModuleEventType.NEW_MODULE.name(),
                                   null);
  libraryPlaces.onSocialFileSelected(event);
  verify(placeManager).goTo(libraryPerspective);
  verify(libraryPlaces).goToProject();
}
origin: org.kie.workbench.screens/kie-wb-common-library-client

@Test
public void onSelectLibraryTest() {
  doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
  final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
  final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
  doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
  libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
  verify(libraryPlaces).hideDocks();
  verify(libraryBreadcrumbs).setupForSpace(libraryPlaces.getActiveWorkspace().getOrganizationalUnit());
}
origin: kiegroup/appformer

@PostConstruct
public void init() {
  view.init(this);
  final boolean isAlertsActive = PlaceStatus.OPEN.equals(placeManager.getStatus(MessageConsoleScreen.ALERTS));
  view.setAlertsActive(isAlertsActive);
  placeManager.registerOnOpenCallback(new DefaultPlaceRequest(MessageConsoleScreen.ALERTS),
                    () -> view.setAlertsActive(true));
  placeManager.registerOnCloseCallback(new DefaultPlaceRequest(MessageConsoleScreen.ALERTS),
                     () -> view.setAlertsActive(false));
}
origin: org.uberfire/uberfire-message-console-client

@PostConstruct
public void init() {
  view.init(this);
  final boolean isAlertsActive = PlaceStatus.OPEN.equals(placeManager.getStatus(MessageConsoleScreen.ALERTS));
  view.setAlertsActive(isAlertsActive);
  placeManager.registerOnOpenCallback(new DefaultPlaceRequest(MessageConsoleScreen.ALERTS),
                    () -> view.setAlertsActive(true));
  placeManager.registerOnCloseCallback(new DefaultPlaceRequest(MessageConsoleScreen.ALERTS),
                     () -> view.setAlertsActive(false));
}
origin: kiegroup/drools-wb

@Override
protected void internalExecute(ScenarioSimulationContext context) {
  if (PlaceStatus.OPEN.equals(context.getPlaceManager().getStatus(context.getRightPanelRequest()))) {
    context.getPlaceManager().closePlace(context.getRightPanelRequest());
  } else {
    context.getPlaceManager().goTo(context.getRightPanelRequest());
  }
}
org.uberfire.client.mvpPlaceManagergetStatus

Popular methods of PlaceManager

  • goTo
  • closePlace
  • forceClosePlace
  • tryClosePlace
  • closeAllPlaces
  • executeOnCloseCallbacks
  • executeOnOpenCallbacks
  • getActivity
  • registerOnOpenCallback
  • forceCloseAllPlaces
  • getOnOpenCallbacks
  • getUncloseablePlaces
  • getOnOpenCallbacks,
  • getUncloseablePlaces,
  • registerOnCloseCallback,
  • canClosePlace,
  • getActiveSplashScreens,
  • getCurrentPlaceRequest,
  • getOnCloseCallbacks,
  • registerPerspectiveCloseChain

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • setScale (BigDecimal)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now