docs: public void associateOrgUnitResources() {
  
          if ((m_orgUnitResources == null) || m_orgUnitResources.isEmpty()) {
              // no organizational resources to associate
              return;
          }
  
          String site = getCms().getRequestContext().getSiteRoot();
          try {
              getCms().getRequestContext().setSiteRoot("");
              List<String> orgUnits = new ArrayList<String>(m_orgUnitResources.keySet());
              Collections.sort(orgUnits);
              Iterator<String> it = orgUnits.iterator();
              while (it.hasNext()) {
                  String orgUnitName = it.next();
                  List<String> resources = m_orgUnitResources.get(orgUnitName);
  
                  if (orgUnitName.equals("")) {
                      continue;
                  }
  
                  Iterator<String> itResources = resources.iterator();
                  while (itResources.hasNext()) {
                      String resourceName = itResources.next();
                      try {
                          // Add the resource to the organizational unit
                          OpenCms.getOrgUnitManager().addResourceToOrgUnit(getCms(), orgUnitName, resourceName);
                      } catch (CmsException e) {
                          getReport().addWarning(e);
                          if (LOG.isWarnEnabled()) {
                              LOG.warn(e.getLocalizedMessage());
                          }
                          if (LOG.isDebugEnabled()) {
                              LOG.debug(e.getLocalizedMessage(), e);
                          }
                      }
                  }
  
                  // remove the meanwhile used first resource of the parent organizational unit
                  try {
                      String resName = (OpenCms.getOrgUnitManager().getResourcesForOrganizationalUnit(
                          getCms(),
                          CmsOrganizationalUnit.getParentFqn(orgUnitName)).get(0)).getRootPath();
                      if (!resources.contains(resName)) {
                          OpenCms.getOrgUnitManager().removeResourceFromOrgUnit(getCms(), orgUnitName, resName);
                      }
                  } catch (CmsException e) {
                      getReport().addWarning(e);
                      if (LOG.isWarnEnabled()) {
                          LOG.warn(e.getLocalizedMessage());
                      }
                      if (LOG.isDebugEnabled()) {
                          LOG.debug(e.getLocalizedMessage(), e);
                      }
                  }
  
              }
          } finally {
              getCms().getRequestContext().setSiteRoot(site);
          }
  
          m_orgUnitResources = null;
      }