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;
    }
private List getResourcesLockedByOtherUser ( List resourceList ) throws CmsException { List lockedResourcesByOtherUser = new ArrayList ( ) ; Iterator i = resourceList . iterator ( ) ; while ( i . hasNext ( ) ) { CmsResource resource = ( CmsResource ) i . next ( ) ; CmsLock lock = getCms ( ) . getLock ( resource ) ; if ( ! lock . isUnlocked ( ) && ! lock . isOwnedBy ( getCms ( ) . getRequestContext ( ) . getCurrentUser ( ) ) ) { lockedResourcesByOtherUser . add ( resource ) ; } } return lockedResourcesByOtherUser ; }
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