View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.1 on 2011-09-18 11:21:46,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.continuum.model.project;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import java.util.Collection;
15  import org.apache.continuum.model.project.ProjectScmRoot;
16  import org.apache.continuum.model.release.ContinuumReleaseResult;
17  import org.apache.continuum.model.repository.AbstractPurgeConfiguration;
18  import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
19  import org.apache.continuum.model.repository.LocalRepository;
20  import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
21  import org.apache.maven.continuum.model.scm.ChangeFile;
22  import org.apache.maven.continuum.model.scm.ChangeSet;
23  import org.apache.maven.continuum.model.scm.ScmResult;
24  import org.apache.maven.continuum.model.system.Installation;
25  import org.apache.maven.continuum.model.system.NotificationAddress;
26  import org.apache.maven.continuum.model.system.Profile;
27  import org.apache.maven.continuum.model.system.SystemConfiguration;
28  import org.apache.maven.continuum.project.ContinuumProjectState;
29  
30  /**
31   * Class Project.
32   * 
33   * @version $Revision$ $Date$
34   */
35  @SuppressWarnings( "all" )
36  public class Project
37      implements java.io.Serializable
38  {
39  
40        //--------------------------/
41       //- Class/Member Variables -/
42      //--------------------------/
43  
44      /**
45       * Field id.
46       */
47      private int id = 0;
48  
49      /**
50       * Field groupId.
51       */
52      private String groupId;
53  
54      /**
55       * Field artifactId.
56       */
57      private String artifactId;
58  
59      /**
60       * Field executorId.
61       */
62      private String executorId;
63  
64      /**
65       * Field name.
66       */
67      private String name;
68  
69      /**
70       * Field description.
71       */
72      private String description;
73  
74      /**
75       * Field url.
76       */
77      private String url;
78  
79      /**
80       * Field scmUrl.
81       */
82      private String scmUrl;
83  
84      /**
85       * Field scmTag.
86       */
87      private String scmTag;
88  
89      /**
90       * Field scmUsername.
91       */
92      private String scmUsername;
93  
94      /**
95       * Field scmPassword.
96       */
97      private String scmPassword;
98  
99      /**
100      * Field scmUseCache.
101      */
102     private boolean scmUseCache = false;
103 
104     /**
105      * Field version.
106      */
107     private String version;
108 
109     /**
110      * Field state.
111      */
112     private int state = 1;
113 
114     /**
115      * Field oldState.
116      */
117     private int oldState = 0;
118 
119     /**
120      * Field latestBuildId.
121      */
122     private int latestBuildId = 0;
123 
124     /**
125      * Field buildNumber.
126      */
127     private int buildNumber = 0;
128 
129     /**
130      * Field workingDirectory.
131      */
132     private String workingDirectory;
133 
134     /**
135      * Field relativePath.
136      */
137     private String relativePath;
138 
139     /**
140      * Field buildResults.
141      */
142     private java.util.List<BuildResult> buildResults;
143 
144     /**
145      * Field checkoutResult.
146      */
147     private ScmResult checkoutResult;
148 
149     /**
150      * Field developers.
151      */
152     private java.util.List<ProjectDeveloper> developers;
153 
154     /**
155      * Field parent.
156      */
157     private ProjectDependency parent;
158 
159     /**
160      * Field dependencies.
161      */
162     private java.util.List<ProjectDependency> dependencies;
163 
164     /**
165      * Field projectGroup.
166      */
167     private ProjectGroup projectGroup;
168 
169     /**
170      * Field notifiers.
171      */
172     private java.util.List<ProjectNotifier> notifiers;
173 
174     /**
175      * Field buildDefinitions.
176      */
177     private java.util.List<BuildDefinition> buildDefinitions;
178 
179 
180       //-----------/
181      //- Methods -/
182     //-----------/
183 
184     /**
185      * Method addBuildDefinition.
186      * 
187      * @param buildDefinition
188      */
189     public void addBuildDefinition( BuildDefinition buildDefinition )
190     {
191         getBuildDefinitions().add( buildDefinition );
192     } //-- void addBuildDefinition( BuildDefinition )
193 
194     /**
195      * Method addBuildResult.
196      * 
197      * @param buildResult
198      */
199     public void addBuildResult( BuildResult buildResult )
200     {
201         getBuildResults().add( buildResult );
202         buildResult.createProjectAssociation( this );
203     } //-- void addBuildResult( BuildResult )
204 
205     /**
206      * Method addDependency.
207      * 
208      * @param projectDependency
209      */
210     public void addDependency( ProjectDependency projectDependency )
211     {
212         getDependencies().add( projectDependency );
213     } //-- void addDependency( ProjectDependency )
214 
215     /**
216      * Method addDeveloper.
217      * 
218      * @param projectDeveloper
219      */
220     public void addDeveloper( ProjectDeveloper projectDeveloper )
221     {
222         getDevelopers().add( projectDeveloper );
223     } //-- void addDeveloper( ProjectDeveloper )
224 
225     /**
226      * Method addNotifier.
227      * 
228      * @param projectNotifier
229      */
230     public void addNotifier( ProjectNotifier projectNotifier )
231     {
232         getNotifiers().add( projectNotifier );
233     } //-- void addNotifier( ProjectNotifier )
234 
235     /**
236      * Method breakBuildResultAssociation.
237      * 
238      * @param buildResult
239      */
240     public void breakBuildResultAssociation( BuildResult buildResult )
241     {
242         if ( ! getBuildResults().contains( buildResult ) )
243         {
244             throw new IllegalStateException( "buildResult isn't associated." );
245         }
246 
247         getBuildResults().remove( buildResult );
248     } //-- void breakBuildResultAssociation( BuildResult )
249 
250     /**
251      * Method breakProjectGroupAssociation.
252      * 
253      * @param projectGroup
254      */
255     public void breakProjectGroupAssociation( ProjectGroup projectGroup )
256     {
257         if ( this.projectGroup != projectGroup )
258         {
259             throw new IllegalStateException( "projectGroup isn't associated." );
260         }
261 
262         this.projectGroup = null;
263     } //-- void breakProjectGroupAssociation( ProjectGroup )
264 
265     /**
266      * Method createBuildResultAssociation.
267      * 
268      * @param buildResult
269      */
270     public void createBuildResultAssociation( BuildResult buildResult )
271     {
272         Collection buildResults = getBuildResults();
273 
274         if ( buildResults.contains( buildResult ) )
275         {
276             throw new IllegalStateException( "buildResult is already assigned." );
277         }
278 
279         buildResults.add( buildResult );
280     } //-- void createBuildResultAssociation( BuildResult )
281 
282     /**
283      * Method createProjectGroupAssociation.
284      * 
285      * @param projectGroup
286      */
287     public void createProjectGroupAssociation( ProjectGroup projectGroup )
288     {
289         if ( this.projectGroup != null )
290         {
291             breakProjectGroupAssociation( this.projectGroup );
292         }
293 
294         this.projectGroup = projectGroup;
295     } //-- void createProjectGroupAssociation( ProjectGroup )
296 
297     /**
298      * Method equals.
299      * 
300      * @param other
301      * @return boolean
302      */
303     public boolean equals( Object other )
304     {
305         if ( this == other )
306         {
307             return true;
308         }
309 
310         if ( !( other instanceof Project ) )
311         {
312             return false;
313         }
314 
315         Project that = (Project) other;
316         boolean result = true;
317 
318         result = result && id == that.id;
319 
320         return result;
321     } //-- boolean equals( Object )
322 
323     /**
324      * Get the artifactId field.
325      * 
326      * @return String
327      */
328     public String getArtifactId()
329     {
330         return this.artifactId;
331     } //-- String getArtifactId()
332 
333     /**
334      * Method getBuildDefinitions.
335      * 
336      * @return List
337      */
338     public java.util.List<BuildDefinition> getBuildDefinitions()
339     {
340         if ( this.buildDefinitions == null )
341         {
342             this.buildDefinitions = new java.util.ArrayList<BuildDefinition>();
343         }
344 
345         return this.buildDefinitions;
346     } //-- java.util.List<BuildDefinition> getBuildDefinitions()
347 
348     /**
349      * Get the buildNumber field.
350      * 
351      * @return int
352      */
353     public int getBuildNumber()
354     {
355         return this.buildNumber;
356     } //-- int getBuildNumber()
357 
358     /**
359      * Method getBuildResults.
360      * 
361      * @return List
362      */
363     public java.util.List<BuildResult> getBuildResults()
364     {
365         if ( this.buildResults == null )
366         {
367             this.buildResults = new java.util.ArrayList<BuildResult>();
368         }
369 
370         return this.buildResults;
371     } //-- java.util.List<BuildResult> getBuildResults()
372 
373     /**
374      * Get the checkoutResult field.
375      * 
376      * @return ScmResult
377      */
378     public ScmResult getCheckoutResult()
379     {
380         return this.checkoutResult;
381     } //-- ScmResult getCheckoutResult()
382 
383     /**
384      * Method getDependencies.
385      * 
386      * @return List
387      */
388     public java.util.List<ProjectDependency> getDependencies()
389     {
390         if ( this.dependencies == null )
391         {
392             this.dependencies = new java.util.ArrayList<ProjectDependency>();
393         }
394 
395         return this.dependencies;
396     } //-- java.util.List<ProjectDependency> getDependencies()
397 
398     /**
399      * Get the description field.
400      * 
401      * @return String
402      */
403     public String getDescription()
404     {
405         return this.description;
406     } //-- String getDescription()
407 
408     /**
409      * Method getDevelopers.
410      * 
411      * @return List
412      */
413     public java.util.List<ProjectDeveloper> getDevelopers()
414     {
415         if ( this.developers == null )
416         {
417             this.developers = new java.util.ArrayList<ProjectDeveloper>();
418         }
419 
420         return this.developers;
421     } //-- java.util.List<ProjectDeveloper> getDevelopers()
422 
423     /**
424      * Get the executorId field.
425      * 
426      * @return String
427      */
428     public String getExecutorId()
429     {
430         return this.executorId;
431     } //-- String getExecutorId()
432 
433     /**
434      * Get the groupId field.
435      * 
436      * @return String
437      */
438     public String getGroupId()
439     {
440         return this.groupId;
441     } //-- String getGroupId()
442 
443     /**
444      * Get the id field.
445      * 
446      * @return int
447      */
448     public int getId()
449     {
450         return this.id;
451     } //-- int getId()
452 
453     /**
454      * Get the latestBuildId field.
455      * 
456      * @return int
457      */
458     public int getLatestBuildId()
459     {
460         return this.latestBuildId;
461     } //-- int getLatestBuildId()
462 
463     /**
464      * Get the name field.
465      * 
466      * @return String
467      */
468     public String getName()
469     {
470         return this.name;
471     } //-- String getName()
472 
473     /**
474      * Method getNotifiers.
475      * 
476      * @return List
477      */
478     public java.util.List<ProjectNotifier> getNotifiers()
479     {
480         if ( this.notifiers == null )
481         {
482             this.notifiers = new java.util.ArrayList<ProjectNotifier>();
483         }
484 
485         return this.notifiers;
486     } //-- java.util.List<ProjectNotifier> getNotifiers()
487 
488     /**
489      * Get the oldState field.
490      * 
491      * @return int
492      */
493     public int getOldState()
494     {
495         return this.oldState;
496     } //-- int getOldState()
497 
498     /**
499      * Get the parent field.
500      * 
501      * @return ProjectDependency
502      */
503     public ProjectDependency getParent()
504     {
505         return this.parent;
506     } //-- ProjectDependency getParent()
507 
508     /**
509      * Get the projectGroup field.
510      * 
511      * @return ProjectGroup
512      */
513     public ProjectGroup getProjectGroup()
514     {
515         return this.projectGroup;
516     } //-- ProjectGroup getProjectGroup()
517 
518     /**
519      * Get the relativePath field.
520      * 
521      * @return String
522      */
523     public String getRelativePath()
524     {
525         return this.relativePath;
526     } //-- String getRelativePath()
527 
528     /**
529      * Get the scmPassword field.
530      * 
531      * @return String
532      */
533     public String getScmPassword()
534     {
535         return this.scmPassword;
536     } //-- String getScmPassword()
537 
538     /**
539      * Get the scmTag field.
540      * 
541      * @return String
542      */
543     public String getScmTag()
544     {
545         return this.scmTag;
546     } //-- String getScmTag()
547 
548     /**
549      * Get the scmUrl field.
550      * 
551      * @return String
552      */
553     public String getScmUrl()
554     {
555         return this.scmUrl;
556     } //-- String getScmUrl()
557 
558     /**
559      * Get the scmUsername field.
560      * 
561      * @return String
562      */
563     public String getScmUsername()
564     {
565         return this.scmUsername;
566     } //-- String getScmUsername()
567 
568     /**
569      * Get the state field.
570      * 
571      * @return int
572      */
573     public int getState()
574     {
575         return this.state;
576     } //-- int getState()
577 
578     /**
579      * Get the url field.
580      * 
581      * @return String
582      */
583     public String getUrl()
584     {
585         return this.url;
586     } //-- String getUrl()
587 
588     /**
589      * Get the version field.
590      * 
591      * @return String
592      */
593     public String getVersion()
594     {
595         return this.version;
596     } //-- String getVersion()
597 
598     /**
599      * Get the workingDirectory field.
600      * 
601      * @return String
602      */
603     public String getWorkingDirectory()
604     {
605         return this.workingDirectory;
606     } //-- String getWorkingDirectory()
607 
608     /**
609      * Method hashCode.
610      * 
611      * @return int
612      */
613     public int hashCode()
614     {
615         int result = 17;
616 
617         result = 37 * result + (int) id;
618 
619         return result;
620     } //-- int hashCode()
621 
622     /**
623      * Get the scmUseCache field.
624      * 
625      * @return boolean
626      */
627     public boolean isScmUseCache()
628     {
629         return this.scmUseCache;
630     } //-- boolean isScmUseCache()
631 
632     /**
633      * Method removeBuildDefinition.
634      * 
635      * @param buildDefinition
636      */
637     public void removeBuildDefinition( BuildDefinition buildDefinition )
638     {
639         getBuildDefinitions().remove( buildDefinition );
640     } //-- void removeBuildDefinition( BuildDefinition )
641 
642     /**
643      * Method removeBuildResult.
644      * 
645      * @param buildResult
646      */
647     public void removeBuildResult( BuildResult buildResult )
648     {
649         buildResult.breakProjectAssociation( this );
650         getBuildResults().remove( buildResult );
651     } //-- void removeBuildResult( BuildResult )
652 
653     /**
654      * Method removeDependency.
655      * 
656      * @param projectDependency
657      */
658     public void removeDependency( ProjectDependency projectDependency )
659     {
660         getDependencies().remove( projectDependency );
661     } //-- void removeDependency( ProjectDependency )
662 
663     /**
664      * Method removeDeveloper.
665      * 
666      * @param projectDeveloper
667      */
668     public void removeDeveloper( ProjectDeveloper projectDeveloper )
669     {
670         getDevelopers().remove( projectDeveloper );
671     } //-- void removeDeveloper( ProjectDeveloper )
672 
673     /**
674      * Method removeNotifier.
675      * 
676      * @param projectNotifier
677      */
678     public void removeNotifier( ProjectNotifier projectNotifier )
679     {
680         getNotifiers().remove( projectNotifier );
681     } //-- void removeNotifier( ProjectNotifier )
682 
683     /**
684      * Set the artifactId field.
685      * 
686      * @param artifactId
687      */
688     public void setArtifactId( String artifactId )
689     {
690         this.artifactId = artifactId;
691     } //-- void setArtifactId( String )
692 
693     /**
694      * Set the buildDefinitions field.
695      * 
696      * @param buildDefinitions
697      */
698     public void setBuildDefinitions( java.util.List<BuildDefinition> buildDefinitions )
699     {
700         this.buildDefinitions = buildDefinitions;
701     } //-- void setBuildDefinitions( java.util.List )
702 
703     /**
704      * Set the buildNumber field.
705      * 
706      * @param buildNumber
707      */
708     public void setBuildNumber( int buildNumber )
709     {
710         this.buildNumber = buildNumber;
711     } //-- void setBuildNumber( int )
712 
713     /**
714      * Set the buildResults field.
715      * 
716      * @param buildResults
717      */
718     public void setBuildResults( java.util.List<BuildResult> buildResults )
719     {
720         this.buildResults = buildResults;
721     } //-- void setBuildResults( java.util.List )
722 
723     /**
724      * Set the checkoutResult field.
725      * 
726      * @param checkoutResult
727      */
728     public void setCheckoutResult( ScmResult checkoutResult )
729     {
730         this.checkoutResult = checkoutResult;
731     } //-- void setCheckoutResult( ScmResult )
732 
733     /**
734      * Set the dependencies field.
735      * 
736      * @param dependencies
737      */
738     public void setDependencies( java.util.List<ProjectDependency> dependencies )
739     {
740         this.dependencies = dependencies;
741     } //-- void setDependencies( java.util.List )
742 
743     /**
744      * Set the description field.
745      * 
746      * @param description
747      */
748     public void setDescription( String description )
749     {
750         this.description = description;
751     } //-- void setDescription( String )
752 
753     /**
754      * Set the developers field.
755      * 
756      * @param developers
757      */
758     public void setDevelopers( java.util.List<ProjectDeveloper> developers )
759     {
760         this.developers = developers;
761     } //-- void setDevelopers( java.util.List )
762 
763     /**
764      * Set the executorId field.
765      * 
766      * @param executorId
767      */
768     public void setExecutorId( String executorId )
769     {
770         this.executorId = executorId;
771     } //-- void setExecutorId( String )
772 
773     /**
774      * Set the groupId field.
775      * 
776      * @param groupId
777      */
778     public void setGroupId( String groupId )
779     {
780         this.groupId = groupId;
781     } //-- void setGroupId( String )
782 
783     /**
784      * Set the id field.
785      * 
786      * @param id
787      */
788     public void setId( int id )
789     {
790         this.id = id;
791     } //-- void setId( int )
792 
793     /**
794      * Set the latestBuildId field.
795      * 
796      * @param latestBuildId
797      */
798     public void setLatestBuildId( int latestBuildId )
799     {
800         this.latestBuildId = latestBuildId;
801     } //-- void setLatestBuildId( int )
802 
803     /**
804      * Set the name field.
805      * 
806      * @param name
807      */
808     public void setName( String name )
809     {
810         this.name = name;
811     } //-- void setName( String )
812 
813     /**
814      * Set the notifiers field.
815      * 
816      * @param notifiers
817      */
818     public void setNotifiers( java.util.List<ProjectNotifier> notifiers )
819     {
820         this.notifiers = notifiers;
821     } //-- void setNotifiers( java.util.List )
822 
823     /**
824      * Set the oldState field.
825      * 
826      * @param oldState
827      */
828     public void setOldState( int oldState )
829     {
830         this.oldState = oldState;
831     } //-- void setOldState( int )
832 
833     /**
834      * Set the parent field.
835      * 
836      * @param parent
837      */
838     public void setParent( ProjectDependency parent )
839     {
840         this.parent = parent;
841     } //-- void setParent( ProjectDependency )
842 
843     /**
844      * Set the projectGroup field.
845      * 
846      * @param projectGroup
847      */
848     public void setProjectGroup( ProjectGroup projectGroup )
849     {
850         if ( this.projectGroup != null )
851         {
852             this.projectGroup.breakProjectAssociation( this );
853         }
854 
855         this.projectGroup = projectGroup;
856 
857         if ( projectGroup != null )
858         {
859             this.projectGroup.createProjectAssociation( this );
860         }
861     } //-- void setProjectGroup( ProjectGroup )
862 
863     /**
864      * Set the relativePath field.
865      * 
866      * @param relativePath
867      */
868     public void setRelativePath( String relativePath )
869     {
870         this.relativePath = relativePath;
871     } //-- void setRelativePath( String )
872 
873     /**
874      * Set the scmPassword field.
875      * 
876      * @param scmPassword
877      */
878     public void setScmPassword( String scmPassword )
879     {
880         this.scmPassword = scmPassword;
881     } //-- void setScmPassword( String )
882 
883     /**
884      * Set the scmTag field.
885      * 
886      * @param scmTag
887      */
888     public void setScmTag( String scmTag )
889     {
890         this.scmTag = scmTag;
891     } //-- void setScmTag( String )
892 
893     /**
894      * Set the scmUrl field.
895      * 
896      * @param scmUrl
897      */
898     public void setScmUrl( String scmUrl )
899     {
900         this.scmUrl = scmUrl;
901     } //-- void setScmUrl( String )
902 
903     /**
904      * Set the scmUseCache field.
905      * 
906      * @param scmUseCache
907      */
908     public void setScmUseCache( boolean scmUseCache )
909     {
910         this.scmUseCache = scmUseCache;
911     } //-- void setScmUseCache( boolean )
912 
913     /**
914      * Set the scmUsername field.
915      * 
916      * @param scmUsername
917      */
918     public void setScmUsername( String scmUsername )
919     {
920         this.scmUsername = scmUsername;
921     } //-- void setScmUsername( String )
922 
923     /**
924      * Set the state field.
925      * 
926      * @param state
927      */
928     public void setState( int state )
929     {
930         this.state = state;
931     } //-- void setState( int )
932 
933     /**
934      * Set the url field.
935      * 
936      * @param url
937      */
938     public void setUrl( String url )
939     {
940         this.url = url;
941     } //-- void setUrl( String )
942 
943     /**
944      * Set the version field.
945      * 
946      * @param version
947      */
948     public void setVersion( String version )
949     {
950         this.version = version;
951     } //-- void setVersion( String )
952 
953     /**
954      * Set the workingDirectory field.
955      * 
956      * @param workingDirectory
957      */
958     public void setWorkingDirectory( String workingDirectory )
959     {
960         this.workingDirectory = workingDirectory;
961     } //-- void setWorkingDirectory( String )
962 
963     /**
964      * Method toString.
965      * 
966      * @return String
967      */
968     public java.lang.String toString()
969     {
970         StringBuilder buf = new StringBuilder( 128 );
971 
972         buf.append( "id = '" );
973         buf.append( getId() );
974         buf.append( "'" );
975 
976         return buf.toString();
977     } //-- java.lang.String toString()
978 
979 }