code: public void deleteProject(CmsDbContext dbc, CmsProject deleteProject, boolean resetResources) throws CmsException {
  
          CmsUUID projectId = deleteProject.getUuid();
  
          if (resetResources) {
              // changed/new/deleted files in the specified project
              List<CmsResource> modifiedFiles = readChangedResourcesInsideProject(dbc, projectId, RCPRM_FILES_ONLY_MODE);
              // changed/new/deleted folders in the specified project
              List<CmsResource> modifiedFolders = readChangedResourcesInsideProject(
                  dbc,
                  projectId,
                  RCPRM_FOLDERS_ONLY_MODE);
              resetResourcesInProject(dbc, projectId, modifiedFiles, modifiedFolders);
          }
  
          // unlock all resources in the project
          m_lockManager.removeResourcesInProject(deleteProject.getUuid(), true);
          m_monitor.clearAccessControlListCache();
          m_monitor.clearResourceCache();
  
          // set project to online project if current project is the one which will be deleted
          if (projectId.equals(dbc.currentProject().getUuid())) {
              dbc.getRequestContext().setCurrentProject(readProject(dbc, CmsProject.ONLINE_PROJECT_ID));
          }
  
          // delete the project itself
          getProjectDriver(dbc).deleteProject(dbc, deleteProject);
          m_monitor.uncacheProject(deleteProject);
  
          // fire the corresponding event
          OpenCms.fireCmsEvent(
              new CmsEvent(
                  I_CmsEventListener.EVENT_PROJECT_MODIFIED,
                  Collections.<String, Object> singletonMap("project", deleteProject)));
  
      }
docs: Deletes a project.<p>
  
  Only the admin or the owner of the project can do this.
  
  @param dbc the current database context
  @param deleteProject the project to be deleted
  @param resetResources if true, the resources of the project to delete will be reset to their online state, or deleted if they have no online state
  
  @throws CmsException if something goes wrong