Class ProjectService

java.lang.Object
dev.dokimos.server.service.ProjectService

@Service public class ProjectService extends Object
  • Constructor Details

  • Method Details

    • getOrCreateProject

      @Transactional @NonNull public Project getOrCreateProject(String name, TenantScope scope)
      Resolves the project by name within the scope, creating it stamped with the scope's tenant when it does not exist. The lookup is scoped so two tenants can each own a project of the same name; a new row is stamped from the scope so it lands in the caller's tenant.
      Parameters:
      name - the project name
      scope - the tenant scope of the caller
      Returns:
      the existing or newly created project
    • listProjects

      @Transactional(readOnly=true) public List<ProjectSummary> listProjects(TenantScope scope)
    • getProject

      @Transactional(readOnly=true) @NonNull public Project getProject(String name, TenantScope scope)
    • deleteProject

      @Transactional public void deleteProject(String name, TenantScope scope)
      Deletes a project visible under the scope; FKs cascade to its experiments, runs, items, and evals.