View Javadoc

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