コード例 #1
0
  @Override
  public void deleteProjectGitRepository(String projectIdentifier, ScmRepository repository)
      throws NoSuchEntityException {
    setTenancyContext(projectIdentifier);
    ScmService scmService = scmServiceProvider.getService(projectIdentifier);

    try {
      scmService.deleteScmRepository(repository);
    } catch (EntityNotFoundException enfe) {
      handle(enfe);
      throw new IllegalStateException();
    }
  }
コード例 #2
0
  @Override
  public void createProjectGitRepository(String projectIdentifier, ScmRepository scmRepository)
      throws NoSuchEntityException, ValidationFailedException {
    setTenancyContext(projectIdentifier);
    ScmService scmService = scmServiceProvider.getService(projectIdentifier);

    try {
      scmService.createScmRepository(scmRepository);
    } catch (EntityNotFoundException e) {
      handle(e);
      throw new IllegalStateException();
    } catch (ValidationException e) {
      handle(e);
      throw new IllegalStateException();
    }
  }