code: public boolean hasCorrectLockstate() {
  
          org.opencms.lock.CmsLock lock = null;
          try {
              // get the lock state for the current resource
              lock = getCms().getLock(getParamResource());
          } catch (CmsException e) {
              // error getting lock state, log the error and return false
              LOG.error(e.getLocalizedMessage(getLocale()), e);
              return false;
          }
          // check if auto lock feature is enabled
          boolean autoLockFeature = lock.isNullLock() && OpenCms.getWorkplaceManager().autoLockResources();
          return autoLockFeature || lock.isExclusive() || lock.isInherited();
      }
docs: Checks if the current resource has lock state exclusive or inherited.<p>
  
  This is used to determine whether the dialog shows the option to delete all
  siblings of the resource or not.
  
  @return true if lock state is exclusive or inherited, otherwise false