docs: private void handleOU(CmsResource siteRootResource) {
  
          String ouName = null;
          String ouDescription = "OU for: %(site)";
  
          if (m_createOU) {
              getReport().println(
                  Messages.get().container(Messages.RPT_SITE_CREATE_OU_1, m_parentOU + siteRootResource.getName()),
                  I_CmsReport.FORMAT_DEFAULT);
              try {
                  OpenCms.getOrgUnitManager().createOrganizationalUnit(
                      m_cms,
                      m_parentOU + siteRootResource.getName(),
                      ouDescription.replace("%(site)", m_site.getTitle() + " [" + siteRootResource.getRootPath() + "]"),
                      0,
                      siteRootResource.getRootPath());
                  ouName = m_parentOU + siteRootResource.getName();
              } catch (CmsDataAccessException e) {
                  LOG.info("Can't create OU, an OU with same name exists. The existing OU is chosen for the new site");
                  try {
                      OpenCms.getOrgUnitManager().addResourceToOrgUnit(
                          m_cms,
                          m_parentOU + siteRootResource.getName(),
                          siteRootResource.getRootPath());
                      ouName = m_parentOU + siteRootResource.getName();
                  } catch (CmsException e2) {
                      LOG.info("Resource is already added to OU");
                      ouName = m_parentOU + siteRootResource.getName();
                  }
              } catch (CmsException e) {
                  LOG.error("Error on creating new OU", e);
              }
          }
  
          if ((m_oldSite == null) & (m_selectedOU != null) & !m_selectedOU.equals("/")) {
              getReport().println(
                  Messages.get().container(Messages.RPT_SITE_ADD_OU_1, m_selectedOU),
                  I_CmsReport.FORMAT_DEFAULT);
              try {
                  OpenCms.getOrgUnitManager().addResourceToOrgUnit(m_cms, m_selectedOU, siteRootResource.getRootPath());
                  ouName = m_selectedOU.substring(0, (m_selectedOU).length() - 1);
              } catch (CmsException e) {
                  LOG.error("Error on adding resource to OU", e);
              }
          }
  
          try {
              m_cms.lockResource(siteRootResource);
          } catch (CmsException e) {
              LOG.error("unable to lock resource", e);
          }
  
          if (ouName != null) {
              try {
  
                  m_cms.chacc(
                      siteRootResource.getRootPath(),
                      I_CmsPrincipal.PRINCIPAL_GROUP,
                      ouName + "/Users",
                      "+r+w+v+c+i+o+d");
              } catch (CmsException e) {
                  LOG.error("Error on setting permission for OU.", e);
              }
          }
          try {
              m_cms.unlockResource(siteRootResource);
          } catch (CmsException e) {
              LOG.error("unable to unlock resource");
          }
      }