View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.continuum.xmlrpc.scm;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
15  import org.apache.continuum.xmlrpc.repository.AbstractPurgeConfiguration;
16  import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
17  import org.apache.continuum.xmlrpc.repository.LocalRepository;
18  import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
19  import org.apache.continuum.xmlrpc.utils.BuildTrigger;
20  import org.apache.maven.continuum.xmlrpc.project.AddingResult;
21  import org.apache.maven.continuum.xmlrpc.project.BuildAgentConfiguration;
22  import org.apache.maven.continuum.xmlrpc.project.BuildAgentGroupConfiguration;
23  import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
24  import org.apache.maven.continuum.xmlrpc.project.BuildDefinitionTemplate;
25  import org.apache.maven.continuum.xmlrpc.project.BuildProjectTask;
26  import org.apache.maven.continuum.xmlrpc.project.BuildResult;
27  import org.apache.maven.continuum.xmlrpc.project.BuildResultSummary;
28  import org.apache.maven.continuum.xmlrpc.project.ContinuumProjectState;
29  import org.apache.maven.continuum.xmlrpc.project.Project;
30  import org.apache.maven.continuum.xmlrpc.project.ProjectDependency;
31  import org.apache.maven.continuum.xmlrpc.project.ProjectDeveloper;
32  import org.apache.maven.continuum.xmlrpc.project.ProjectGroup;
33  import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
34  import org.apache.maven.continuum.xmlrpc.project.ProjectNotifier;
35  import org.apache.maven.continuum.xmlrpc.project.ProjectScmRoot;
36  import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
37  import org.apache.maven.continuum.xmlrpc.project.ReleaseListenerSummary;
38  import org.apache.maven.continuum.xmlrpc.project.Schedule;
39  import org.apache.maven.continuum.xmlrpc.system.Installation;
40  import org.apache.maven.continuum.xmlrpc.system.Profile;
41  import org.apache.maven.continuum.xmlrpc.system.SystemConfiguration;
42  
43  /**
44   * Class ChangeSet.
45   * 
46   * @version $Revision$ $Date$
47   */
48  @SuppressWarnings( "all" )
49  public class ChangeSet
50      implements java.io.Serializable
51  {
52  
53        //--------------------------/
54       //- Class/Member Variables -/
55      //--------------------------/
56  
57      /**
58       * Field id.
59       */
60      private String id;
61  
62      /**
63       * Field author.
64       */
65      private String author;
66  
67      /**
68       * Field comment.
69       */
70      private String comment;
71  
72      /**
73       * Field date.
74       */
75      private long date = 0L;
76  
77      /**
78       * Field files.
79       */
80      private java.util.List<ChangeFile> files;
81  
82  
83        //-----------/
84       //- Methods -/
85      //-----------/
86  
87      /**
88       * Method addFile.
89       * 
90       * @param changeFile
91       */
92      public void addFile( ChangeFile changeFile )
93      {
94          getFiles().add( changeFile );
95      } //-- void addFile( ChangeFile )
96  
97      /**
98       * Get the author field.
99       * 
100      * @return String
101      */
102     public String getAuthor()
103     {
104         return this.author;
105     } //-- String getAuthor()
106 
107     /**
108      * Get the comment field.
109      * 
110      * @return String
111      */
112     public String getComment()
113     {
114         return this.comment;
115     } //-- String getComment()
116 
117     /**
118      * Get the date field.
119      * 
120      * @return long
121      */
122     public long getDate()
123     {
124         return this.date;
125     } //-- long getDate()
126 
127     /**
128      * Method getFiles.
129      * 
130      * @return List
131      */
132     public java.util.List<ChangeFile> getFiles()
133     {
134         if ( this.files == null )
135         {
136             this.files = new java.util.ArrayList<ChangeFile>();
137         }
138 
139         return this.files;
140     } //-- java.util.List<ChangeFile> getFiles()
141 
142     /**
143      * Get the id field.
144      * 
145      * @return String
146      */
147     public String getId()
148     {
149         return this.id;
150     } //-- String getId()
151 
152     /**
153      * Method removeFile.
154      * 
155      * @param changeFile
156      */
157     public void removeFile( ChangeFile changeFile )
158     {
159         getFiles().remove( changeFile );
160     } //-- void removeFile( ChangeFile )
161 
162     /**
163      * Set the author field.
164      * 
165      * @param author
166      */
167     public void setAuthor( String author )
168     {
169         this.author = author;
170     } //-- void setAuthor( String )
171 
172     /**
173      * Set the comment field.
174      * 
175      * @param comment
176      */
177     public void setComment( String comment )
178     {
179         this.comment = comment;
180     } //-- void setComment( String )
181 
182     /**
183      * Set the date field.
184      * 
185      * @param date
186      */
187     public void setDate( long date )
188     {
189         this.date = date;
190     } //-- void setDate( long )
191 
192     /**
193      * Set the files field.
194      * 
195      * @param files
196      */
197     public void setFiles( java.util.List<ChangeFile> files )
198     {
199         this.files = files;
200     } //-- void setFiles( java.util.List )
201 
202     /**
203      * Set the id field.
204      * 
205      * @param id
206      */
207     public void setId( String id )
208     {
209         this.id = id;
210     } //-- void setId( String )
211 
212     
213             /**
214              * @return Returns string representation of the changeset
215              */
216             public String toString()
217             {
218                 String result = author + "\n" + date + "\n";
219 
220                 if ( files != null )
221                 {
222                     for ( java.util.Iterator i = files.iterator(); i.hasNext(); )
223                     {
224                         ChangeFile file = (ChangeFile) i.next();
225 
226                         result += file + "\n";
227                     }
228                 }
229 
230                 result += comment;
231 
232                 return result;
233             }
234 
235             /**
236              * @see java.lang.Object#equals(java.lang.Object)
237              */
238             public boolean equals( Object obj )
239             {
240                 if ( obj instanceof ChangeSet )
241                 {
242                     ChangeSet changeSet = (ChangeSet) obj;
243 
244                     if ( toString().equals( changeSet.toString() ) )
245                     {
246                         return true;
247                     }
248                 }
249 
250                 return false;
251             }
252 
253             public java.util.Date getDateAsDate()
254             {
255                 if ( date > 0 )
256                 {
257                     return new java.util.Date( date );
258                 }
259 
260                 return null;
261             }
262           
263 }