public LockToken getCurrentToken( LockableResource r ) {
FsResource resource = (FsResource) r;
CurrentLock lock = locksByFile.get( resource.getFile() );
if( lock == null ) return null;
LockToken token = new LockToken();
token.info = new LockInfo( LockInfo.LockScope.EXCLUSIVE, LockInfo.LockType.WRITE, lock.lockedByUser, LockInfo.LockDepth.ZERO );
token.info.lockedByUser = lock.lockedByUser;
token.timeout = lock.token.timeout;
token.tokenId = lock.token.tokenId;
return token;