docs: private void addLockedRelatedResources(String resName, CmsLockFilter filter, Set<String> lockedResources) {
  
          try {
              // get and iterate over all related resources
              Iterator<CmsRelation> itRelations = getCms().getRelationsForResource(
                  resName,
                  CmsRelationFilter.TARGETS.filterStrong().filterIncludeChildren()).iterator();
              while (itRelations.hasNext()) {
                  CmsRelation relation = itRelations.next();
                  CmsResource target = null;
                  try {
                      target = relation.getTarget(getCms(), CmsResourceFilter.ALL);
                  } catch (CmsException e) {
                      // error reading a resource, should usually never happen
                      if (LOG.isDebugEnabled()) {
                          LOG.debug(e.getLocalizedMessage(getLocale()), e);
                      }
                      continue;
                  }
                  // we are interested just in unpublished resources
                  if (target.getState().isUnchanged()) {
                      continue;
                  }
                  String targetName = getCms().getSitePath(target);
                  // if already selected
                  if (lockedResources.contains(targetName) || lockedResources.contains(targetName + "*")) {
                      continue;
                  }
                  if (m_lockedResources != null) {
                      if (m_lockedResources.contains(targetName) || m_lockedResources.contains(targetName + "*")) {
                          continue;
                      }
                  }
                  try {
                      org.opencms.lock.CmsLock lock = getCms().getLock(targetName);
                      if (!lock.isUnlocked() && filter.match("/", lock)) {
                          // just add resources that may come in question
                          lockedResources.add(targetName + "*");
                      }
                  } catch (CmsException e) {
                      // error reading a lock, should usually never happen
                      if (LOG.isErrorEnabled()) {
                          LOG.error(e.getLocalizedMessage(getLocale()), e);
                      }
                      continue;
                  }
              }
          } catch (CmsException e) {
              // error reading the relations, should usually never happen
              if (LOG.isErrorEnabled()) {
                  LOG.error(e.getLocalizedMessage(getLocale()), e);
              }
          }
      }