public LockInfo getLockInfo() throws ClientException { String existingLock = session.getLock(targetDoc.getRef()); if (existingLock == null || existingLock.equals("")) { return null; } String[] info = existingLock.split(":"); LockInfo lockInfo; try { lockInfo = new LockInfo(info[0], info[1]); lockInfo.setToken(existingLock); } catch (ParseException e) { throw new ClientException( "Unable to parse lockInfo for document " + targetDoc.getPathAsString(), e); } return lockInfo; }