Package org.apache.continuum.model.repository

Examples of org.apache.continuum.model.repository.LocalRepository


                {
                    context.put( ContinuumBuildConstant.KEY_LATEST_UPDATE_DATE,
                                 new Date( buildResult.getStartTime() ) );
                }

                LocalRepository localRepo = project.getProjectGroup().getLocalRepository();

                if ( localRepo != null )
                {
                    context.put( ContinuumBuildConstant.KEY_LOCAL_REPOSITORY, localRepo.getLocation() );
                }
                else
                {
                    context.put( ContinuumBuildConstant.KEY_LOCAL_REPOSITORY, "" );
                }
View Full Code Here


        throws Exception
    {
        Continuum continuum = getContinuum();
        RepositoryService service = (RepositoryService) lookup( RepositoryService.ROLE );

        LocalRepository repository = new LocalRepository();
        repository.setName( "defaultRepo" );
        repository.setLocation( getTestFile( "target/default-repository" ).getAbsolutePath() );
        repository = service.addLocalRepository( repository );

        ProjectGroup group = new ProjectGroup();
        group.setGroupId( "testGroup" );
        group.setName( "testGroup" );
        group.setLocalRepository( repository );
        continuum.addProjectGroup( group );

        ProjectGroup retrievedDefaultProjectGroup = continuum.getProjectGroupByGroupId( "testGroup" );
        assertNotNull( retrievedDefaultProjectGroup.getLocalRepository() );

        continuum.removeProjectGroup( retrievedDefaultProjectGroup.getId() );

        try
        {
            continuum.getProjectGroupByGroupId( "testGroup" );
            fail( "project group was not deleted" );
        }
        catch ( Exception e )
        {
            // should fail. do nothing.
        }

        LocalRepository retrievedRepository = service.getLocalRepository( repository.getId() );
        assertNotNull( retrievedRepository );
        assertEquals( repository, retrievedRepository );
    }
View Full Code Here

        projectGroup.setDescription( description );

        // [CONTINUUM-2228]. In select field can't select empty values.
        if ( repositoryId > 0 )
        {
            LocalRepository repository = getContinuum().getRepositoryService().getLocalRepository( repositoryId );
            projectGroup.setLocalRepository( repository );
        }

        getContinuum().updateProjectGroup( projectGroup );
View Full Code Here

                {
                    context.put( ContinuumBuildConstant.KEY_LATEST_UPDATE_DATE,
                                 new Date( buildResult.getStartTime() ) );
                }

                LocalRepository localRepo = project.getProjectGroup().getLocalRepository();

                if ( localRepo != null )
                {
                    context.put( ContinuumBuildConstant.KEY_LOCAL_REPOSITORY, localRepo.getLocation() );
                }
                else
                {
                    context.put( ContinuumBuildConstant.KEY_LOCAL_REPOSITORY, "" );
                }
View Full Code Here

    {
        ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
       
        listener.setUsername( username );

        LocalRepository repo = null;

        if ( !repository.isEmpty() )
        {
            List<org.apache.continuum.buildagent.model.LocalRepository>  localRepos = buildAgentConfigurationService.getLocalRepositories();
            for( org.apache.continuum.buildagent.model.LocalRepository localRepo : localRepos )
            {
                if( localRepo.getName().equalsIgnoreCase( ContinuumBuildAgentUtil.getLocalRepositoryName( repository ) ) )
                {
                    repo = new LocalRepository();
                    repo.setLayout( localRepo.getLayout() );
                    repo.setName( localRepo.getName() );
                    repo.setLocation( localRepo.getLocation() );
                   
                    break;
                }  
            }
        }
View Full Code Here

        {
            group.setLocalRepository( null );
        }
        else
        {
            LocalRepository localRepository = new LocalRepository();
            List<org.apache.continuum.buildagent.model.LocalRepository> localRepos = buildAgentConfigurationService.getLocalRepositories();
            for( org.apache.continuum.buildagent.model.LocalRepository localRepoBA : localRepos )
            {
                if( localRepoBA.getName().equalsIgnoreCase( localRepo ) )
                {
                    localRepository.setLocation( localRepoBA.getLocation() );
                    group.setLocalRepository( localRepository );
                    break;
                }
            }
        }
View Full Code Here

            {
                addActionError( getText( "repository.error.save.in.use" ) );
                return ERROR;
            }
           
            LocalRepository retrievedRepo = repositoryService.getLocalRepository( repository.getId() );
           
            retrievedRepo.setName( repository.getName() );
            retrievedRepo.setLocation( repository.getLocation() );
            retrievedRepo.setLayout( repository.getLayout() );
           
            repositoryService.updateLocalRepository( retrievedRepo );
        }
       
        return SUCCESS;
View Full Code Here

            return REQUIRES_AUTHORIZATION;
        }

        Project project = getContinuum().getProject( projectId );

        LocalRepository repository = project.getProjectGroup().getLocalRepository();
       
        String username = getPrincipal();

        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
View Full Code Here

    {
        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
        {
            Project project = getContinuum().getProject( projectId );

            LocalRepository repository = project.getProjectGroup().getLocalRepository();

            DistributedReleaseManager releaseManager = getContinuum().getDistributedReleaseManager();
            Map<String, String> environments = new HashMap<String, String>();
           
            if ( profileId != -1 )
View Full Code Here

        repoPurge.setDescription( this.description );
        repoPurge.setDefaultPurge( this.defaultPurgeConfiguration );

        if ( repositoryId != 0 )
        {
            LocalRepository repository = repositoryService.getLocalRepository( repositoryId );
            repoPurge.setRepository( repository );
        }

        if ( scheduleId > 0 )
        {
View Full Code Here

TOP

Related Classes of org.apache.continuum.model.repository.LocalRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.