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