Examples of ProjectGroupSummary


Examples of org.apache.continuum.model.project.ProjectGroupSummary

      Map<Integer, ProjectGroupSummary> summaries = projectDao.getProjectsSummary();

      assertNotNull( summaries );
      assertEquals( "check size of project summaries", 2, summaries.size() );

      ProjectGroupSummary summary = summaries.get( testProjectGroup2.getId() );
      assertEquals( "check id of project group", testProjectGroup2.getId(), summary.getProjectGroupId() );
      assertEquals( "check number of errors", 1, summary.getNumberOfErrors() );
      assertEquals( "check number of successes", 0, summary.getNumberOfSuccesses() );
      assertEquals( "check number of failures", 0, summary.getNumberOfFailures() );
      assertEquals( "check number of projects", 2, summary.getNumberOfProjects() );

      summary = summaries.get( defaultProjectGroup.getId() );
      assertEquals( "check id of project group", defaultProjectGroup.getId(), summary.getProjectGroupId() );
        assertEquals( "check number of errors", 0, summary.getNumberOfErrors() );
        assertEquals( "check number of successes", 2, summary.getNumberOfSuccesses() );
        assertEquals( "check number of failures", 0, summary.getNumberOfFailures() );
        assertEquals( "check number of projects", 2, summary.getNumberOfProjects() );

  }
View Full Code Here

Examples of org.apache.continuum.model.project.ProjectGroupSummary

    {
        Map<Integer, ProjectGroupSummary> map = new HashMap<Integer, ProjectGroupSummary>();

        for ( ProjectSummaryResult result : results )
        {
            ProjectGroupSummary summary;
            int projectGroupId = result.getProjectGroupId();
            int size = new Long( result.getSize() ).intValue();
            int state = result.getProjectState();

            if ( map.containsKey( projectGroupId ) )
            {
                summary = map.get( projectGroupId );
            }
            else
            {
                summary = new ProjectGroupSummary( projectGroupId );
            }

            summary.addProjects( size );

            if ( state == 2 )
            {
                summary.addNumberOfSuccesses( size );
            }
            else if ( state == 3 )
            {
                summary.addNumberOfFailures( size );
            }
            else if ( state == 4 )
            {
                summary.addNumberOfErrors( size );
            }

            map.put( projectGroupId, summary );
        }
        return map;
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

    }

    protected String getProjectGroupName( int projectGroupId )
        throws ContinuumException
    {
        ProjectGroupSummary pgs = getPGSummary( projectGroupId );
        return pgs.getName();
    }
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

    }

    public int buildGroup( int projectGroupId )
        throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroup( projectGroupId, new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "" ) );

        return 0;
    }
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

    }

    public int buildGroup( int projectGroupId, int buildDefintionId )
        throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroupWithBuildDefinition( projectGroupId, buildDefintionId, new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "" ) );

        return 0;
    }
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

    }

    protected String getProjectGroupName( int projectGroupId )
        throws ContinuumException
    {
        ProjectGroupSummary pgs = getPGSummary( projectGroupId );
        return pgs.getName();
    }
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

    }

    public int buildGroup( int projectGroupId )
        throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroup( projectGroupId, new org.apache.continuum.utils.build.BuildTrigger(
            ContinuumProjectState.TRIGGER_SCHEDULED, "" ) );

        return 0;
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

    }

    public int buildGroup( int projectGroupId, int buildDefinitionId )
        throws ContinuumException, NoBuildAgentException, NoBuildAgentInGroupException
    {
        ProjectGroupSummary pg = getProjectGroupSummary( projectGroupId );
        checkBuildProjectInGroupAuthorization( pg.getName() );

        continuum.buildProjectGroupWithBuildDefinition( projectGroupId, buildDefinitionId,
                                                        new org.apache.continuum.utils.build.BuildTrigger(
                                                            ContinuumProjectState.TRIGGER_SCHEDULED, "" )
        );
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

                one( continuum ).getProjectGroupByGroupId( groupId );
                will( returnValue( group ) );
            }
        } );

        ProjectGroupSummary group = continuumService.addProjectGroup( name, groupId, description );
        assertEquals( name, group.getName() );
        assertEquals( groupId, group.getGroupId() );
        assertEquals( description, group.getDescription() );

        context.assertIsSatisfied();
    }
View Full Code Here

Examples of org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary

                exactly( 3 ).of( continuum ).getProjectGroup( projectGroupId );
                onConsecutiveCalls( returnValue( group ), returnValue( group ), returnValue( newProjectGroup ) );
            }
        } );

        ProjectGroupSummary group = continuumService.addProjectGroup( "name", "groupId", "description" );
        group.setName( newName );
        group.setGroupId( newGroupId );
        group.setDescription( newDescription );

        continuumService.updateProjectGroup( group );

        context.assertIsSatisfied();
    }
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.