public void updateRepositoryRegistration(Repository repository) throws GreenPepperServerException {
        try {
            sessionService.startSession();
            sessionService.beginTransaction();

            Project project = projectDao.getByName(repository.getProject().getName());

            if (project == null) {
                projectDao.create(repository.getProject().getName());
            }

            repositoryDao.update(repository);

            sessionService.commitTransaction();
            log.debug("Updated Repository: " + repository.getName());
        } catch (Exception ex) {
            sessionService.rollbackTransaction();
            throw handleException(REPOSITORY_UPDATE_FAILED, ex);
        } finally {
            sessionService.closeSession();
        }
    }
public void updateRepositoryRegistration ( Repository repository ) throws GreenPepperServerException { try { sessionService . startSession ( ) ; sessionService . beginTransaction ( ) ; Project project = projectDao . getByName ( repository . getProject ( ) . getName ( ) ) ; if ( project == null ) { projectDao . create ( repository . getProject ( ) . getName ( ) ) ; } repositoryDao . update ( repository ) ; sessionService . commitTransaction ( ) ; log . debug ( "Updated Repository: " + repository . getName ( ) ) ; } catch ( Exception ex ) { sessionService . rollbackTransaction ( ) ; throw handleException ( REPOSITORY_UPDATE_FAILED , ex ) ; } finally { sessionService . closeSession ( ) ; } }
{@inheritDoc}