code: public boolean match(String rootPath, CmsLock lock) {
  
          boolean match = false;
          if (m_includeChildren) {
              // safe since rootPath always ends with slash if a folder
              match = lock.getResourceName().startsWith(rootPath);
          }
          if (!match && m_includeParents) {
              // since parents can only be folders, check it only for folders
              if (lock.getResourceName().endsWith("/")) {
                  match = rootPath.startsWith(lock.getResourceName());
              }
          }
          if (match && (m_projectId != null) && !m_projectId.isNullUUID() && (lock.getProjectId() != null)) {
              match = lock.getProjectId().equals(m_projectId);
          }
          if (match && (m_ownedByUserId != null) && !m_ownedByUserId.isNullUUID()) {
              match = lock.getUserId().equals(m_ownedByUserId);
          }
          if (match && (m_notOwnedByUserId != null) && !m_notOwnedByUserId.isNullUUID()) {
              match = !lock.getUserId().equals(m_notOwnedByUserId);
          }
          if (match && (m_lockableByUser != null)) {
              match = lock.isLockableBy(m_lockableByUser);
          }
          if (match && (m_notLockableByUser != null)) {
              match = !lock.isLockableBy(m_notLockableByUser);
          }
          if (match && !m_types.isEmpty()) {
              match = m_types.contains(lock.getType());
              match = match || (m_includeParents && lock.isInherited());
          }
          // check the related lock if available
          if (!match && !lock.getRelatedLock().isNullLock()) {
              match = match(rootPath, lock.getRelatedLock());
          }
          return match;
      }
docs: Matches the given lock against this filter and the given path.<p>
  
  @param rootPath the path to match the lock against
  @param lock the lock to match
  
  @return <code>true</code> if the given lock matches