View Javadoc

1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.8.1,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * 
10   *         
11   *         The <code>&lt;CiManagement&gt;</code> element contains
12   * informations required to the
13   *         continuous integration system of the project.
14   *         
15   *       
16   * 
17   * @version $Revision$ $Date$
18   */
19  @SuppressWarnings( "all" )
20  public class CiManagement
21      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
22  {
23  
24        //--------------------------/
25       //- Class/Member Variables -/
26      //--------------------------/
27  
28      /**
29       * 
30       *             
31       *             The name of the continuous integration system,
32       * e.g. <code>continuum</code>.
33       *             
34       *           
35       */
36      private String system;
37  
38      /**
39       * URL for the continuous integration system used by the
40       * project if it has a web
41       *             interface.
42       */
43      private String url;
44  
45      /**
46       * Field notifiers.
47       */
48      private java.util.List<Notifier> notifiers;
49  
50      /**
51       * Field locations.
52       */
53      private java.util.Map<Object, InputLocation> locations;
54  
55  
56        //-----------/
57       //- Methods -/
58      //-----------/
59  
60      /**
61       * Method addNotifier.
62       * 
63       * @param notifier
64       */
65      public void addNotifier( Notifier notifier )
66      {
67          getNotifiers().add( notifier );
68      } //-- void addNotifier( Notifier )
69  
70      /**
71       * Method clone.
72       * 
73       * @return CiManagement
74       */
75      public CiManagement clone()
76      {
77          try
78          {
79              CiManagement copy = (CiManagement) super.clone();
80  
81              if ( this.notifiers != null )
82              {
83                  copy.notifiers = new java.util.ArrayList<Notifier>();
84                  for ( Notifier item : this.notifiers )
85                  {
86                      copy.notifiers.add( ( (Notifier) item).clone() );
87                  }
88              }
89  
90              if ( copy.locations != null )
91              {
92                  copy.locations = new java.util.LinkedHashMap( copy.locations );
93              }
94  
95              return copy;
96          }
97          catch ( java.lang.Exception ex )
98          {
99              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
100                 + " does not support clone()" ).initCause( ex );
101         }
102     } //-- CiManagement clone()
103 
104     /**
105      * 
106      * 
107      * @param key
108      * @return InputLocation
109      */
110     public InputLocation getLocation( Object key )
111     {
112         return ( locations != null ) ? locations.get( key ) : null;
113     } //-- InputLocation getLocation( Object )
114 
115     /**
116      * Method getNotifiers.
117      * 
118      * @return List
119      */
120     public java.util.List<Notifier> getNotifiers()
121     {
122         if ( this.notifiers == null )
123         {
124             this.notifiers = new java.util.ArrayList<Notifier>();
125         }
126 
127         return this.notifiers;
128     } //-- java.util.List<Notifier> getNotifiers()
129 
130     /**
131      * Get the name of the continuous integration system, e.g.
132      * <code>continuum</code>.
133      * 
134      * @return String
135      */
136     public String getSystem()
137     {
138         return this.system;
139     } //-- String getSystem()
140 
141     /**
142      * Get uRL for the continuous integration system used by the
143      * project if it has a web
144      *             interface.
145      * 
146      * @return String
147      */
148     public String getUrl()
149     {
150         return this.url;
151     } //-- String getUrl()
152 
153     /**
154      * Method removeNotifier.
155      * 
156      * @param notifier
157      */
158     public void removeNotifier( Notifier notifier )
159     {
160         getNotifiers().remove( notifier );
161     } //-- void removeNotifier( Notifier )
162 
163     /**
164      * 
165      * 
166      * @param key
167      * @param location
168      */
169     public void setLocation( Object key, InputLocation location )
170     {
171         if ( location != null )
172         {
173             if ( this.locations == null )
174             {
175                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
176             }
177             this.locations.put( key, location );
178         }
179     } //-- void setLocation( Object, InputLocation )
180 
181     /**
182      * Set configuration for notifying developers/users when a
183      * build is unsuccessful,
184      *             including user information and notification
185      * mode.
186      * 
187      * @param notifiers
188      */
189     public void setNotifiers( java.util.List<Notifier> notifiers )
190     {
191         this.notifiers = notifiers;
192     } //-- void setNotifiers( java.util.List )
193 
194     /**
195      * Set the name of the continuous integration system, e.g.
196      * <code>continuum</code>.
197      * 
198      * @param system
199      */
200     public void setSystem( String system )
201     {
202         this.system = system;
203     } //-- void setSystem( String )
204 
205     /**
206      * Set uRL for the continuous integration system used by the
207      * project if it has a web
208      *             interface.
209      * 
210      * @param url
211      */
212     public void setUrl( String url )
213     {
214         this.url = url;
215     } //-- void setUrl( String )
216 
217 }