code: public void deleteRelationsForResource(CmsDbContext dbc, CmsResource resource, CmsRelationFilter filter)
      throws CmsException {
  
          if (filter.includesDefinedInContent()) {
              throw new CmsIllegalArgumentException(
                  Messages.get().container(
                      Messages.ERR_DELETE_RELATION_IN_CONTENT_2,
                      dbc.removeSiteRoot(resource.getRootPath()),
                      filter.getTypes()));
          }
          getVfsDriver(dbc).deleteRelations(dbc, dbc.currentProject().getUuid(), resource, filter);
          setDateLastModified(dbc, resource, System.currentTimeMillis());
          log(
              dbc,
              new CmsLogEntry(
                  dbc,
                  resource.getStructureId(),
                  CmsLogEntryType.RESOURCE_REMOVE_RELATION,
                  new String[] {resource.getRootPath(), filter.toString()}),
              false);
      }
docs: Deletes all relations for the given resource matching the given filter.<p>
  
  @param dbc the current db context
  @param resource the resource to delete the relations for
  @param filter the filter to use for deletion
  
  @throws CmsException if something goes wrong
  
  @see CmsSecurityManager#deleteRelationsForResource(CmsRequestContext, CmsResource, CmsRelationFilter)