code: private List getResourcesLockedByOtherUser(List resourceList) throws CmsException {
  
          List lockedResourcesByOtherUser = new ArrayList();
          Iterator i = resourceList.iterator();
          while (i.hasNext()) {
              CmsResource resource = (CmsResource)i.next();
              // get the lock state for the resource
              CmsLock lock = getCms().getLock(resource);
              // add this resource to the list if this is locked by another user
              if (!lock.isUnlocked() && !lock.isOwnedBy(getCms().getRequestContext().getCurrentUser())) {
                  lockedResourcesByOtherUser.add(resource);
              }
          }
  
          return lockedResourcesByOtherUser;
      }
docs: Returns a list of resources that are locked by another user as the current user.<p>
  
  @param resourceList the list of all (mixed) resources
  
  @return a list of resources that are locked by another user as the current user
  @throws CmsException if the getLock operation fails