private CmsLock getParentFolderLock(String resourceName) {

        Iterator<CmsLock> itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator();
        while (itLocks.hasNext()) {
            CmsLock lock = itLocks.next();
            if (lock.getResourceName().endsWith("/")
                && resourceName.startsWith(lock.getResourceName())
                && !resourceName.equals(lock.getResourceName())) {
                // system locks does not get inherited
                lock = lock.getEditionLock();
                // check the lock
                if (!lock.isUnlocked()) {
                    return lock;
                }
            }
        }
        return CmsLock.getNullLock();
    }
private CmsLock getParentFolderLock ( String resourceName ) { Iterator < CmsLock > itLocks = OpenCms . getMemoryMonitor ( ) . getAllCachedLocks ( ) . iterator ( ) ; while ( itLocks . hasNext ( ) ) { CmsLock lock = itLocks . next ( ) ; if ( lock . getResourceName ( ) . endsWith ( "/" ) && resourceName . startsWith ( lock . getResourceName ( ) ) && ! resourceName . equals ( lock . getResourceName ( ) ) ) { lock = lock . getEditionLock ( ) ; if ( ! lock . isUnlocked ( ) ) { return lock ; } } } return CmsLock . getNullLock ( ) ; }
Returns the lock of a possible locked parent folder of a resource, system locks are ignored.<p>

@param resourceName the name of the resource

@return the lock of a parent folder, or {@link CmsLock#getNullLock()} if no parent folders are locked by a non system lock