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