Examples of GroupSummary


Examples of org.apache.maven.continuum.web.model.GroupSummary

                if ( logger.isDebugEnabled() )
                {
                    logger.debug( "GroupSummaryAction: building group " + projectGroup.getName() );
                }

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );

                ProjectGroupSummary summary = summaries.get( projectGroup.getId() );

                if ( summary != null )
                {
                    groupModel.setNumProjects( summary.getNumberOfProjects() );
                    groupModel.setNumErrors( summary.getNumberOfErrors() );
                    groupModel.setNumFailures( summary.getNumberOfFailures() );
                    groupModel.setNumSuccesses( summary.getNumberOfSuccesses() );
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );
                if ( logger.isDebugEnabled() )
                {
                    logger.debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                }
                groups.add( groupModel );
            }
        }
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

            if ( isAuthorized( projectGroup.getName() ) )
            {
                getLogger().debug( "GroupSummaryAction: building group " + projectGroup.getName() );

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );
               
                if ( projectGroup.getLocalRepository() != null )
                {
                    groupModel.setRepositoryId( projectGroup.getLocalRepository().getId() );
                    groupModel.setRepositoryName( projectGroup.getLocalRepository().getName() );
                }

                //TODO: Create a summary jpox request so code will be more simple and performance will be better
                Collection<Project> projects = projectGroup.getProjects();

                groupModel.setNumProjects( projects.size() );

                int numSuccesses = 0;
                int numFailures = 0;
                int numErrors = 0;

                for ( Project project : projects )
                {
                   
                    if ( project.getState() == 2 )
                    {
                        numSuccesses++;
                    }
                    else if ( project.getState() == 3 )
                    {
                        numFailures++;
                    }
                    else if ( project.getState() == 4 )
                    {
                        numErrors++;
                    }
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );

                groupModel.setNumSuccesses( numSuccesses );
                groupModel.setNumFailures( numFailures );
                groupModel.setNumErrors( numErrors );
                getLogger().debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                groups.add( groupModel );
            }
        }

        return SUCCESS;
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

                if ( logger.isDebugEnabled() )
                {
                    logger.debug( "GroupSummaryAction: building group " + projectGroup.getName() );
                }

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );

                ProjectGroupSummary summary = summaries.get( projectGroup.getId() );

                if ( summary != null )
                {
                    groupModel.setNumProjects( summary.getNumberOfProjects() );
                    groupModel.setNumErrors( summary.getNumberOfErrors() );
                    groupModel.setNumFailures( summary.getNumberOfFailures() );
                    groupModel.setNumSuccesses( summary.getNumberOfSuccesses() );
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );
                if ( logger.isDebugEnabled() )
                {
                    logger.debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                }
                groups.add( groupModel );
            }
        }
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

public class BuildStatusCell
    extends DisplayCell
{
    protected String getCellValue( TableModel tableModel, Column column )
    {
        GroupSummary group = (GroupSummary) tableModel.getCurrentRowBean();

        String success = StateGenerator.generate( ContinuumProjectState.OK, tableModel.getContext().getContextPath() );

        String failed = StateGenerator.generate( ContinuumProjectState.FAILED,
                                                 tableModel.getContext().getContextPath() );

        String error = StateGenerator.generate( ContinuumProjectState.ERROR, tableModel.getContext().getContextPath() );

        StringBuffer cellContent = new StringBuffer();
        cellContent.append( success );
        cellContent.append( "&nbsp;" );
        cellContent.append( group.getNumSuccesses() );
        cellContent.append( "&nbsp;&nbsp;&nbsp;" );
        cellContent.append( failed );
        cellContent.append( "&nbsp;" );
        cellContent.append( group.getNumFailures() );
        cellContent.append( "&nbsp;&nbsp;&nbsp;" );
        cellContent.append( error );
        cellContent.append( "&nbsp;" );
        cellContent.append( group.getNumErrors() );

        return cellContent.toString();
    }
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

            if ( isAuthorized( projectGroup.getName() ) )
            {
                logger.debug( "GroupSummaryAction: building group " + projectGroup.getName() );

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );

                Map<Integer, ProjectGroupSummary> summaries = getContinuum().getProjectsSummaryByGroups();
                ProjectGroupSummary summary = summaries.get( projectGroup.getId() );

                if ( summary != null )
                {
                    groupModel.setNumProjects( summary.getNumberOfProjects() );
                    groupModel.setNumErrors( summary.getNumberOfErrors() );
                    groupModel.setNumFailures( summary.getNumberOfFailures() );
                    groupModel.setNumSuccesses( summary.getNumberOfSuccesses() );
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );
                logger.debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                groups.add( groupModel );
            }
        }

        return SUCCESS;
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

            if ( isAuthorized( projectGroup.getName() ) )
            {
                logger.debug( "GroupSummaryAction: building group " + projectGroup.getName() );

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );

                //TODO: Create a summary jpox request so code will be more simple and performance will be better
                Collection<Project> projects = projectGroup.getProjects();

                groupModel.setNumProjects( projects.size() );

                int numSuccesses = 0;
                int numFailures = 0;
                int numErrors = 0;

                for ( Project project : projects )
                {

                    if ( project.getState() == 2 )
                    {
                        numSuccesses++;
                    }
                    else if ( project.getState() == 3 )
                    {
                        numFailures++;
                    }
                    else if ( project.getState() == 4 )
                    {
                        numErrors++;
                    }
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );

                groupModel.setNumSuccesses( numSuccesses );
                groupModel.setNumFailures( numFailures );
                groupModel.setNumErrors( numErrors );
                logger.debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                groups.add( groupModel );
            }
        }

        return SUCCESS;
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

public class BuildStatusCell
    extends DisplayCell
{
    protected String getCellValue( TableModel tableModel, Column column )
    {
        GroupSummary group = (GroupSummary) tableModel.getCurrentRowBean();

        String success = StateGenerator.generate( ContinuumProjectState.OK, tableModel.getContext().getContextPath() );

        String failed =
            StateGenerator.generate( ContinuumProjectState.FAILED, tableModel.getContext().getContextPath() );

        String error = StateGenerator.generate( ContinuumProjectState.ERROR, tableModel.getContext().getContextPath() );

        StringBuffer cellContent = new StringBuffer();
        cellContent.append( success );
        cellContent.append( "&nbsp;" );
        cellContent.append( group.getNumSuccesses() );
        cellContent.append( "&nbsp;&nbsp;&nbsp;" );
        cellContent.append( failed );
        cellContent.append( "&nbsp;" );
        cellContent.append( group.getNumFailures() );
        cellContent.append( "&nbsp;&nbsp;&nbsp;" );
        cellContent.append( error );
        cellContent.append( "&nbsp;" );
        cellContent.append( group.getNumErrors() );

        return cellContent.toString();
    }
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

                if ( logger.isDebugEnabled() )
                {
                    logger.debug( "GroupSummaryAction: building group " + projectGroup.getName() );
                }

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );

                ProjectGroupSummary summary = summaries.get( projectGroup.getId() );

                if ( summary != null )
                {
                    groupModel.setNumProjects( summary.getNumberOfProjects() );
                    groupModel.setNumErrors( summary.getNumberOfErrors() );
                    groupModel.setNumFailures( summary.getNumberOfFailures() );
                    groupModel.setNumSuccesses( summary.getNumberOfSuccesses() );
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );
                if ( logger.isDebugEnabled() )
                {
                    logger.debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                }
                groups.add( groupModel );
            }
        }
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

            if ( isAuthorized( projectGroup.getName() ) )
            {
                getLogger().debug( "GroupSummaryAction: building group " + projectGroup.getName() );

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );
               
                if ( projectGroup.getLocalRepository() != null )
                {
                    groupModel.setRepositoryId( projectGroup.getLocalRepository().getId() );
                    groupModel.setRepositoryName( projectGroup.getLocalRepository().getName() );
                }

                //TODO: Create a summary jpox request so code will be more simple and performance will be better
                Collection<Project> projects = projectGroup.getProjects();

                groupModel.setNumProjects( projects.size() );

                int numSuccesses = 0;
                int numFailures = 0;
                int numErrors = 0;

                for ( Project project : projects )
                {
                   
                    if ( project.getState() == 2 )
                    {
                        numSuccesses++;
                    }
                    else if ( project.getState() == 3 )
                    {
                        numFailures++;
                    }
                    else if ( project.getState() == 4 )
                    {
                        numErrors++;
                    }
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );

                groupModel.setNumSuccesses( numSuccesses );
                groupModel.setNumFailures( numFailures );
                groupModel.setNumErrors( numErrors );
                getLogger().debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                groups.add( groupModel );
            }
        }

        return SUCCESS;
View Full Code Here

Examples of org.apache.maven.continuum.web.model.GroupSummary

            if ( isAuthorized( projectGroup.getName() ) )
            {
                getLogger().debug( "GroupSummaryAction: building group " + projectGroup.getName() );

                GroupSummary groupModel = new GroupSummary();
                groupModel.setId( projectGroup.getId() );
                groupModel.setGroupId( projectGroup.getGroupId() );
                groupModel.setName( projectGroup.getName() );
                groupModel.setDescription( projectGroup.getDescription() );

                //TODO: Create a summary jpox request so code will be more simple and performance will be better
                Collection projects = projectGroup.getProjects();

                groupModel.setNumProjects( projects.size() );

                Map buildResults = getContinuum().getLatestBuildResults();

                Map buildResultsInSuccess = getContinuum().getBuildResultsInSuccess();

                List projectModels = new ArrayList();
                int numSuccesses = 0;
                int numFailures = 0;
                int numErrors = 0;

                for ( Iterator i = projects.iterator(); i.hasNext(); )
                {
                    Project project = (Project) i.next();

                    if ( groupModel.getProjectType() == null )
                    {
                        groupModel.setProjectType( project.getExecutorId() );
                    }

                    ProjectSummary model = new ProjectSummary();

                    getLogger().debug( "GroupSummaryAction: building project model " + project.getName() );

                    model.setId( project.getId() );

                    model.setName( project.getName() );

                    model.setVersion( project.getVersion() );

                    model.setProjectGroupId( project.getProjectGroup().getId() );

                    model.setProjectGroupName( project.getProjectGroup().getName() );

                    if ( getContinuum().isInBuildingQueue( project.getId() ) )
                    {
                        model.setInBuildingQueue( true );
                    }
                    else if ( getContinuum().isInCheckoutQueue( project.getId() ) )
                    {
                        model.setInCheckoutQueue( true );
                    }
                    else
                    {
                        model.setInBuildingQueue( false );
                        model.setInCheckoutQueue( false );
                    }

                    model.setState( project.getState() );

                    if ( project.getState() == 2 )
                    {
                        numSuccesses++;
                    }
                    else if ( project.getState() == 3 )
                    {
                        numFailures++;
                    }
                    else if ( project.getState() == 4 )
                    {
                        numErrors++;
                    }

                    model.setBuildNumber( project.getBuildNumber() );

                    if ( buildResultsInSuccess != null )
                    {
                        BuildResult buildInSuccess =
                            (BuildResult) buildResultsInSuccess.get( new Integer( project.getId() ) );

                        if ( buildInSuccess != null )
                        {
                            model.setBuildInSuccessId( buildInSuccess.getId() );
                        }
                    }

                    if ( buildResults != null )
                    {
                        BuildResult latestBuild = (BuildResult) buildResults.get( new Integer( project.getId() ) );

                        if ( latestBuild != null )
                        {
                            model.setLatestBuildId( latestBuild.getId() );
                        }
                    }
                    getLogger().debug( "GroupSummaryAction: adding model to group " + model.getName() );
                    projectModels.add( model );
                }

                //todo wire in the next scheduled build for the project group and a meaningful status message
                //groupModel.setNextScheduledBuild( "unknown" );
                //groupModel.setStatusMessage( "none" );

                groupModel.setNumSuccesses( numSuccesses );
                groupModel.setNumFailures( numFailures );
                groupModel.setNumErrors( numErrors );
                groupModel.setProjects( projectModels );
                getLogger().debug( "GroupSummaryAction: adding group to groups list " + groupModel.getName() );
                groups.add( groupModel );
            }
        }

        return SUCCESS;
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.