Package org.apache.continuum.model.repository

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


        return createTestLocalRepository( repository.getName(), repository.getLocation(), repository.getLayout() );
    }

    protected static LocalRepository createTestLocalRepository( String name, String location, String layout )
    {
        LocalRepository repository = new LocalRepository();
        repository.setName( name );
        repository.setLocation( location );
        repository.setLayout( layout );
        return repository;
    }
View Full Code Here


    {
        defaultRepository = localRepositoryDao.getLocalRepositoryByName( TEST_DEFAULT_REPO_NAME );

        if ( defaultRepository == null )
        {
            LocalRepository repository = new LocalRepository();

            repository.setName( TEST_DEFAULT_REPO_NAME );
            repository.setLocation( getDefaultRepositoryLocation().getAbsolutePath() );
            defaultRepository = localRepositoryDao.addLocalRepository( repository );
        }
    }
View Full Code Here

        throws ContinuumStoreException
    {
        String name = "testAddProjectGroup";
        String description = "testAddProjectGroup description";
        String groupId = "org.apache.maven.continuum.test";
        LocalRepository repository = localRepositoryDao.getLocalRepository( testLocalRepository3.getId() );
        ProjectGroup group = createTestProjectGroup( name, description, groupId, repository );

        ProjectGroup copy = createTestProjectGroup( group );
        projectGroupDao.addProjectGroup( group );
        copy.setId( group.getId() );
View Full Code Here

    {
        String name = "testAddLocalRepository";
        String directory = "testAddLocalRepositoryDirectory";
        String layout = "default";

        LocalRepository repository = createTestLocalRepository( name, directory, layout );

        LocalRepository copy = createTestLocalRepository( repository );
        localRepositoryDao.addLocalRepository( repository );
        copy.setId( repository.getId() );

        LocalRepository retrievedRepository = localRepositoryDao.getLocalRepository( repository.getId() );
        assertLocalRepositoryEquals( copy, retrievedRepository );
    }
View Full Code Here

    }

    public void testRemoveLocalRepository()
        throws Exception
    {
        LocalRepository repository = localRepositoryDao.getLocalRepositoryByName( testLocalRepository2.getName() );

        ProjectGroup projectGroup = projectGroupDao.getProjectGroupByGroupId( testProjectGroup2.getGroupId() );
        assertLocalRepositoryEquals( testLocalRepository2, projectGroup.getLocalRepository() );
        projectGroup.setLocalRepository( null );

        ProjectGroup copy = createTestProjectGroup( projectGroup );
        projectGroupDao.updateProjectGroup( projectGroup );

        projectGroup = projectGroupDao.getProjectGroup( testProjectGroup2.getId() );
        assertNull( "check local repository", projectGroup.getLocalRepository() );

        List<RepositoryPurgeConfiguration> repoPurgeList =
            repositoryPurgeConfigurationDao.getRepositoryPurgeConfigurationsByLocalRepository( repository.getId() );

        assertEquals( "check # repo purge config", 1, repoPurgeList.size() );
        repositoryPurgeConfigurationDao.removeRepositoryPurgeConfiguration( repoPurgeList.get( 0 ) );
        localRepositoryDao.removeLocalRepository( repository );
View Full Code Here

    }

    public void testAddRepositoryPurgeConfiguration()
        throws Exception
    {
        LocalRepository repository = localRepositoryDao.getLocalRepository( testLocalRepository3.getId() );
        Schedule schedule = scheduleDao.getSchedule( testSchedule1.getId() );

        RepositoryPurgeConfiguration repoPurge =
            createTestRepositoryPurgeConfiguration( true, 2, 100, false, schedule, true, repository );
View Full Code Here

          if ( task != null && task instanceof BuildProjectTask )
                {
                    int projectId = ( (BuildProjectTask) task ).getProjectId();
       
                    Project project = projectDao.getProject( projectId );
                    LocalRepository repository = project.getProjectGroup().getLocalRepository();
       
                    if ( repository != null && repository.getId() == repositoryId )
                    {
                        return true;
                    }
                }
        }
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

        repoPurge.setDescription( StringEscapeUtils.escapeXml( StringEscapeUtils.unescapeXml( this.description ) ) );
        repoPurge.setDefaultPurge( this.defaultPurgeConfiguration );

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

        if ( scheduleId > 0 )
        {
View Full Code Here

        try
        {
            if ( repositoryId > 0 )
            {
                LocalRepository repository = getContinuum().getRepositoryService().getLocalRepository( repositoryId );
                projectGroup.setLocalRepository( repository );
            }
        }
        catch ( RepositoryServiceException e )
        {
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.