Package org.apache.maven.model

Examples of org.apache.maven.model.MailingList


            if ( model.getMailingLists() != null && model.getMailingLists().size() > 0 )
            {
                serializer.startTag( NAMESPACE, "mailingLists" );
                for ( Iterator iter = model.getMailingLists().iterator(); iter.hasNext(); )
                {
                    MailingList o = (MailingList) iter.next();
                    writeMailingList( o, "mailingList", serializer );
                }
                serializer.endTag( NAMESPACE, "mailingLists" );
            }
            if ( model.getDevelopers() != null && model.getDevelopers().size() > 0 )
View Full Code Here


     * @param parser
     */
    private MailingList parseMailingList(String tagName, XmlPullParser parser, boolean strict, String encoding)
        throws IOException, XmlPullParserException
    {
        MailingList mailingList = new MailingList();
        mailingList.setModelEncoding( encoding );
        java.util.Set parsed = new java.util.HashSet();
        while ( parser.nextTag() == XmlPullParser.START_TAG )
        {
            if ( parser.getName().equals( "name" )  )
            {
                if ( parsed.contains( "name" ) )
                {
                    throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                }
                parsed.add( "name" );
                mailingList.setName( getTrimmedValue( parser.nextText()) );
            }
            else if ( parser.getName().equals( "subscribe" )  )
            {
                if ( parsed.contains( "subscribe" ) )
                {
                    throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                }
                parsed.add( "subscribe" );
                mailingList.setSubscribe( getTrimmedValue( parser.nextText()) );
            }
            else if ( parser.getName().equals( "unsubscribe" )  )
            {
                if ( parsed.contains( "unsubscribe" ) )
                {
                    throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                }
                parsed.add( "unsubscribe" );
                mailingList.setUnsubscribe( getTrimmedValue( parser.nextText()) );
            }
            else if ( parser.getName().equals( "post" )  )
            {
                if ( parsed.contains( "post" ) )
                {
                    throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                }
                parsed.add( "post" );
                mailingList.setPost( getTrimmedValue( parser.nextText()) );
            }
            else if ( parser.getName().equals( "archive" )  )
            {
                if ( parsed.contains( "archive" ) )
                {
                    throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                }
                parsed.add( "archive" );
                mailingList.setArchive( getTrimmedValue( parser.nextText()) );
            }
            else if ( parser.getName().equals( "otherArchives" )  )
            {
                if ( parsed.contains( "otherArchives" ) )
                {
                    throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
                }
                parsed.add( "otherArchives" );
                java.util.List otherArchives = new java.util.ArrayList();
                mailingList.setOtherArchives( otherArchives );
                while ( parser.nextTag() == XmlPullParser.START_TAG )
                {
                    if ( parser.getName().equals( "otherArchive" ) )
                    {
                        otherArchives.add( getTrimmedValue( parser.nextText()) );
View Full Code Here

            if ( model.getMailingLists() != null && model.getMailingLists().size() > 0 )
            {
                serializer.startTag( NAMESPACE, "mailingLists" );
                for ( Iterator iter = model.getMailingLists().iterator(); iter.hasNext(); )
                {
                    MailingList o = (MailingList) iter.next();
                    writeMailingList( o, "mailingList", serializer );
                }
                serializer.endTag( NAMESPACE, "mailingLists" );
            }
            if ( model.getDevelopers() != null && model.getDevelopers().size() > 0 )
View Full Code Here

                if ( pluginProject.getMailingLists() != null && pluginProject.getMailingLists().size() != 0 )
                {
                    boolean appended = false;
                    for ( Iterator i = pluginProject.getMailingLists().iterator(); i.hasNext(); )
                    {
                        MailingList mailingList = (MailingList) i.next();

                        if ( StringUtils.isNotEmpty( mailingList.getName() )
                            && StringUtils.isNotEmpty( mailingList.getPost() ) )
                        {
                            if ( !appended )
                            {
                                sb.append( "  Mailing Lists:" ).append( EOL );
                                appended = true;
                            }
                            sb.append( "    " ).append( mailingList.getName() );
                            sb.append( ": " ).append( mailingList.getPost() );
                            sb.append( EOL );
                        }
                    }
                }
                if ( StringUtils.isNotEmpty( pluginProject.getUrl() ) )
View Full Code Here

                elIt = null;
            }
            Counter innerCount = new Counter( counter.getDepth() + 1 );
            while ( it.hasNext() )
            {
                MailingList value = (MailingList) it.next();
                Element el;
                if ( elIt != null && elIt.hasNext() )
                {
                    el = (Element) elIt.next();
                    if ( !elIt.hasNext() )
View Full Code Here

        {
            for ( Iterator it = v3MailingLists.iterator(); it.hasNext(); )
            {
                org.apache.maven.model.v3_0_0.MailingList v3List = (org.apache.maven.model.v3_0_0.MailingList) it
                    .next();
                MailingList list = new MailingList();
                list.setArchive( v3List.getArchive() );
                list.setName( v3List.getName() );
                list.setSubscribe( v3List.getSubscribe() );
                list.setUnsubscribe( v3List.getUnsubscribe() );

                mailingLists.add( list );
            }
        }
View Full Code Here

                elIt = null;
            }
            Counter innerCount = new Counter( counter.getDepth() + 1 );
            while ( it.hasNext() )
            {
                MailingList value = (MailingList) it.next();
                Element el;
                if ( elIt != null && elIt.hasNext() )
                {
                    el = (Element) elIt.next();
                    if ( !elIt.hasNext() )
View Full Code Here

                sb.append( "You could also contact the Plugin team:" ).append( EOL );
                if ( pluginProject.getMailingLists() != null && !pluginProject.getMailingLists().isEmpty() )
                {
                    boolean appended = false;
                    for (Object o : pluginProject.getMailingLists()) {
                        MailingList mailingList = (MailingList) o;

                        if (StringUtils.isNotEmpty(mailingList.getName())
                                && StringUtils.isNotEmpty(mailingList.getPost())) {
                            if (!appended) {
                                sb.append("  Mailing Lists:").append(EOL);
                                appended = true;
                            }
                            sb.append("    ").append(mailingList.getName());
                            sb.append(": ").append(mailingList.getPost());
                            sb.append(EOL);
                        }
                    }
                }
                if ( StringUtils.isNotEmpty( pluginProject.getUrl() ) )
View Full Code Here

        for ( Iterator it = v3MailingLists.iterator(); it.hasNext(); )
        {
            org.apache.maven.model.v300.MailingList v3MailingList =
                (org.apache.maven.model.v300.MailingList) it.next();

            MailingList mailingList = new MailingList();

            mailingList.setName( v3MailingList.getName() );

            mailingList.setSubscribe( v3MailingList.getSubscribe() );

            mailingList.setUnsubscribe( v3MailingList.getUnsubscribe() );

            mailingList.setArchive( v3MailingList.getArchive() );

            mailingLists.add( mailingList );
        }

        return mailingLists;
View Full Code Here

            if ( model.getMailingLists() != null && model.getMailingLists().size() > 0 )
            {
                serializer.writeStartElement( "mailingLists" );
                for ( Iterator iter = model.getMailingLists().iterator(); iter.hasNext(); )
                {
                    MailingList o = (MailingList) iter.next();
                    writeMailingList( o, "mailingList", serializer );
                }
                serializer.writeEndElement();
            }
            if ( model.getDevelopers() != null && model.getDevelopers().size() > 0 )
View Full Code Here

TOP

Related Classes of org.apache.maven.model.MailingList

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.