code: private CmsProject createTempProject(CmsObject adminCms, List<CmsResource> resources, Date date)
      throws CmsException {
  
          CmsProject tmpProject;
  
          String rootPath = resources.get(0).getRootPath();
          if (resources.size() > 1) {
              rootPath = CmsResource.getParentFolder(rootPath);
          }
          String projectName = computeProjectName(rootPath, date);
  
          try {
              // create the project
              tmpProject = adminCms.createProject(
                  projectName,
                  "",
                  CmsRole.WORKPLACE_USER.getGroupName(),
                  CmsRole.PROJECT_MANAGER.getGroupName(),
                  CmsProject.PROJECT_TYPE_TEMPORARY);
          } catch (CmsException e) {
              String resName = CmsResource.getName(rootPath);
              if (resName.length() > 64) {
                  resName = resName.substring(0, 64) + "...";
              }
              // use UUID to make sure the project name is still unique
              projectName = computeProjectName(resName, date) + " [" + new CmsUUID() + "]";
              // create the project
              tmpProject = adminCms.createProject(
                  projectName,
                  "",
                  CmsRole.WORKPLACE_USER.getGroupName(),
                  CmsRole.PROJECT_MANAGER.getGroupName(),
                  CmsProject.PROJECT_TYPE_TEMPORARY);
          }
          // make the project invisible for all users
          tmpProject.setHidden(true);
          // write the project to the database
          adminCms.writeProject(tmpProject);
          return tmpProject;
      }
docs: Creates the temporary project.<p>
  
  @param adminCms the admin cms context
  @param resources the resources
  @param date the publish date
  
  @return the project
  
  @throws CmsException in case writing the project fails