docs: public synchronized void deleteObject(CmsCmisCallContext context, String objectId, boolean allVersions) {
  
          try {
              CmsObject cms = m_repository.getCmsObject(context);
              CmsUUID structureId = new CmsUUID(objectId);
              CmsResource resource = cms.readResource(structureId);
              if (resource.isFolder()) {
                  boolean isLeaf = !hasChildren(cms, resource);
                  if (!isLeaf) {
                      throw new CmisConstraintException("Only leaf resources can be deleted.");
                  }
              }
              ensureLock(cms, resource);
              cms.deleteResource(resource.getRootPath(), CmsResource.DELETE_PRESERVE_SIBLINGS);
          } catch (CmsException e) {
              handleCmsException(e);
          }
      }