code: 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;
      }
docs: Returns the lock state of the current resource.<p>
  
  @return the lock state of the current resource