View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.plugins.changes.issues;
20  
21  import java.util.ArrayList;
22  import java.util.Date;
23  import java.util.List;
24  
25  /**
26   * An issue.
27   *
28   * @author Dennis Lundberg
29   * @version $Id$
30   * @since 2.4
31   */
32  public class Issue {
33      private String assignee;
34  
35      private List<String> components;
36  
37      private Date created;
38  
39      private List<String> fixVersions;
40  
41      private String id;
42  
43      private String key;
44  
45      private String link;
46  
47      private String priority;
48  
49      private String reporter;
50  
51      private String resolution;
52  
53      private String status;
54  
55      private String summary;
56  
57      private String type;
58  
59      private Date updated;
60  
61      private String version;
62  
63      public Issue() {}
64  
65      public String getAssignee() {
66          return assignee;
67      }
68  
69      public void setAssignee(String assignee) {
70          this.assignee = assignee;
71      }
72  
73      public List<String> getComponents() {
74          return components;
75      }
76  
77      public void addComponent(String component) {
78          if (components == null) {
79              components = new ArrayList<>();
80          }
81          components.add(component);
82      }
83  
84      public Date getCreated() {
85          return created;
86      }
87  
88      public void setCreated(Date created) {
89          this.created = created;
90      }
91  
92      public List<String> getFixVersions() {
93          return fixVersions;
94      }
95  
96      public void addFixVersion(String fixVersion) {
97          if (fixVersions == null) {
98              fixVersions = new ArrayList<>();
99          }
100         fixVersions.add(fixVersion);
101     }
102 
103     public String getId() {
104         return id;
105     }
106 
107     public void setId(String id) {
108         this.id = id;
109     }
110 
111     public String getKey() {
112         return key;
113     }
114 
115     public void setKey(String key) {
116         this.key = key;
117     }
118 
119     public String getLink() {
120         return link;
121     }
122 
123     public void setLink(String link) {
124         this.link = link;
125     }
126 
127     public String getPriority() {
128         return priority;
129     }
130 
131     public void setPriority(String priority) {
132         this.priority = priority;
133     }
134 
135     public String getReporter() {
136         return reporter;
137     }
138 
139     public void setReporter(String reporter) {
140         this.reporter = reporter;
141     }
142 
143     public String getResolution() {
144         return resolution;
145     }
146 
147     public void setResolution(String resolution) {
148         this.resolution = resolution;
149     }
150 
151     public String getStatus() {
152         return status;
153     }
154 
155     public void setStatus(String status) {
156         this.status = status;
157     }
158 
159     public String getSummary() {
160         return summary;
161     }
162 
163     public void setSummary(String summary) {
164         this.summary = summary;
165     }
166 
167     public String getType() {
168         return type;
169     }
170 
171     public void setType(String type) {
172         this.type = type;
173     }
174 
175     public Date getUpdated() {
176         return updated;
177     }
178 
179     public void setUpdated(Date updated) {
180         this.updated = updated;
181     }
182 
183     public String getVersion() {
184         return version;
185     }
186 
187     public void setVersion(String version) {
188         this.version = version;
189     }
190 
191     public String toString() {
192         return this.getClass().getSimpleName() + "[id='" + this.getId() + "'" + ", summary='" + this.getSummary() + "'"
193                 + ", fixVersions='" + this.getFixVersions() + "'" + "]";
194     }
195 }