This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.metadata.model;
002
003import javax.xml.bind.annotation.XmlRootElement;
004import java.io.Serializable;
005import java.util.List;
006
007/*
008 * Licensed to the Apache Software Foundation (ASF) under one
009 * or more contributor license agreements.  See the NOTICE file
010 * distributed with this work for additional information
011 * regarding copyright ownership.  The ASF licenses this file
012 * to you under the Apache License, Version 2.0 (the
013 * "License"); you may not use this file except in compliance
014 * with the License.  You may obtain a copy of the License at
015 *
016 *   http://www.apache.org/licenses/LICENSE-2.0
017 *
018 * Unless required by applicable law or agreed to in writing,
019 * software distributed under the License is distributed on an
020 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
021 * KIND, either express or implied.  See the License for the
022 * specific language governing permissions and limitations
023 * under the License.
024 */
025
026/**
027 * Information about the available mailing lists for communicating with the project.
028 *
029 * TODO considering moving this to a facet - avoid referring to it externally
030 */
031@XmlRootElement(name = "mailingList")
032public class MailingList
033    implements Serializable, Comparable<MailingList>
034{
035
036    private Integer index;
037
038    /**
039     * The primary archive URL for this mailing list.
040     */
041    private String mainArchiveUrl;
042
043    /**
044     * A list of other URLs to archives of the mailing list.
045     */
046    private List<String> otherArchives;
047
048    /**
049     * The name of the mailing list, eg. <i>Archiva Developers List</i>.
050     */
051    private String name;
052
053    /**
054     * The email address to post a new message to the mailing list, if applicable.
055     */
056    private String postAddress;
057
058    /**
059     * The email address to send a message to to subscribe to the mailing list, if applicable.
060     */
061    private String subscribeAddress;
062
063    /**
064     * The email address to send a message to to unsubscribe from the mailing list, if applicable.
065     */
066    private String unsubscribeAddress;
067
068    public void setMainArchiveUrl( String mainArchiveUrl )
069    {
070        this.mainArchiveUrl = mainArchiveUrl;
071    }
072
073    public String getMainArchiveUrl()
074    {
075        return mainArchiveUrl;
076    }
077
078    public void setOtherArchives( List<String> otherArchives )
079    {
080        this.otherArchives = otherArchives;
081    }
082
083    public List<String> getOtherArchives()
084    {
085        return otherArchives;
086    }
087
088    public void setName( String name )
089    {
090        this.name = name;
091    }
092
093    public void setPostAddress( String postAddress )
094    {
095        this.postAddress = postAddress;
096    }
097
098    public void setSubscribeAddress( String subscribeAddress )
099    {
100        this.subscribeAddress = subscribeAddress;
101    }
102
103    public void setUnsubscribeAddress( String unsubscribeAddress )
104    {
105        this.unsubscribeAddress = unsubscribeAddress;
106    }
107
108    public String getSubscribeAddress()
109    {
110        return subscribeAddress;
111    }
112
113    public String getUnsubscribeAddress()
114    {
115        return unsubscribeAddress;
116    }
117
118    public String getPostAddress()
119    {
120        return postAddress;
121    }
122
123    public String getName()
124    {
125        return name;
126    }
127
128    @Override
129    public String toString()
130    {
131        return "MailingList{" +
132            "mainArchiveUrl='" + mainArchiveUrl + '\'' +
133            ", otherArchives=" + otherArchives +
134            ", name='" + name + '\'' +
135            ", postAddress='" + postAddress + '\'' +
136            ", subscribeAddress='" + subscribeAddress + '\'' +
137            ", unsubscribeAddress='" + unsubscribeAddress + '\'' +
138            '}';
139    }
140
141    public Integer getIndex() {
142        return index;
143    }
144
145    public void setIndex(Integer index) {
146        this.index = index;
147    }
148
149    @Override
150    public int compareTo(MailingList o) {
151        return this.index.compareTo(o.getIndex());
152    }
153}