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

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


            assertEquals( "project.notifiers.size", notifiers.size(), actual.getNotifiers().size() );

            for ( int i = 0; i < notifiers.size(); i++ )
            {
                ProjectNotifier notifier = notifiers.get( i );

                ProjectNotifier actualNotifier = (ProjectNotifier) actual.getNotifiers().get( i );

                assertEquals( "project.notifiers.notifier.type", notifier.getType(), actualNotifier.getType() );

                assertEquals( "project.notifiers.notifier.configuration.address",
                              notifier.getConfiguration().get( "address" ),
                              actualNotifier.getConfiguration().get( "address" ) );
            }
        }

        assertEquals( "project.version", version, actual.getVersion() );
    }
View Full Code Here


        assertEquals( "Java Project Management Tools", project.getDescription() );

        assertEquals( "scm:svn:http://svn.apache.org/repos/asf:maven/maven-1/core/trunk/", project.getScmUrl() );

        ProjectNotifier notifier = (ProjectNotifier) project.getNotifiers().get( 0 );

        assertEquals( "mail", notifier.getType() );

        assertEquals( "dev@maven.apache.org", notifier.getConfiguration().get( "address" ) );

        assertEquals( "1.1-SNAPSHOT", project.getVersion() );
    }
View Full Code Here

        if ( mavenProject.getCiManagement() != null && mavenProject.getCiManagement().getNotifiers() != null )
        {
            for ( Notifier projectNotifier : (List<Notifier>) mavenProject.getCiManagement().getNotifiers() )
            {
                ProjectNotifier notifier = new ProjectNotifier();

                if ( StringUtils.isEmpty( projectNotifier.getType() ) )
                {
                    result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_NOTIFIER_TYPE );
                    return null;
                }

                notifier.setType( projectNotifier.getType() );

                if ( projectNotifier.getConfiguration() == null )
                {
                    result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_NOTIFIER_CONFIGURATION );
                    return null;
                }

                notifier.setConfiguration( projectNotifier.getConfiguration() );

                notifier.setFrom( ProjectNotifier.FROM_PROJECT );

                notifier.setSendOnSuccess( projectNotifier.isSendOnSuccess() );

                notifier.setSendOnFailure( projectNotifier.isSendOnFailure() );

                notifier.setSendOnError( projectNotifier.isSendOnError() );

                notifier.setSendOnWarning( projectNotifier.isSendOnWarning() );

                notifier.setSendOnScmFailure( false );

                notifiers.add( notifier );
            }
        }
View Full Code Here

        if ( continuumProject.getNotifiers() != null )
        {
            for ( int i = 0; i < continuumProject.getNotifiers().size(); i++ )
            {
                ProjectNotifier notifier = (ProjectNotifier) continuumProject.getNotifiers().get( i );

                if ( notifier.isFromUser() )
                {
                    ProjectNotifier userNotifier = new ProjectNotifier();

                    userNotifier.setType( notifier.getType() );

                    userNotifier.setEnabled( notifier.isEnabled() );

                    userNotifier.setConfiguration( notifier.getConfiguration() );

                    userNotifier.setFrom( notifier.getFrom() );

                    userNotifier.setRecipientType( notifier.getRecipientType() );

                    userNotifier.setSendOnError( notifier.isSendOnError() );

                    userNotifier.setSendOnFailure( notifier.isSendOnFailure() );

                    userNotifier.setSendOnSuccess( notifier.isSendOnSuccess() );

                    userNotifier.setSendOnWarning( notifier.isSendOnWarning() );

                    userNotifier.setSendOnScmFailure( notifier.isSendOnScmFailure() );

                    userNotifiers.add( userNotifier );
                }
            }
        }
View Full Code Here

        if ( mavenProject.getCiManagement() != null && mavenProject.getCiManagement().getNotifiers() != null )
        {
            for ( Notifier projectNotifier : (List<Notifier>) mavenProject.getCiManagement().getNotifiers() )
            {
                ProjectNotifier notifier = new ProjectNotifier();

                if ( StringUtils.isEmpty( projectNotifier.getType() ) )
                {
                    result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_NOTIFIER_TYPE );
                    return null;
                }

                notifier.setType( projectNotifier.getType() );

                if ( projectNotifier.getConfiguration() == null )
                {
                    result.addError( ContinuumProjectBuildingResult.ERROR_MISSING_NOTIFIER_CONFIGURATION );
                    return null;
                }

                notifier.setConfiguration( projectNotifier.getConfiguration() );

                notifier.setFrom( ProjectNotifier.FROM_PROJECT );

                notifier.setSendOnSuccess( projectNotifier.isSendOnSuccess() );

                notifier.setSendOnFailure( projectNotifier.isSendOnFailure() );

                notifier.setSendOnError( projectNotifier.isSendOnError() );

                notifier.setSendOnWarning( projectNotifier.isSendOnWarning() );

                notifier.setSendOnScmFailure( false );

                notifiers.add( notifier );
            }
        }
View Full Code Here

        if ( continuumProject.getNotifiers() != null )
        {
            for ( int i = 0; i < continuumProject.getNotifiers().size(); i++ )
            {
                ProjectNotifier notifier = (ProjectNotifier) continuumProject.getNotifiers().get( i );

                if ( notifier.isFromUser() )
                {
                    ProjectNotifier userNotifier = new ProjectNotifier();

                    userNotifier.setType( notifier.getType() );

                    userNotifier.setEnabled( notifier.isEnabled() );

                    userNotifier.setConfiguration( notifier.getConfiguration() );

                    userNotifier.setFrom( notifier.getFrom() );

                    userNotifier.setRecipientType( notifier.getRecipientType() );

                    userNotifier.setSendOnError( notifier.isSendOnError() );

                    userNotifier.setSendOnFailure( notifier.isSendOnFailure() );

                    userNotifier.setSendOnSuccess( notifier.isSendOnSuccess() );

                    userNotifier.setSendOnWarning( notifier.isSendOnWarning() );

                    userNotifier.setSendOnScmFailure( notifier.isSendOnScmFailure() );

                    userNotifiers.add( userNotifier );
                }
            }
        }
View Full Code Here

        assertNotNull( project.getNotifiers() );

        assertEquals( 1, project.getNotifiers().size() );

        ProjectNotifier notifier = (ProjectNotifier) project.getNotifiers().get( 0 );

        assertEquals( "mail", notifier.getType() );

        assertEquals( "foo@bar", notifier.getConfiguration().get( "address" ) );

        ProjectGroup pg = (ProjectGroup) result.getProjectGroups().get( 0 );

        assertNotNull( pg );
View Full Code Here

        assertNotNull( project.getNotifiers() );

        assertEquals( 1, project.getNotifiers().size() );

        ProjectNotifier notifier = (ProjectNotifier) project.getNotifiers().get( 0 );

        assertEquals( "mail", notifier.getType() );

        assertEquals( "foo@bar", notifier.getConfiguration().get( "address" ) );

        ProjectGroup pg = (ProjectGroup) result.getProjectGroups().get( 0 );

        assertNotNull( pg );
View Full Code Here

        assertEquals( "Maven", project.getName() );

        assertEquals( "scm:svn:http://svn.apache.org/repos/asf:maven/maven-1/core/trunk/", project.getScmUrl() );

        ProjectNotifier notifier = (ProjectNotifier) project.getNotifiers().get( 0 );

        assertEquals( "mail", notifier.getType() );

        assertEquals( "dev@maven.apache.org", notifier.getConfiguration().get( "address" ) );

        assertEquals( "1.1-SNAPSHOT", project.getVersion() );
    }
View Full Code Here

    {
        Project project = getProjectWithAllDetails( projectId );

        List<ProjectNotifier> notifiers = project.getNotifiers();

        ProjectNotifier notifier = null;

        for ( ProjectNotifier notif : notifiers )
        {
            notifier = notif;

            if ( notifier.getId() == notifierId )
            {
                break;
            }
        }
View Full Code Here

TOP

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

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.