This project has retired. For details please refer to its Attic page.
MailingList xref
View Javadoc
1   package org.apache.archiva.metadata.model;
2   
3   import javax.xml.bind.annotation.XmlRootElement;
4   import java.io.Serializable;
5   import java.util.List;
6   
7   /*
8    * Licensed to the Apache Software Foundation (ASF) under one
9    * or more contributor license agreements.  See the NOTICE file
10   * distributed with this work for additional information
11   * regarding copyright ownership.  The ASF licenses this file
12   * to you under the Apache License, Version 2.0 (the
13   * "License"); you may not use this file except in compliance
14   * with the License.  You may obtain a copy of the License at
15   *
16   *   http://www.apache.org/licenses/LICENSE-2.0
17   *
18   * Unless required by applicable law or agreed to in writing,
19   * software distributed under the License is distributed on an
20   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21   * KIND, either express or implied.  See the License for the
22   * specific language governing permissions and limitations
23   * under the License.
24   */
25  
26  /**
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 externally
30   */
31  @XmlRootElement(name = "mailingList")
32  public class MailingList
33      implements Serializable, Comparable<MailingList>
34  {
35  
36      private Integer index;
37  
38      /**
39       * The primary archive URL for this mailing list.
40       */
41      private String mainArchiveUrl;
42  
43      /**
44       * A list of other URLs to archives of the mailing list.
45       */
46      private List<String> otherArchives;
47  
48      /**
49       * The name of the mailing list, eg. <i>Archiva Developers List</i>.
50       */
51      private String name;
52  
53      /**
54       * The email address to post a new message to the mailing list, if applicable.
55       */
56      private String postAddress;
57  
58      /**
59       * The email address to send a message to to subscribe to the mailing list, if applicable.
60       */
61      private String subscribeAddress;
62  
63      /**
64       * The email address to send a message to to unsubscribe from the mailing list, if applicable.
65       */
66      private String unsubscribeAddress;
67  
68      public void setMainArchiveUrl( String mainArchiveUrl )
69      {
70          this.mainArchiveUrl = mainArchiveUrl;
71      }
72  
73      public String getMainArchiveUrl()
74      {
75          return mainArchiveUrl;
76      }
77  
78      public void setOtherArchives( List<String> otherArchives )
79      {
80          this.otherArchives = otherArchives;
81      }
82  
83      public List<String> getOtherArchives()
84      {
85          return otherArchives;
86      }
87  
88      public void setName( String name )
89      {
90          this.name = name;
91      }
92  
93      public void setPostAddress( String postAddress )
94      {
95          this.postAddress = postAddress;
96      }
97  
98      public void setSubscribeAddress( String subscribeAddress )
99      {
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 }