Package org.apache.continuum.model.project

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


    {
        List<Map<String, Object>> buildContext = new ArrayList<Map<String, Object>>();

        try
        {
            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRoot( scmRootId );

            List<Project> projects = projectDao.getProjectsWithDependenciesByGroupId(
                scmRoot.getProjectGroup().getId() );
            List<Project> sortedProjects = ProjectSorter.getSortedProjects( projects, null );

            for ( Project project : sortedProjects )
            {
                if ( !projectsAndBuildDefinitions.containsKey( project.getId() ) )
View Full Code Here


    private void createResult( PrepareBuildProjectsTask task, String error )
        throws TaskExecutionException
    {
        try
        {
            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress(
                task.getProjectGroupId(), task.getScmRootAddress() );

            if ( scmRoot.getState() == ContinuumProjectState.UPDATING )
            {
                scmRoot.setState( ContinuumProjectState.ERROR );
                scmRoot.setError( error );
                projectScmRootDao.updateProjectScmRoot( scmRoot );
            }
            else
            {
                Map<Integer, Integer> map = task.getProjectsBuildDefinitionsMap();
View Full Code Here

        projectGroup.setName( "test-group" );
        projectGroup.setId( 1 );

        final List<ProjectScmRoot> scmRoots = new ArrayList<ProjectScmRoot>();

        ProjectScmRoot scmRoot = new ProjectScmRoot();
        scmRoot.setState( 1 );
        scmRoot.setOldState( 3 );
        scmRoot.setScmRootAddress( "address1" );
        scmRoot.setProjectGroup( projectGroup );
        scmRoots.add( scmRoot );

        scmRoot = new ProjectScmRoot();
        scmRoot.setState( 2 );
        scmRoot.setOldState( 4 );
        scmRoot.setScmRootAddress( "address2" );
        scmRoot.setProjectGroup( projectGroup );
        scmRoots.add( scmRoot );

        context.checking( new Expectations()
        {
            {
View Full Code Here

        projectGroup.setName( "test-group" );
        projectGroup.setId( 1 );

        final int projectId = 1;

        final ProjectScmRoot scmRoot = new ProjectScmRoot();
        scmRoot.setState( 1 );
        scmRoot.setOldState( 3 );
        scmRoot.setScmRootAddress( "address1" );
        scmRoot.setProjectGroup( projectGroup );

        context.checking( new Expectations()
        {
            {
                atLeast( 1 ).of( continuum ).getProjectScmRootByProject( projectId );
View Full Code Here

    private void createResult( PrepareBuildProjectsTask task, String error )
        throws TaskExecutionException
    {
        try
        {
            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( task.getProjectGroupId(), task.getScmRootAddress() );

            if ( scmRoot.getState() == ContinuumProjectState.UPDATING )
            {
                scmRoot.setState( ContinuumProjectState.ERROR );
                scmRoot.setError( error );
                projectScmRootDao.updateProjectScmRoot( scmRoot );
            }
            else
            {
                Map<Integer, Integer> map = task.getProjectsBuildDefinitionsMap();
View Full Code Here

                }
            }
        }
        else
        {
            ProjectScmRoot projectScmRoot = (ProjectScmRoot) tableModel.getCurrentRowBean();

            switch ( projectScmRoot.getState() )
            {
                case ContinuumProjectState.UPDATING:
                case ContinuumProjectState.UPDATED:
                case ContinuumProjectState.ERROR:
                {
                    String state = StateGenerator.generate( projectScmRoot.getState(),
                                                            tableModel.getContext().getContextPath() );
                   
                    if ( !StateGenerator.NEW.equals( state ) )
                    {
                        if ( isAuthorized( projectScmRoot.getProjectGroup().getName() ) &&
                             projectScmRoot.getState() == ContinuumProjectState.ERROR )
                        {
                            return createActionLink( "scmResult", projectScmRoot, state );
                        }
                        else
                        {
View Full Code Here

                }
            }
        }
        else
        {
            ProjectScmRoot projectScmRoot = (ProjectScmRoot) tableModel.getCurrentRowBean();

            switch ( projectScmRoot.getState() )
            {
                case ContinuumProjectState.UPDATING:
                case ContinuumProjectState.UPDATED:
                case ContinuumProjectState.ERROR:
                {
                    String state = StateGenerator.generate( projectScmRoot.getState(),
                                                            tableModel.getContext().getContextPath() );
                   
                    if ( !StateGenerator.NEW.equals( state ) )
                    {
                        if ( isAuthorized( projectScmRoot.getProjectGroup().getName() ) &&
                             projectScmRoot.getState() == ContinuumProjectState.ERROR )
                        {
                            return createActionLink( "scmResult", projectScmRoot, state );
                        }
                        else
                        {
View Full Code Here

        int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
        String scmRootAddress = ContinuumBuildConstant.getScmRootAddress( context );

        try
        {
            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroupId, scmRootAddress );
           
            String error = ContinuumBuildConstant.getScmError( context );
           
            if ( StringUtils.isEmpty( error ) )
            {
                scmRoot.setState( ContinuumProjectState.UPDATED );
            }
            else
            {
                scmRoot.setState( ContinuumProjectState.ERROR );
                scmRoot.setError( error );
            }

            projectScmRootDao.updateProjectScmRoot( scmRoot );

            notifierDispatcher.prepareBuildComplete( scmRoot );
View Full Code Here

        try
        {
            int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
            String scmRootAddress = ContinuumBuildConstant.getScmRootAddress( context );
           
            ProjectScmRoot scmRoot = projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroupId, scmRootAddress );
            scmRoot.setOldState( scmRoot.getState() );
            scmRoot.setState( ContinuumProjectState.UPDATING );
            projectScmRootDao.updateProjectScmRoot( scmRoot );
        }
        catch ( ContinuumStoreException e )
        {
            log.error( "Error while updating project scm root's state", e );
View Full Code Here

        Project project = context.getProject();
        List<ProjectNotifier> notifiers = context.getNotifiers();
        BuildResult build = context.getBuildResult();
        String buildOutput = getBuildOutput( project, build );
        BuildDefinition buildDefinition = context.getBuildDefinition();
        ProjectScmRoot projectScmRoot = context.getProjectScmRoot();
       
        boolean isPrepareBuildComplete =
            messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_PREPARE_BUILD_COMPLETE );
       
        if ( projectScmRoot == null && isPrepareBuildComplete )
View Full Code Here

TOP

Related Classes of org.apache.continuum.model.project.ProjectScmRoot

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.