docs: public static Map<String, List<String>> buildDepsForAllModules(String rfsAbsPath, boolean mode)
      throws CmsConfigurationException {
  
          Map<String, List<String>> ret = new HashMap<String, List<String>>();
          List<CmsModule> modules;
          if (rfsAbsPath == null) {
              modules = OpenCms.getModuleManager().getAllInstalledModules();
          } else {
              modules = new ArrayList<CmsModule>(getAllModulesFromPath(rfsAbsPath).keySet());
          }
          Iterator<CmsModule> itMods = modules.iterator();
          while (itMods.hasNext()) {
              CmsModule module = itMods.next();
  
              // if module a depends on module b, and module c depends also on module b:
              // build a map with a list containing "a" and "c" keyed by "b" to get a
              // list of modules depending on module "b"...
              Iterator<CmsModuleDependency> itDeps = module.getDependencies().iterator();
              while (itDeps.hasNext()) {
                  CmsModuleDependency dependency = itDeps.next();
                  // module dependency package name
                  String moduleDependencyName = dependency.getName();
  
                  if (mode) {
                      // get the list of dependent modules
                      List<String> moduleDependencies = ret.get(moduleDependencyName);
                      if (moduleDependencies == null) {
                          // build a new list if "b" has no dependent modules yet
                          moduleDependencies = new ArrayList<String>();
                          ret.put(moduleDependencyName, moduleDependencies);
                      }
                      // add "a" as a module depending on "b"
                      moduleDependencies.add(module.getName());
                  } else {
                      List<String> moduleDependencies = ret.get(module.getName());
                      if (moduleDependencies == null) {
                          moduleDependencies = new ArrayList<String>();
                          ret.put(module.getName(), moduleDependencies);
                      }
                      moduleDependencies.add(dependency.getName());
                  }
              }
          }
          itMods = modules.iterator();
          while (itMods.hasNext()) {
              CmsModule module = itMods.next();
              if (ret.get(module.getName()) == null) {
                  ret.put(module.getName(), new ArrayList<String>());
              }
          }
          return ret;
      }