/** * Check to see if a resource is currently write locked.<p> * * @param path the path where to find the resource to check the lock * * @return true if the resource is locked otherwise false */ private boolean isLocked(String path) { // get lock for path CmsRepositoryLockInfo lock = m_session.getLock(path); if (lock == null) { return false; } // check if found lock fits to the lock token from request // String currentToken = "<opaquelocktoken:" + generateLockToken(req, lock) + ">"; // if (currentToken.equals(parseLockTokenHeader(req))) { // return false; // } if (lock.getUsername().equals(m_username)) { return false; } return true; }
/** * Check to see if a resource is currently write locked.<p> * * @param path the path where to find the resource to check the lock * * @return true if the resource is locked otherwise false */ private boolean isLocked(String path) { // get lock for path CmsRepositoryLockInfo lock = m_session.getLock(path); if (lock == null) { return false; } // check if found lock fits to the lock token from request // String currentToken = "<opaquelocktoken:" + generateLockToken(req, lock) + ">"; // if (currentToken.equals(parseLockTokenHeader(req))) { // return false; // } if (lock.getUsername().equals(m_username)) { return false; } return true; }
/** * Print the lock discovery information associated with a path.<p> * * @param path the path to the resource * @param elem the dom element where to add the lock discovery elements * @param req the servlet request we are processing * * @return true if at least one lock was displayed */ private boolean generateLockDiscovery(String path, Element elem, HttpServletRequest req) { CmsRepositoryLockInfo lock = m_session.getLock(path); if (lock != null) { Element lockElem = addElement(elem, TAG_LOCKDISCOVERY); addLockElement(lock, lockElem, generateLockToken(req, lock)); return true; } return false; }
/** * Print the lock discovery information associated with a path.<p> * * @param path the path to the resource * @param elem the dom element where to add the lock discovery elements * @param req the servlet request we are processing * * @return true if at least one lock was displayed */ private boolean generateLockDiscovery(String path, Element elem, HttpServletRequest req) { CmsRepositoryLockInfo lock = m_session.getLock(path); if (lock != null) { Element lockElem = addElement(elem, TAG_LOCKDISCOVERY); addLockElement(lock, lockElem, generateLockToken(req, lock)); return true; } return false; }
CmsRepositoryLockInfo currentLock = m_session.getLock(path); if (currentLock == null) { lockRequestType = LOCK_CREATION;
CmsRepositoryLockInfo currentLock = m_session.getLock(path); if (currentLock == null) { lockRequestType = LOCK_CREATION;