code: public List<I_CmsHistoryResource> readAllAvailableVersions(CmsDbContext dbc, CmsResource resource)
      throws CmsException {
  
          // read the historical resources
          List<I_CmsHistoryResource> versions = getHistoryDriver(dbc).readAllAvailableVersions(
              dbc,
              resource.getStructureId());
          if ((versions.size() > OpenCms.getSystemInfo().getHistoryVersions())
              && (OpenCms.getSystemInfo().getHistoryVersions() > -1)) {
              return versions.subList(0, OpenCms.getSystemInfo().getHistoryVersions());
          }
          return versions;
      }
docs: Reads all versions of the given resource.<br>
  
  This method returns a list with the history of the given resource, i.e.
  the historical resource entries, independent of the project they were attached to.<br>
  
  The reading excludes the file content.<p>
  
  @param dbc the current database context
  @param resource the resource to read the history for
  
  @return a list of file headers, as <code>{@link I_CmsHistoryResource}</code> objects
  
  @throws CmsException if something goes wrong