Package org.apache.maven.continuum.model.project

Examples of org.apache.maven.continuum.model.project.Schedule


        throws Exception
    {
        String location = "release-directory";
        String directoryType = "release";

        Schedule schedule = scheduleDao.getSchedule( testSchedule1.getId() );
        DirectoryPurgeConfiguration dirPurge =
            createTestDirectoryPurgeConfiguration( location, directoryType, false, 2, 100, schedule, true );

        DirectoryPurgeConfiguration copy = createTestDirectoryPurgeConfiguration( dirPurge );
        directoryPurgeConfigurationDao.addDirectoryPurgeConfiguration( dirPurge );
View Full Code Here


        buildResult3.setScmResult( scmResult );
        testBuildResult3.setScmResult( createTestScmResult( scmResult, "3" ) );
        testProject2.addBuildResult( buildResult3 );

        // TODO: better way? this assumes that some untested methods already work!
        Schedule schedule2 = createTestSchedule( testSchedule2 );
        if ( addToStore )
        {
            schedule2 = scheduleDao.addSchedule( schedule2 );
            testSchedule2.setId( schedule2.getId() );
        }
        else
        {
            // from expected.xml, continuum-data-management
            testSchedule2.setId( 1 );
        }

        Schedule schedule1 = createTestSchedule( testSchedule1 );
        if ( addToStore )
        {
            schedule1 = scheduleDao.addSchedule( schedule1 );
            testSchedule1.setId( schedule1.getId() );
        }
        else
        {
            // from expected.xml, continuum-data-management
            testSchedule1.setId( 2 );
        }

        Schedule schedule3 = createTestSchedule( testSchedule3 );
        if ( addToStore )
        {
            schedule3 = scheduleDao.addSchedule( schedule3 );
            testSchedule3.setId( schedule3.getId() );
        }
        else
        {
            // from expected.xml, continuum-data-management
            testSchedule3.setId( 3 );
View Full Code Here

    }

    protected static Schedule createTestSchedule( String name, String description, int delay, String cronExpression,
                                                  boolean active )
    {
        Schedule schedule = new Schedule();
        schedule.setActive( active );
        schedule.setCronExpression( cronExpression );
        schedule.setDelay( delay );
        schedule.setDescription( description );
        schedule.setName( name );
        return schedule;
    }
View Full Code Here

        PlexusJdoUtils.addObject( pmf.getPersistenceManager(), database.getSystemConfiguration() );

        Map<Integer, Schedule> schedules = new HashMap<Integer, Schedule>();
        for ( Iterator i = database.getSchedules().iterator(); i.hasNext(); )
        {
            Schedule schedule = (Schedule) i.next();

            schedule = (Schedule) PlexusJdoUtils.addObject( pmf.getPersistenceManager(), schedule );
            schedules.put( Integer.valueOf( schedule.getId() ), schedule );
        }

        Map<Integer, Installation> installations = new HashMap<Integer, Installation>();
        for ( Iterator i = database.getInstallations().iterator(); i.hasNext(); )
        {
View Full Code Here

    public Schedule getDefaultSchedule()
        throws ContinuumStoreException, ConfigurationLoadingException, ContinuumConfigurationException, BuildQueueServiceException
    {
        // Schedule
        Schedule defaultSchedule = scheduleDao.getScheduleByName( DEFAULT_SCHEDULE_NAME );

        if ( defaultSchedule == null )
        {
            defaultSchedule = createDefaultSchedule();
View Full Code Here

        throws ConfigurationLoadingException, ContinuumConfigurationException, ContinuumStoreException, BuildQueueServiceException
    {

        log.info( "create Default Schedule" );

        Schedule schedule = new Schedule();

        schedule.setName( DEFAULT_SCHEDULE_NAME );

        //It shouldn't be possible
        if ( systemConf == null )
        {
            this.reload();
        }

        schedule.setDescription( systemConf.getDefaultScheduleDescription() );

        schedule.setCronExpression( systemConf.getDefaultScheduleCronExpression() );

        schedule.setActive( true );
       
        BuildQueue buildQueue = getDefaultBuildQueue();
       
        schedule.addBuildQueue( buildQueue );

        return schedule;
    }
View Full Code Here

    private BuildDefinition getBuildDefinitionFromInput()
        throws ContinuumActionException, ProfileException
    {

        Schedule schedule;

        try
        {
            schedule = getContinuum().getSchedule( scheduleId );
        }
View Full Code Here

            return ERROR;
        }

        try
        {
            Schedule s = getContinuum().getScheduleByName( name );
            if ( s != null && id != s.getId() )
            {
                addActionError( getText( "schedule.name.already.exists" ) );
                return ERROR;
            }
        }
        catch ( ContinuumException e )
        {
            logger.debug( "Unexpected error getting schedule" );
        }
       
        AuditLog event = new AuditLog( getName(), AuditLogConstants.ADD_SCHEDULE );
        event.setCategory( AuditLogConstants.SCHEDULE );
        event.setCurrentUser( getPrincipal() );

        if ( id == 0 )
        {
            try
            {
                getContinuum().addSchedule( setFields( new Schedule() ) );
                event.log();
            }
            catch ( ContinuumException e )
            {
                addActionError( getText( "schedule.buildqueues.add.error" ) );
View Full Code Here

            repoPurge.setRepository( repository );
        }

        if ( scheduleId > 0 )
        {
            Schedule schedule = getContinuum().getSchedule( scheduleId );
            repoPurge.setSchedule( schedule );
        }

        return repoPurge;
    }
View Full Code Here

        dirPurge.setDirectoryType( this.directoryType );
        dirPurge.setDefaultPurge( this.defaultPurgeConfiguration );

        if ( scheduleId > 0 )
        {
            Schedule schedule = getContinuum().getSchedule( scheduleId );
            dirPurge.setSchedule( schedule );
        }

        ConfigurationService configService = getContinuum().getConfiguration();
        String path = null;
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.model.project.Schedule

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.