code: protected String getLockErrorMessage(CmsLockInfo lockInfo) {
  
          switch (lockInfo.getState()) {
              case changed:
                  return Messages.get().key(Messages.ERR_LOCK_RESOURCE_CHANGED_BY_1, lockInfo.getUser());
              case locked:
                  return Messages.get().key(Messages.ERR_LOCK_RESOURCE_LOCKED_BY_1, lockInfo.getUser());
              case other:
                  return lockInfo.getErrorMessage();
              case success:
              default:
                  return "";
          }
      }
docs: Helper method for getting the error message for a locking error.<p>
  
  @param lockInfo the lock information
  @return the error message