code: public void checkModuleSelectionList(List<String> moduleNames, String rfsAbsPath, boolean forDeletion)
      throws CmsIllegalArgumentException, CmsConfigurationException {
  
          Map<String, List<String>> moduleDependencies = buildDepsForAllModules(rfsAbsPath, forDeletion);
          Iterator<String> itMods = moduleNames.iterator();
          while (itMods.hasNext()) {
              String moduleName = itMods.next();
              List<String> dependencies = moduleDependencies.get(moduleName);
              if (dependencies != null) {
                  List<String> depModules = new ArrayList<String>(dependencies);
                  depModules.removeAll(moduleNames);
                  if (!depModules.isEmpty()) {
                      throw new CmsIllegalArgumentException(
                          Messages.get().container(
                              Messages.ERR_MODULE_SELECTION_INCONSISTENT_2,
                              moduleName,
                              depModules.toString()));
                  }
              }
          }
      }
docs: Checks the module selection list for consistency, that means
  that if a module is selected, all its dependencies are also selected.<p>
  
  The module dependencies are get from the installed modules or
  from the module manifest.xml files found in the given FRS path.<p>
  
  @param moduleNames a list of module names
  @param rfsAbsPath a RFS absolute path to search for modules, or <code>null</code> to use the installed modules
  @param forDeletion there are two modes, one for installation of modules, and one for deletion.
  
  @throws CmsIllegalArgumentException if the module list is not consistent
  @throws CmsConfigurationException if something goes wrong