@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(); } }
@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(); } }