/** * Returns <code>true</code> if the given user is the owner of this lock, * and this lock belongs to the given project.<p> * * @param user the user to compare to the owner of this lock * @param project the project to compare to the project of this lock * * @return <code>true</code> if the given user is the owner of this lock, * and this lock belongs to the given project */ public boolean isOwnedInProjectBy(CmsUser user, CmsProject project) { return isOwnedBy(user) && isInProject(project); }
/** * Returns <code>true</code> if the given user is the owner of this lock, * and this lock belongs to the given project.<p> * * @param user the user to compare to the owner of this lock * @param project the project to compare to the project of this lock * * @return <code>true</code> if the given user is the owner of this lock, * and this lock belongs to the given project */ public boolean isOwnedInProjectBy(CmsUser user, CmsProject project) { return isOwnedBy(user) && isInProject(project); }
/** * Counts the exclusive locked resources in a project.<p> * * @param project the project * * @return the number of exclusive locked resources in the specified project */ public int countExclusiveLocksInProject(CmsProject project) { int count = 0; Iterator<CmsLock> itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator(); while (itLocks.hasNext()) { CmsLock lock = itLocks.next(); if (lock.getEditionLock().isInProject(project)) { count++; } } return count; }
/** * Counts the exclusive locked resources in a project.<p> * * @param project the project * * @return the number of exclusive locked resources in the specified project */ public int countExclusiveLocksInProject(CmsProject project) { int count = 0; Iterator itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator(); while (itLocks.hasNext()) { CmsLock lock = (CmsLock)itLocks.next(); if (lock.getEditionLock().isInProject(project)) { count++; } } return count; }
if (lock.isInProject(getCms().getRequestContext().getCurrentProject()) || Boolean.valueOf(getParamUsetempfileproject()).booleanValue()) {
|| (lock.isDirectlyInherited() && lock.isOwnedBy(getCms().getRequestContext().currentUser()))) { if (lock.isInProject(getCms().getRequestContext().currentProject()) || Boolean.valueOf(getParamUsetempfileproject()).booleanValue()) {
&& lock.isInProject(cms.getRequestContext().getCurrentProject()) && !lock.isOwnedBy(cms.getRequestContext().getCurrentUser())) {
&& lock.isInProject(cms.getRequestContext().currentProject()) && !lock.isOwnedBy(cms.getRequestContext().currentUser())) {
} else if (!lock.isOwnedBy(dbc.currentUser()) || !lock.isInProject(dbc.currentProject())) { changeLock(dbc, currentFile, CmsLockType.EXCLUSIVE); } else if (!lock.isOwnedBy(dbc.currentUser()) || !lock.isInProject(dbc.currentProject())) { changeLock(dbc, currentFolder, CmsLockType.EXCLUSIVE);
} else if (!lock.isOwnedBy(dbc.currentUser()) || !lock.isInProject(dbc.currentProject())) { changeLock(dbc, currentFile, CmsLockType.EXCLUSIVE); } else if (!lock.isOwnedBy(dbc.currentUser()) || !lock.isInProject(dbc.currentProject())) { changeLock(dbc, currentFolder, CmsLockType.EXCLUSIVE);
getCms().lockResource(originalResourceName); } else if (!lock.isExclusiveOwnedBy(getCms().getRequestContext().currentUser()) || !lock.isInProject(getCms().getRequestContext().currentProject())) { getCms().changeLock(resourceName);