*/
private XMLValue computeLockDiscovery(NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath, String servletPath) throws ServiceAccessException, LinkedObjectNotFoundException, ObjectNotFoundException, LockTokenNotFoundException {
XMLValue xmlValue = new XMLValue();
Lock lock = nsaToken.getLockHelper();
NodeLock objectLockToken = null;
Enumeration lockTokens = lock.enumerateLocks(readonlySlideToken(), revisionDescriptors.getUri(), true);
Set addedLockIDs = new HashSet();
while (lockTokens.hasMoreElements()) {
objectLockToken = (NodeLock) lockTokens.nextElement();
if (revisionDescriptors.getUri().equals(objectLockToken.getObjectUri()) ||
objectLockToken.isInheritable()
) {
if (!addedLockIDs.contains(objectLockToken.getLockId())) {
Element activelock = createActiveLockElement(objectLockToken,servletPath, contextPath);
if (activelock != null) {
xmlValue.add(activelock);
addedLockIDs.add(objectLockToken.getLockId());
}
}
}
}