Examples of Schedule


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

    {
        ProjectGroup projectGroup =
            projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId() );

        Profile profile = profileDao.getProfile( testProfile1.getId() );
        Schedule schedule = scheduleDao.getSchedule( testSchedule1.getId() );
        BuildDefinition buildDefinition = createTestBuildDefinition( "TABDTPG arguments", "TABDTPG buildFile",
                                                                     "TABDTPG goals", profile, schedule, false, false );
        BuildDefinition copy = createTestBuildDefinition( buildDefinition );
        projectGroup.addBuildDefinition( buildDefinition );
        projectGroupDao.updateProjectGroup( projectGroup );
View Full Code Here

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

    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 );

        RepositoryPurgeConfiguration copy = createTestRepositoryPurgeConfiguration( repoPurge );
View Full Code Here

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

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

        }

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

            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

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

        Continuum continuum = (Continuum) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.CONTINUUM );

        ContinuumPurgeManager purgeManager = continuum.getPurgeManager();
       
        Schedule schedule = (Schedule) jobDetail.getJobDataMap().get( ContinuumSchedulerConstants.SCHEDULE );

        try
        {
            purgeManager.purge( schedule );
        }
        catch ( ContinuumPurgeManagerException e )
        {
            logger.error( "Error purging for job" + jobName + ".", e );
        }

        try
        {
            if ( schedule.getDelay() > 0 )
            {
                Thread.sleep( schedule.getDelay() * 1000 );
            }
        }
        catch ( InterruptedException e )
        {
        }
View Full Code Here

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

    public BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDefinition )
        throws ContinuumException
    {
        HashMap<String, Object> context = new HashMap<String, Object>();
        Schedule schedule = buildDefinition.getSchedule();

        AbstractContinuumAction.setBuildDefinition( context, buildDefinition );
        AbstractContinuumAction.setProjectId( context, projectId );

        executeAction( "add-build-definition-to-project", context );
View Full Code Here

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

    public BuildDefinition updateBuildDefinitionForProject( int projectId, BuildDefinition buildDefinition )
        throws ContinuumException
    {
        HashMap<String, Object> context = new HashMap<String, Object>();
        Schedule schedule = buildDefinition.getSchedule();

        AbstractContinuumAction.setBuildDefinition( context, buildDefinition );
        AbstractContinuumAction.setProjectId( context, projectId );

        executeAction( "update-build-definition-from-project", context );
View Full Code Here

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

    public BuildDefinition addBuildDefinitionToProjectGroup( int projectGroupId, BuildDefinition buildDefinition )
        throws ContinuumException
    {
        HashMap<String, Object> context = new HashMap<String, Object>();
        Schedule schedule = buildDefinition.getSchedule();

        AbstractContinuumAction.setBuildDefinition( context, buildDefinition );
        AbstractContinuumAction.setProjectGroupId( context, projectGroupId );

        executeAction( "add-build-definition-to-project-group", context );
View Full Code Here

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

    public BuildDefinition updateBuildDefinitionForProjectGroup( int projectGroupId, BuildDefinition buildDefinition )
        throws ContinuumException
    {
        HashMap<String, Object> context = new HashMap<String, Object>();
        Schedule schedule = buildDefinition.getSchedule();

        AbstractContinuumAction.setBuildDefinition( context, buildDefinition );
        AbstractContinuumAction.setProjectGroupId( context, projectGroupId );

        executeAction( "update-build-definition-from-project-group", context );
View Full Code Here

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

    }

    public void addSchedule( Schedule schedule )
        throws ContinuumException
    {
        Schedule s;

        s = getScheduleByName( schedule.getName() );

        if ( s != null )
        {
            throw logAndCreateException( "Can't create schedule. A schedule with the same name already exists.", null );
        }

        s = scheduleDao.addSchedule( schedule );

        try
        {
            schedulesActivator.activateSchedule( s, this );
        }
        catch ( SchedulesActivationException e )
        {
            throw new ContinuumException( "Error activating schedule " + s.getName() + ".", e );
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.