/** * Returns <code>true</code> if this is a shared lock.<p> * * @return <code>true</code> if this is a shared lock */ public boolean isShared() { return m_type.isShared(); }
/** * Returns <code>true</code> if this is a shared lock.<p> * * @return <code>true</code> if this is a shared lock */ public boolean isShared() { return m_type.isShared(); }
/** * Returns the lock state of the current resource.<p> * * @return the lock state of the current resource */ public int getLockState() { if (CmsStringUtil.isEmptyOrWhitespaceOnly(getLockedByName())) { // unlocked return 0; } if (!getLockedByName().equals(getCurrentOuRelativeName(m_request.getCurrentUser().getName())) || !getLockedInProjectId().equals(m_request.getCurrentProject().getUuid())) { // locked by other user and/or project return 1; } if (getLock().getType().isShared()) { // shared lock return 2; } // exclusive lock return 3; }
/** * Returns the lock state of the current resource.<p> * * @return the lock state of the current resource */ public int getLockState() { if (CmsStringUtil.isEmptyOrWhitespaceOnly(getLockedByName())) { // unlocked return 0; } if (!getLockedByName().equals(getCurrentOuRelativeName(m_request.currentUser().getName())) || !getLockedInProjectId().equals(m_request.currentProject().getUuid())) { // locked by other user and/or project return 1; } if (getLock().getType().isShared()) { // shared lock return 2; } // exclusive lock return 3; }