code: public boolean hasSystemLocks(CmsDbContext dbc, CmsResource resource) throws CmsException {
  
          if (resource == null) {
              return false;
          }
          Iterator<CmsLock> itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator();
          while (itLocks.hasNext()) {
              CmsLock lock = itLocks.next();
              if (lock.getSystemLock().isUnlocked()) {
                  // only system locks matter here
                  continue;
              }
              if (lock.getResourceName().startsWith(resource.getRootPath())) {
                  if (lock.getResourceName().startsWith(resource.getRootPath())) {
                      return true;
                  }
                  try {
                      resource = m_driverManager.readResource(dbc, lock.getResourceName(), CmsResourceFilter.ALL);
                  } catch (CmsVfsResourceNotFoundException e) {
                      OpenCms.getMemoryMonitor().uncacheLock(lock.getResourceName());
                      continue;
                  }
                  CmsResource lockedResource;
                  try {
                      lockedResource = m_driverManager.readResource(dbc, lock.getResourceName(), CmsResourceFilter.ALL);
                  } catch (CmsVfsResourceNotFoundException e) {
                      OpenCms.getMemoryMonitor().uncacheLock(lock.getResourceName());
                      continue;
                  }
                  if (lockedResource.getSiblingCount() > 1) {
                      Iterator<CmsResource> itSiblings = internalReadSiblings(dbc, lockedResource).iterator();
                      while (itSiblings.hasNext()) {
                          CmsResource sibling = itSiblings.next();
                          CmsLock siblingLock = internalSiblingLock(lock, sibling.getRootPath());
                          if (siblingLock.getResourceName().startsWith(resource.getRootPath())) {
                              return true;
                          }
                      }
                  }
              }
          }
          return false;
      }
docs: Returns <code>true</code> if the given resource contains a resource that has a system lock.<p>
  
  This check is required for certain operations on folders.<p>
  
  @param dbc the database context
  @param resource the resource to check the system locks for
  
  @return <code>true</code> if the given resource contains a resource that has a system lock
  
  @throws CmsException if something goes wrong