// Rux INA-221: create a new method for the 2 separated links
  public String navigateToOverallWorkspace() {
    if (!initialized) {
      initialize();
    }
    String returnView = DOCUMENT_VIEW;

    // force return to Documents tab
    webActions.setCurrentTabIds(DOCUMENT_MANAGEMENT_TAB);

    if (lastAccessedDocument != null) {
      navigationContext.setCurrentDocument(lastAccessedDocument);
    } else if (navigationContext.getCurrentDomain() != null) {
      navigationContext.setCurrentDocument(navigationContext.getCurrentDomain());
    } else if (documentManager.hasPermission(
        documentManager.getRootDocument().getRef(), SecurityConstants.READ_CHILDREN)) {
      navigationContext.setCurrentDocument(documentManager.getRootDocument());
    } else {
      navigationContext.setCurrentDocument(null);
      returnView = dashboardNavigationHelper.navigateToDashboard();
    }
    showingPersonalWorkspace = false;

    Events.instance().raiseEvent(EventNames.GO_HOME);

    return returnView;
  }
  public String navigateToCurrentUserPersonalWorkspace() {
    if (!initialized) {
      initialize();
    }
    String returnView = DOCUMENT_VIEW;

    // force return to Documents tab
    webActions.setCurrentTabId(WebActions.MAIN_TABS_CATEGORY, DOCUMENT_MANAGEMENT_ACTION);

    // Rux INA-221: separated links for going to workspaces
    DocumentModel currentUserPersonalWorkspace = getCurrentUserPersonalWorkspace();
    DocumentModel currentDocument = navigationContext.getCurrentDocument();
    if (!isShowingPersonalWorkspace()
        && currentDocument != null
        && currentDocument.getPath().segment(0) != null) {
      lastAccessedDocument =
          mainTabsActions.getDocumentFor(
              DOCUMENT_MANAGEMENT_ACTION, navigationContext.getCurrentDocument());
    }
    navigationContext.setCurrentDocument(currentUserPersonalWorkspace);
    showingPersonalWorkspace = true;

    Events.instance().raiseEvent(EventNames.GO_PERSONAL_WORKSPACE);

    return returnView;
  }
 public boolean isOnMainTab(String mainTabId) {
   if (mainTabId != null
       && mainTabId.equals(webActions.getCurrentTabId(WebActions.MAIN_TABS_CATEGORY))) {
     return true;
   }
   return false;
 }
 @Observer({NAVIGATE_TO_DOCUMENT})
 public void updateContextualDocument() {
   if (!shouldHandleRequest()) {
     return;
   }
   String currentMainTab = getCurrentMainTabFromRequest();
   if (currentMainTab == null) {
     currentMainTab = webActions.getCurrentTabId(WebActions.MAIN_TABS_CATEGORY);
   }
   DocumentModel currentDocument = navigationContext.getCurrentDocument();
   documentsByMainTabs.put(currentMainTab, currentDocument);
 }