docs: public void deleteResource(
          CmsRequestContext context,
          CmsResource resource,
          CmsResource.CmsResourceDeleteMode siblingMode)
      throws CmsException, CmsSecurityException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(context);
          final CmsUUID forbiddenFolderId = OpenCms.getPublishManager().getPublishListVerifier().addForbiddenParentFolder(
              resource.getRootPath(),
              Messages.get().getBundle(locale).key(Messages.ERR_FORBIDDEN_PARENT_CURRENTLY_DELETING_0));
          try {
              checkOfflineProject(dbc);
              checkPermissions(dbc, resource, CmsPermissionSet.ACCESS_WRITE, true, CmsResourceFilter.ALL);
              checkSystemLocks(dbc, resource);
  
              // check write permissions for subresources in case of deleting a folder
              if (resource.isFolder()) {
                  dbc.getRequestContext().setAttribute(I_CmsVfsDriver.REQ_ATTR_CHECK_PERMISSIONS, Boolean.TRUE);
                  try {
                      m_driverManager.getVfsDriver(dbc).removeFolder(dbc, dbc.currentProject(), resource);
                  } catch (CmsDataAccessException e) {
                      // unwrap the permission violation exception
                      if (e.getCause() instanceof CmsPermissionViolationException) {
                          throw (CmsPermissionViolationException)e.getCause();
                      } else {
                          throw e;
                      }
                  }
                  dbc.getRequestContext().removeAttribute(I_CmsVfsDriver.REQ_ATTR_CHECK_PERMISSIONS);
              }
  
              deleteResource(dbc, resource, siblingMode);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(Messages.ERR_DELETE_RESOURCE_1, context.getSitePath(resource)),
                  e);
          } finally {
              OpenCms.getPublishManager().getPublishListVerifier().removeForbiddenParentFolder(forbiddenFolderId);
              dbc.clear();
          }
      }