1
2
3
4
5
6
7
8 package org.apache.maven.continuum.model.scm.v1_0_9;
9
10
11
12
13
14 import org.apache.maven.continuum.model.project.v1_0_9.BuildDefinition;
15 import org.apache.maven.continuum.model.project.v1_0_9.BuildResult;
16 import org.apache.maven.continuum.model.project.v1_0_9.ContinuumDatabase;
17 import org.apache.maven.continuum.model.project.v1_0_9.Project;
18 import org.apache.maven.continuum.model.project.v1_0_9.ProjectDependency;
19 import org.apache.maven.continuum.model.project.v1_0_9.ProjectDeveloper;
20 import org.apache.maven.continuum.model.project.v1_0_9.ProjectGroup;
21 import org.apache.maven.continuum.model.project.v1_0_9.ProjectNotifier;
22 import org.apache.maven.continuum.model.project.v1_0_9.Schedule;
23 import org.apache.maven.continuum.model.system.v1_0_9.NotificationAddress;
24 import org.apache.maven.continuum.model.system.v1_0_9.SystemConfiguration;
25
26
27
28
29
30
31 @SuppressWarnings( "all" )
32 public class ChangeSet
33 implements java.io.Serializable
34 {
35
36
37
38
39
40
41
42
43 private String author;
44
45
46
47
48 private String comment;
49
50
51
52
53 private long date = 0L;
54
55
56
57
58 private java.util.List<ChangeFile> files;
59
60
61
62
63
64
65
66
67
68
69
70 public void addFile( ChangeFile changeFile )
71 {
72 getFiles().add( changeFile );
73 }
74
75
76
77
78
79
80 public String getAuthor()
81 {
82 return this.author;
83 }
84
85
86
87
88
89
90 public String getComment()
91 {
92 return this.comment;
93 }
94
95
96
97
98
99
100 public long getDate()
101 {
102 return this.date;
103 }
104
105
106
107
108
109
110 public java.util.List<ChangeFile> getFiles()
111 {
112 if ( this.files == null )
113 {
114 this.files = new java.util.ArrayList<ChangeFile>();
115 }
116
117 return this.files;
118 }
119
120
121
122
123
124
125 public void removeFile( ChangeFile changeFile )
126 {
127 getFiles().remove( changeFile );
128 }
129
130
131
132
133
134
135 public void setAuthor( String author )
136 {
137 this.author = author;
138 }
139
140
141
142
143
144
145 public void setComment( String comment )
146 {
147 this.comment = comment;
148 }
149
150
151
152
153
154
155 public void setDate( long date )
156 {
157 this.date = date;
158 }
159
160
161
162
163
164
165 public void setFiles( java.util.List<ChangeFile> files )
166 {
167 this.files = files;
168 }
169
170
171
172
173
174 public String toString()
175 {
176 String result = author + "\n" + date + "\n";
177
178 if ( files != null )
179 {
180 for ( java.util.Iterator i = files.iterator(); i.hasNext(); )
181 {
182 ChangeFile file = (ChangeFile) i.next();
183
184 result += file + "\n";
185 }
186 }
187
188 result += comment;
189
190 return result;
191 }
192
193
194
195
196 public boolean equals( Object obj )
197 {
198 if ( obj instanceof ChangeSet )
199 {
200 ChangeSet changeSet = (ChangeSet) obj;
201
202 if ( toString().equals( changeSet.toString() ) )
203 {
204 return true;
205 }
206 }
207
208 return false;
209 }
210
211 public java.util.Date getDateAsDate()
212 {
213 if ( date > 0 )
214 {
215 return new java.util.Date( date );
216 }
217
218 return null;
219 }
220
221 }