1package org.apache.archiva.metadata.model;
23import javax.xml.bind.annotation.XmlRootElement;
4import java.io.Serializable;
5import java.util.List;
67/*8 * Licensed to the Apache Software Foundation (ASF) under one9 * or more contributor license agreements. See the NOTICE file10 * distributed with this work for additional information11 * regarding copyright ownership. The ASF licenses this file12 * to you under the Apache License, Version 2.0 (the13 * "License"); you may not use this file except in compliance14 * with the License. You may obtain a copy of the License at15 *16 * http://www.apache.org/licenses/LICENSE-2.017 *18 * Unless required by applicable law or agreed to in writing,19 * software distributed under the License is distributed on an20 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY21 * KIND, either express or implied. See the License for the22 * specific language governing permissions and limitations23 * under the License.24 */2526/**27 * Information about the available mailing lists for communicating with the project.28 *29 * TODO considering moving this to a facet - avoid referring to it externally30 */31 @XmlRootElement(name = "mailingList")
32publicclassMailingList33implements Serializable, Comparable<MailingList>
34 {
3536private Integer index;
3738/**39 * The primary archive URL for this mailing list.40 */41private String mainArchiveUrl;
4243/**44 * A list of other URLs to archives of the mailing list.45 */46private List<String> otherArchives;
4748/**49 * The name of the mailing list, eg. <i>Archiva Developers List</i>.50 */51private String name;
5253/**54 * The email address to post a new message to the mailing list, if applicable.55 */56private String postAddress;
5758/**59 * The email address to send a message to to subscribe to the mailing list, if applicable.60 */61private String subscribeAddress;
6263/**64 * The email address to send a message to to unsubscribe from the mailing list, if applicable.65 */66private String unsubscribeAddress;
6768publicvoid setMainArchiveUrl( String mainArchiveUrl )
69 {
70this.mainArchiveUrl = mainArchiveUrl;
71 }
7273public String getMainArchiveUrl()
74 {
75return mainArchiveUrl;
76 }
7778publicvoid setOtherArchives( List<String> otherArchives )
79 {
80this.otherArchives = otherArchives;
81 }
8283public List<String> getOtherArchives()
84 {
85return otherArchives;
86 }
8788publicvoid setName( String name )
89 {
90this.name = name;
91 }
9293publicvoid setPostAddress( String postAddress )
94 {
95this.postAddress = postAddress;
96 }
9798publicvoid setSubscribeAddress( String subscribeAddress )
99 {
100this.subscribeAddress = subscribeAddress;
101 }
102103publicvoid setUnsubscribeAddress( String unsubscribeAddress )
104 {
105this.unsubscribeAddress = unsubscribeAddress;
106 }
107108public String getSubscribeAddress()
109 {
110return subscribeAddress;
111 }
112113public String getUnsubscribeAddress()
114 {
115return unsubscribeAddress;
116 }
117118public String getPostAddress()
119 {
120return postAddress;
121 }
122123public String getName()
124 {
125return name;
126 }
127128 @Override
129public String toString()
130 {
131return"MailingList{" +
132"mainArchiveUrl='" + mainArchiveUrl + '\'' +
133", otherArchives=" + otherArchives +
134", name='" + name + '\'' +
135", postAddress='" + postAddress + '\'' +
136", subscribeAddress='" + subscribeAddress + '\'' +
137", unsubscribeAddress='" + unsubscribeAddress + '\'' +
138 '}';
139 }
140141public Integer getIndex() {
142return index;
143 }
144145publicvoid setIndex(Integer index) {
146this.index = index;
147 }
148149 @Override
150publicint compareTo(MailingList o) {
151returnthis.index.compareTo(o.getIndex());
152 }
153 }