001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.1,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.model;
007
008/**
009 * The conditions within the build runtime environment which will
010 * trigger the
011 *         automatic inclusion of the build profile. Multiple
012 * conditions can be defined, which must
013 *         be all satisfied to activate the profile.
014 *       
015 * 
016 * @version $Revision$ $Date$
017 */
018@SuppressWarnings( "all" )
019public class Activation
020    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
021{
022
023      //--------------------------/
024     //- Class/Member Variables -/
025    //--------------------------/
026
027    /**
028     * If set to true, this profile will be active unless another
029     * profile in this
030     *             pom is activated using the command line -P
031     * option or by one of that profile's
032     *             activators.
033     */
034    private boolean activeByDefault = false;
035
036    /**
037     * 
038     *             
039     *             Specifies that this profile will be activated
040     * when a matching JDK is detected.
041     *             For example, <code>1.4</code> only activates on
042     * JDKs versioned 1.4,
043     *             while <code>!1.4</code> matches any JDK that is
044     * not version 1.4.
045     *             
046     *           
047     */
048    private String jdk;
049
050    /**
051     * Specifies that this profile will be activated when matching
052     * operating system
053     *             attributes are detected.
054     */
055    private ActivationOS os;
056
057    /**
058     * Specifies that this profile will be activated when this
059     * system property is
060     *             specified.
061     */
062    private ActivationProperty property;
063
064    /**
065     * Specifies that this profile will be activated based on
066     * existence of a file.
067     */
068    private ActivationFile file;
069
070    /**
071     * Field locations.
072     */
073    private java.util.Map<Object, InputLocation> locations;
074
075
076      //-----------/
077     //- Methods -/
078    //-----------/
079
080    /**
081     * Method clone.
082     * 
083     * @return Activation
084     */
085    public Activation clone()
086    {
087        try
088        {
089            Activation copy = (Activation) super.clone();
090
091            if ( this.os != null )
092            {
093                copy.os = (ActivationOS) this.os.clone();
094            }
095
096            if ( this.property != null )
097            {
098                copy.property = (ActivationProperty) this.property.clone();
099            }
100
101            if ( this.file != null )
102            {
103                copy.file = (ActivationFile) this.file.clone();
104            }
105
106            if ( copy.locations != null )
107            {
108                copy.locations = new java.util.LinkedHashMap( copy.locations );
109            }
110
111            return copy;
112        }
113        catch ( java.lang.Exception ex )
114        {
115            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
116                + " does not support clone()" ).initCause( ex );
117        }
118    } //-- Activation clone()
119
120    /**
121     * Get specifies that this profile will be activated based on
122     * existence of a file.
123     * 
124     * @return ActivationFile
125     */
126    public ActivationFile getFile()
127    {
128        return this.file;
129    } //-- ActivationFile getFile()
130
131    /**
132     * Get specifies that this profile will be activated when a
133     * matching JDK is detected.
134     *             For example, <code>1.4</code> only activates on
135     * JDKs versioned 1.4,
136     *             while <code>!1.4</code> matches any JDK that is
137     * not version 1.4.
138     * 
139     * @return String
140     */
141    public String getJdk()
142    {
143        return this.jdk;
144    } //-- String getJdk()
145
146    /**
147     * 
148     * 
149     * @param key
150     * @return InputLocation
151     */
152    public InputLocation getLocation( Object key )
153    {
154        return ( locations != null ) ? locations.get( key ) : null;
155    } //-- InputLocation getLocation( Object )
156
157    /**
158     * Get specifies that this profile will be activated when
159     * matching operating system
160     *             attributes are detected.
161     * 
162     * @return ActivationOS
163     */
164    public ActivationOS getOs()
165    {
166        return this.os;
167    } //-- ActivationOS getOs()
168
169    /**
170     * Get specifies that this profile will be activated when this
171     * system property is
172     *             specified.
173     * 
174     * @return ActivationProperty
175     */
176    public ActivationProperty getProperty()
177    {
178        return this.property;
179    } //-- ActivationProperty getProperty()
180
181    /**
182     * Get if set to true, this profile will be active unless
183     * another profile in this
184     *             pom is activated using the command line -P
185     * option or by one of that profile's
186     *             activators.
187     * 
188     * @return boolean
189     */
190    public boolean isActiveByDefault()
191    {
192        return this.activeByDefault;
193    } //-- boolean isActiveByDefault()
194
195    /**
196     * Set if set to true, this profile will be active unless
197     * another profile in this
198     *             pom is activated using the command line -P
199     * option or by one of that profile's
200     *             activators.
201     * 
202     * @param activeByDefault
203     */
204    public void setActiveByDefault( boolean activeByDefault )
205    {
206        this.activeByDefault = activeByDefault;
207    } //-- void setActiveByDefault( boolean )
208
209    /**
210     * Set specifies that this profile will be activated based on
211     * existence of a file.
212     * 
213     * @param file
214     */
215    public void setFile( ActivationFile file )
216    {
217        this.file = file;
218    } //-- void setFile( ActivationFile )
219
220    /**
221     * Set specifies that this profile will be activated when a
222     * matching JDK is detected.
223     *             For example, <code>1.4</code> only activates on
224     * JDKs versioned 1.4,
225     *             while <code>!1.4</code> matches any JDK that is
226     * not version 1.4.
227     * 
228     * @param jdk
229     */
230    public void setJdk( String jdk )
231    {
232        this.jdk = jdk;
233    } //-- void setJdk( String )
234
235    /**
236     * 
237     * 
238     * @param key
239     * @param location
240     */
241    public void setLocation( Object key, InputLocation location )
242    {
243        if ( location != null )
244        {
245            if ( this.locations == null )
246            {
247                this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
248            }
249            this.locations.put( key, location );
250        }
251    } //-- void setLocation( Object, InputLocation )
252
253    /**
254     * Set specifies that this profile will be activated when
255     * matching operating system
256     *             attributes are detected.
257     * 
258     * @param os
259     */
260    public void setOs( ActivationOS os )
261    {
262        this.os = os;
263    } //-- void setOs( ActivationOS )
264
265    /**
266     * Set specifies that this profile will be activated when this
267     * system property is
268     *             specified.
269     * 
270     * @param property
271     */
272    public void setProperty( ActivationProperty property )
273    {
274        this.property = property;
275    } //-- void setProperty( ActivationProperty )
276
277}