001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.3,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.model;
007
008/**
009 * Configures one method for notifying users/developers when a
010 * build breaks.
011 * 
012 * @version $Revision: 965443 $ $Date: 2015-09-14 22:18:52 +0000 (Mon, 14 Sep 2015) $
013 */
014@SuppressWarnings( "all" )
015public class Notifier
016    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
017{
018
019      //--------------------------/
020     //- Class/Member Variables -/
021    //--------------------------/
022
023    /**
024     * The mechanism used to deliver notifications.
025     */
026    private String type = "mail";
027
028    /**
029     * Whether to send notifications on error.
030     */
031    private boolean sendOnError = true;
032
033    /**
034     * Whether to send notifications on failure.
035     */
036    private boolean sendOnFailure = true;
037
038    /**
039     * Whether to send notifications on success.
040     */
041    private boolean sendOnSuccess = true;
042
043    /**
044     * Whether to send notifications on warning.
045     */
046    private boolean sendOnWarning = true;
047
048    /**
049     * 
050     *             
051     *             <b>Deprecated</b>. Where to send the
052     * notification to - eg email address.
053     *             
054     *           
055     */
056    private String address;
057
058    /**
059     * Field configuration.
060     */
061    private java.util.Properties configuration;
062
063    /**
064     * Field locations.
065     */
066    private java.util.Map<Object, InputLocation> locations;
067
068
069      //-----------/
070     //- Methods -/
071    //-----------/
072
073    /**
074     * Method addConfiguration.
075     * 
076     * @param key
077     * @param value
078     */
079    public void addConfiguration( String key, String value )
080    {
081        getConfiguration().put( key, value );
082    } //-- void addConfiguration( String, String )
083
084    /**
085     * Method clone.
086     * 
087     * @return Notifier
088     */
089    public Notifier clone()
090    {
091        try
092        {
093            Notifier copy = (Notifier) super.clone();
094
095            if ( this.configuration != null )
096            {
097                copy.configuration = (java.util.Properties) this.configuration.clone();
098            }
099
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}