code: public Repository create(Repository newRepository) throws GreenPepperServerException
      {
          Project project = projectDao.getByName(newRepository.getProject().getName());
          if(project == null)
              throw new GreenPepperServerException(GreenPepperServerErrorKey.PROJECT_NOT_FOUND, "project not found");
  
          RepositoryType type = getTypeByName(newRepository.getType().getName());
          if(type == null)
              throw new GreenPepperServerException(GreenPepperServerErrorKey.REPOSITORY_TYPE_NOT_FOUND, "Type not found");
  
          newRepository.setType(type);
          project.addRepository(newRepository);
          sessionService.getSession().update(project);
  
          return newRepository;
      }
docs: {@inheritDoc}