docs: public Repository registerRepository(Repository repository) throws GreenPepperServerException {
          try {
              sessionService.startSession();
              sessionService.beginTransaction();
  
              Project project = projectDao.getByName(repository.getProject().getName());
  
              if (project == null) {
                  projectDao.create(repository.getProject().getName());
              }
  
              repository = repositoryDao.create(repository);
  
              sessionService.commitTransaction();
  
              log.debug("Registered Repository: " + repository.getUid());
  
              return repository;
          } catch (Exception ex) {
              sessionService.rollbackTransaction();
              throw handleException(REPOSITORY_REGISTRATION_FAILED, ex);
          } finally {
              sessionService.closeSession();
          }
      }