code: public String resourceOriginalPath(CmsRequestContext context, CmsResource resource) throws CmsException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          String result = null;
          try {
              checkOfflineProject(dbc);
              result = m_driverManager.getVfsDriver(
                  dbc).readResource(dbc, CmsProject.ONLINE_PROJECT_ID, resource.getStructureId(), true).getRootPath();
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(
                      Messages.ERR_TEST_MOVED_RESOURCE_1,
                      dbc.removeSiteRoot(resource.getRootPath())),
                  e);
          } finally {
              dbc.clear();
          }
          return result;
      }
docs: Returns the original path of given resource, that is the online path for the resource.<p>
  
  If it differs from the offline path, the resource has been moved.<p>
  
  @param context the current request context
  @param resource the resource to get the path for
  
  @return the online path
  
  @throws CmsException if something goes wrong
  
  @see org.opencms.workplace.commons.CmsUndoChanges#resourceOriginalPath(CmsObject, String)