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    * Configures one method for notifying users/developers when a
10   * build breaks.
11   * 
12   * @version $Revision$ $Date$
13   */
14  @SuppressWarnings( "all" )
15  public class Notifier
16      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
17  {
18  
19        //--------------------------/
20       //- Class/Member Variables -/
21      //--------------------------/
22  
23      /**
24       * The mechanism used to deliver notifications.
25       */
26      private String type = "mail";
27  
28      /**
29       * Whether to send notifications on error.
30       */
31      private boolean sendOnError = true;
32  
33      /**
34       * Whether to send notifications on failure.
35       */
36      private boolean sendOnFailure = true;
37  
38      /**
39       * Whether to send notifications on success.
40       */
41      private boolean sendOnSuccess = true;
42  
43      /**
44       * Whether to send notifications on warning.
45       */
46      private boolean sendOnWarning = true;
47  
48      /**
49       * 
50       *             
51       *             <b>Deprecated</b>. Where to send the
52       * notification to - eg email address.
53       *             
54       *           
55       */
56      private String address;
57  
58      /**
59       * Field configuration.
60       */
61      private java.util.Properties configuration;
62  
63      /**
64       * Field locations.
65       */
66      private java.util.Map<Object, InputLocation> locations;
67  
68  
69        //-----------/
70       //- Methods -/
71      //-----------/
72  
73      /**
74       * Method addConfiguration.
75       * 
76       * @param key
77       * @param value
78       */
79      public void addConfiguration( String key, String value )
80      {
81          getConfiguration().put( key, value );
82      } //-- void addConfiguration( String, String )
83  
84      /**
85       * Method clone.
86       * 
87       * @return Notifier
88       */
89      public Notifier clone()
90      {
91          try
92          {
93              Notifier copy = (Notifier) super.clone();
94  
95              if ( this.configuration != null )
96              {
97                  copy.configuration = (java.util.Properties) this.configuration.clone();
98              }
99  
100             if ( copy.locations != null )
101             {
102                 copy.locations = new java.util.LinkedHashMap( copy.locations );
103             }
104 
105             return copy;
106         }
107         catch ( java.lang.Exception ex )
108         {
109             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
110                 + " does not support clone()" ).initCause( ex );
111         }
112     } //-- Notifier clone()
113 
114     /**
115      * Get <b>Deprecated</b>. Where to send the notification to -
116      * eg email address.
117      * 
118      * @return String
119      */
120     public String getAddress()
121     {
122         return this.address;
123     } //-- String getAddress()
124 
125     /**
126      * Method getConfiguration.
127      * 
128      * @return Properties
129      */
130     public java.util.Properties getConfiguration()
131     {
132         if ( this.configuration == null )
133         {
134             this.configuration = new java.util.Properties();
135         }
136 
137         return this.configuration;
138     } //-- java.util.Properties getConfiguration()
139 
140     /**
141      * 
142      * 
143      * @param key
144      * @return InputLocation
145      */
146     public InputLocation getLocation( Object key )
147     {
148         return ( locations != null ) ? locations.get( key ) : null;
149     } //-- InputLocation getLocation( Object )
150 
151     /**
152      * Get the mechanism used to deliver notifications.
153      * 
154      * @return String
155      */
156     public String getType()
157     {
158         return this.type;
159     } //-- String getType()
160 
161     /**
162      * Get whether to send notifications on error.
163      * 
164      * @return boolean
165      */
166     public boolean isSendOnError()
167     {
168         return this.sendOnError;
169     } //-- boolean isSendOnError()
170 
171     /**
172      * Get whether to send notifications on failure.
173      * 
174      * @return boolean
175      */
176     public boolean isSendOnFailure()
177     {
178         return this.sendOnFailure;
179     } //-- boolean isSendOnFailure()
180 
181     /**
182      * Get whether to send notifications on success.
183      * 
184      * @return boolean
185      */
186     public boolean isSendOnSuccess()
187     {
188         return this.sendOnSuccess;
189     } //-- boolean isSendOnSuccess()
190 
191     /**
192      * Get whether to send notifications on warning.
193      * 
194      * @return boolean
195      */
196     public boolean isSendOnWarning()
197     {
198         return this.sendOnWarning;
199     } //-- boolean isSendOnWarning()
200 
201     /**
202      * Set <b>Deprecated</b>. Where to send the notification to -
203      * eg email address.
204      * 
205      * @param address
206      */
207     public void setAddress( String address )
208     {
209         this.address = address;
210     } //-- void setAddress( String )
211 
212     /**
213      * Set extended configuration specific to this notifier goes
214      * here.
215      * 
216      * @param configuration
217      */
218     public void setConfiguration( java.util.Properties configuration )
219     {
220         this.configuration = configuration;
221     } //-- void setConfiguration( java.util.Properties )
222 
223     /**
224      * 
225      * 
226      * @param key
227      * @param location
228      */
229     public void setLocation( Object key, InputLocation location )
230     {
231         if ( location != null )
232         {
233             if ( this.locations == null )
234             {
235                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
236             }
237             this.locations.put( key, location );
238         }
239     } //-- void setLocation( Object, InputLocation )
240 
241     /**
242      * Set whether to send notifications on error.
243      * 
244      * @param sendOnError
245      */
246     public void setSendOnError( boolean sendOnError )
247     {
248         this.sendOnError = sendOnError;
249     } //-- void setSendOnError( boolean )
250 
251     /**
252      * Set whether to send notifications on failure.
253      * 
254      * @param sendOnFailure
255      */
256     public void setSendOnFailure( boolean sendOnFailure )
257     {
258         this.sendOnFailure = sendOnFailure;
259     } //-- void setSendOnFailure( boolean )
260 
261     /**
262      * Set whether to send notifications on success.
263      * 
264      * @param sendOnSuccess
265      */
266     public void setSendOnSuccess( boolean sendOnSuccess )
267     {
268         this.sendOnSuccess = sendOnSuccess;
269     } //-- void setSendOnSuccess( boolean )
270 
271     /**
272      * Set whether to send notifications on warning.
273      * 
274      * @param sendOnWarning
275      */
276     public void setSendOnWarning( boolean sendOnWarning )
277     {
278         this.sendOnWarning = sendOnWarning;
279     } //-- void setSendOnWarning( boolean )
280 
281     /**
282      * Set the mechanism used to deliver notifications.
283      * 
284      * @param type
285      */
286     public void setType( String type )
287     {
288         this.type = type;
289     } //-- void setType( String )
290 
291 }