• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MailingList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.maven.model.MailingList的典型用法代码示例。如果您正苦于以下问题:Java MailingList类的具体用法?Java MailingList怎么用?Java MailingList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MailingList类属于org.apache.maven.model包,在下文中一共展示了MailingList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: convertMailingLists

import org.apache.maven.model.MailingList; //导入依赖的package包/类
private List<org.apache.archiva.metadata.model.MailingList> convertMailingLists( List<MailingList> mailingLists )
{
    List<org.apache.archiva.metadata.model.MailingList> l = new ArrayList<>();
    for ( MailingList mailingList : mailingLists )
    {
        org.apache.archiva.metadata.model.MailingList newMailingList =
            new org.apache.archiva.metadata.model.MailingList();
        newMailingList.setName( mailingList.getName() );
        newMailingList.setMainArchiveUrl( mailingList.getArchive() );
        newMailingList.setPostAddress( mailingList.getPost() );
        newMailingList.setSubscribeAddress( mailingList.getSubscribe() );
        newMailingList.setUnsubscribeAddress( mailingList.getUnsubscribe() );
        newMailingList.setOtherArchives( mailingList.getOtherArchives() );
        l.add( newMailingList );
    }
    return l;
}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:18,代码来源:Maven2RepositoryStorage.java


示例2: visitMailingList

import org.apache.maven.model.MailingList; //导入依赖的package包/类
private void visitMailingList( ModelVisitor visitor, MailingList mailingList )
{
    List<String> otherArchives = mailingList.getOtherArchives();
    if ( otherArchives != null )
    {
        ListIterator<String> otherArchiveIterator = otherArchives.listIterator();
        while ( otherArchiveIterator.hasNext() )
        {
            String otherArchive = otherArchiveIterator.next();
            visitor.visitMailingListOtherArchive( otherArchive );
            otherArchive = visitor.replaceMailingListOtherArchive( otherArchive );
            if ( otherArchive == null )
                otherArchiveIterator.remove();
            else
                otherArchiveIterator.set( otherArchive );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:19,代码来源:DefaultModelProcessor.java


示例3: writeMailingList

import org.apache.maven.model.MailingList; //导入依赖的package包/类
private void writeMailingList(MailingList mailingList, String tagName, XmlSerializer serializer)
        throws java.io.IOException {
    serializer.startTag(NAMESPACE, tagName);
    flush(serializer);
    StringBuffer b = b(serializer);
    int start = b.length();

    if (mailingList.getName() != null) {
        writeValue(serializer, "name", mailingList.getName(), mailingList);
    }
    if (mailingList.getSubscribe() != null) {
        writeValue(serializer, "subscribe", mailingList.getSubscribe(), mailingList);
    }
    if (mailingList.getUnsubscribe() != null) {
        writeValue(serializer, "unsubscribe", mailingList.getUnsubscribe(), mailingList);
    }
    if (mailingList.getPost() != null) {
        writeValue(serializer, "post", mailingList.getPost(), mailingList);
    }
    if (mailingList.getArchive() != null) {
        writeValue(serializer, "archive", mailingList.getArchive(), mailingList);
    }
    if ((mailingList.getOtherArchives() != null) && (mailingList.getOtherArchives().size() > 0)) {
        serializer.startTag(NAMESPACE, "otherArchives");
        flush(serializer);
        InputLocation otherLoc = mailingList.getLocation("otherArchives");
        int index = 0;
        for (Iterator iter = mailingList.getOtherArchives().iterator(); iter.hasNext();) {
            String otherArchive = (String) iter.next();
            writeValue(serializer, "otherArchive", otherArchive, otherLoc, index);
            index = index + 1;
        }
        serializer.endTag(NAMESPACE, "otherArchives");
    }
    serializer.endTag(NAMESPACE, tagName).flush();
    logLocation(mailingList, "", start, b.length());

}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:LocationAwareMavenXpp3Writer.java


示例4: updateMailingList

import org.apache.maven.model.MailingList; //导入依赖的package包/类
/**
 * Method updateMailingList
 *
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateMailingList( MailingList value, String xmlTag, Counter counter, Element element )
{
    Element root = element;
    Counter innerCount = new Counter( counter.getDepth() + 1 );
    findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
    findAndReplaceSimpleElement( innerCount, root, "subscribe", value.getSubscribe(), null );
    findAndReplaceSimpleElement( innerCount, root, "unsubscribe", value.getUnsubscribe(), null );
    findAndReplaceSimpleElement( innerCount, root, "post", value.getPost(), null );
    findAndReplaceSimpleElement( innerCount, root, "archive", value.getArchive(), null );
    findAndReplaceSimpleLists( innerCount, root, value.getOtherArchives(), "otherArchives", "otherArchive" );
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:20,代码来源:MavenJDOMWriter.java


示例5: testProjectInheritance

import org.apache.maven.model.MailingList; //导入依赖的package包/类
public void testProjectInheritance()
    throws Exception
{
    MavenProject p4 = getProject( projectFile( "p4" ) );

    assertEquals( "p4", p4.getName() );

    // ----------------------------------------------------------------------
    // Value inherited from p3
    // ----------------------------------------------------------------------

    assertEquals( "2000", p4.getInceptionYear() );

    // ----------------------------------------------------------------------
    // Value taken from p2
    // ----------------------------------------------------------------------

    assertEquals( "mailing-list", ( (MailingList) p4.getMailingLists().get( 0 ) ).getName() );

    // ----------------------------------------------------------------------
    // Value taken from p1
    // ----------------------------------------------------------------------

    assertEquals( "scm-url/p2/p3/p4", p4.getScm().getUrl() );

    // ----------------------------------------------------------------------
    // Value taken from p4
    // ----------------------------------------------------------------------

    assertEquals( "Codehaus", p4.getOrganization().getName() );

    // ----------------------------------------------------------------------
    // Value taken from super model
    // ----------------------------------------------------------------------

    assertEquals( "4.0.0", p4.getModelVersion() );

    assertEquals( "4.0.0", p4.getModelVersion() );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:40,代码来源:ProjectInheritanceTest.java


示例6: mergeMailingList

import org.apache.maven.model.MailingList; //导入依赖的package包/类
protected void mergeMailingList( MailingList target, MailingList source, boolean sourceDominant,
                                 Map<Object, Object> context )
{
    mergeMailingList_Name( target, source, sourceDominant, context );
    mergeMailingList_Subscribe( target, source, sourceDominant, context );
    mergeMailingList_Unsubscribe( target, source, sourceDominant, context );
    mergeMailingList_Post( target, source, sourceDominant, context );
    mergeMailingList_OtherArchives( target, source, sourceDominant, context );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:10,代码来源:ModelMerger.java


示例7: mergeMailingList_Name

import org.apache.maven.model.MailingList; //导入依赖的package包/类
protected void mergeMailingList_Name( MailingList target, MailingList source, boolean sourceDominant,
                                      Map<Object, Object> context )
{
    String src = source.getName();
    if ( src != null )
    {
        if ( sourceDominant || target.getName() == null )
        {
            target.setName( src );
            target.setLocation( "name", source.getLocation( "name" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java


示例8: mergeMailingList_Subscribe

import org.apache.maven.model.MailingList; //导入依赖的package包/类
protected void mergeMailingList_Subscribe( MailingList target, MailingList source, boolean sourceDominant,
                                           Map<Object, Object> context )
{
    String src = source.getSubscribe();
    if ( src != null )
    {
        if ( sourceDominant || target.getSubscribe() == null )
        {
            target.setSubscribe( src );
            target.setLocation( "subscribe", source.getLocation( "subscribe" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java


示例9: mergeMailingList_Unsubscribe

import org.apache.maven.model.MailingList; //导入依赖的package包/类
protected void mergeMailingList_Unsubscribe( MailingList target, MailingList source, boolean sourceDominant,
                                             Map<Object, Object> context )
{
    String src = source.getUnsubscribe();
    if ( src != null )
    {
        if ( sourceDominant || target.getUnsubscribe() == null )
        {
            target.setUnsubscribe( src );
            target.setLocation( "unsubscribe", source.getLocation( "unsubscribe" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java


示例10: mergeMailingList_Post

import org.apache.maven.model.MailingList; //导入依赖的package包/类
protected void mergeMailingList_Post( MailingList target, MailingList source, boolean sourceDominant,
                                      Map<Object, Object> context )
{
    String src = source.getPost();
    if ( src != null )
    {
        if ( sourceDominant || target.getPost() == null )
        {
            target.setPost( src );
            target.setLocation( "post", source.getLocation( "post" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java


示例11: mergeMailingList_Archive

import org.apache.maven.model.MailingList; //导入依赖的package包/类
protected void mergeMailingList_Archive( MailingList target, MailingList source, boolean sourceDominant,
                                         Map<Object, Object> context )
{
    String src = source.getArchive();
    if ( src != null )
    {
        if ( sourceDominant || target.getArchive() == null )
        {
            target.setArchive( src );
            target.setLocation( "archive", source.getLocation( "archive" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java


示例12: mergeMailingList_OtherArchives

import org.apache.maven.model.MailingList; //导入依赖的package包/类
protected void mergeMailingList_OtherArchives( MailingList target, MailingList source, boolean sourceDominant,
                                               Map<Object, Object> context )
{
    List<String> src = source.getOtherArchives();
    if ( !src.isEmpty() )
    {
        List<String> tgt = target.getOtherArchives();
        List<String> merged = new ArrayList<String>( tgt.size() + src.size() );
        merged.addAll( tgt );
        merged.addAll( src );
        target.setOtherArchives( merged );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java


示例13: mergeModel_MailingLists

import org.apache.maven.model.MailingList; //导入依赖的package包/类
@Override
protected void mergeModel_MailingLists( Model target, Model source, boolean sourceDominant,
                                        Map<Object, Object> context )
{
    if ( target.getMailingLists().isEmpty() )
    {
        target.setMailingLists( new ArrayList<MailingList>( source.getMailingLists() ) );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:10,代码来源:MavenModelMerger.java


示例14: replaceMailingList

import org.apache.maven.model.MailingList; //导入依赖的package包/类
@Override
public MailingList replaceMailingList( MailingList mailingList )
{
    return mailingList;
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:6,代码来源:AbstractModelVisitor.java


示例15: visitMailingList

import org.apache.maven.model.MailingList; //导入依赖的package包/类
@Override
public void visitMailingList( MailingList mailingList )
{
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:5,代码来源:AbstractModelVisitor.java


示例16: get

import org.apache.maven.model.MailingList; //导入依赖的package包/类
@Override
public List<MailingList> get( Model model )
{
    return model.getMailingLists();
}
 
开发者ID:mojohaus,项目名称:flatten-maven-plugin,代码行数:6,代码来源:PomProperty.java


示例17: set

import org.apache.maven.model.MailingList; //导入依赖的package包/类
@Override
public void set( Model model, List<MailingList> value )
{
    model.setMailingLists( value );
}
 
开发者ID:mojohaus,项目名称:flatten-maven-plugin,代码行数:6,代码来源:PomProperty.java


示例18: iterateMailingList

import org.apache.maven.model.MailingList; //导入依赖的package包/类
/**
 * Method iterateMailingList
 *
 * @param counter
 * @param childTag
 * @param parentTag
 * @param list
 * @param parent
 */
protected void iterateMailingList( Counter counter, Element parent, java.util.Collection list,
                                   java.lang.String parentTag, java.lang.String childTag )
{
    boolean shouldExist = list != null && list.size() > 0;
    Element element = updateElement( counter, parent, parentTag, shouldExist );
    if ( shouldExist )
    {
        Iterator it = list.iterator();
        Iterator elIt = element.getChildren( childTag, element.getNamespace() ).iterator();
        if ( !elIt.hasNext() )
        {
            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() )
                {
                    elIt = null;
                }
            }
            else
            {
                el = factory.element( childTag, element.getNamespace() );
                insertAtPreferredLocation( element, el, innerCount );
            }
            updateMailingList( value, childTag, innerCount, el );
            innerCount.increaseCount();
        }
        if ( elIt != null )
        {
            while ( elIt.hasNext() )
            {
                elIt.next();
                elIt.remove();
            }
        }
    }
}
 
开发者ID:immutables,项目名称:maven-shade-plugin,代码行数:54,代码来源:MavenJDOMWriter.java


示例19: setMailingLists

import org.apache.maven.model.MailingList; //导入依赖的package包/类
public void setMailingLists( List<MailingList> mailingLists )
{
    getModel().setMailingLists( mailingLists );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:MavenProject.java


示例20: getMailingLists

import org.apache.maven.model.MailingList; //导入依赖的package包/类
public List<MailingList> getMailingLists()
{
    return getModel().getMailingLists();
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:MavenProject.java



注:本文中的org.apache.maven.model.MailingList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Utils类代码示例发布时间:2022-05-22
下一篇:
Java LiteLoader类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap