code: protected void ensureSubResourcesOfMovedFoldersPublished(CmsObject cms, CmsDbContext dbc, CmsPublishList pubList)
      throws CmsException {
  
          List<CmsResource> topMovedFolders = pubList.getTopMovedFolders(cms);
          Iterator<CmsResource> folderIt = topMovedFolders.iterator();
          while (folderIt.hasNext()) {
              CmsResource folder = folderIt.next();
              addSubResources(dbc, pubList, folder);
          }
          List<CmsResource> missingSubResources = pubList.getMissingSubResources(cms, topMovedFolders);
          if (missingSubResources.isEmpty()) {
              return;
          }
  
          StringBuffer pathBuffer = new StringBuffer();
  
          for (CmsResource missing : missingSubResources) {
              pathBuffer.append(missing.getRootPath());
              pathBuffer.append(" ");
          }
          throw new CmsVfsException(
              Messages.get().container(Messages.RPT_CHILDREN_OF_MOVED_FOLDER_NOT_PUBLISHED_1, pathBuffer.toString()));
  
      }
docs: Tries to add sub-resources of moved folders to the publish list and throws an exception if the publish list still does
  not contain some  sub-resources of the moved folders.<p>
  
  @param cms the current CMS context
  @param dbc the current database context
  @param pubList the publish list
  @throws CmsException if something goes wrong