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 * Modifications to the build process which is activated based on
010 * environmental
011 *         parameters or command line arguments.
012 * 
013 * @version $Revision$ $Date$
014 */
015@SuppressWarnings( "all" )
016public class Profile
017    extends ModelBase
018    implements java.io.Serializable, java.lang.Cloneable
019{
020
021      //--------------------------/
022     //- Class/Member Variables -/
023    //--------------------------/
024
025    /**
026     * The identifier of this build profile. This is used for
027     * command line
028     *             activation, and identifies profiles to be
029     * merged.
030     *           
031     */
032    private String id = "default";
033
034    /**
035     * The conditional logic which will automatically trigger the
036     * inclusion of this
037     *             profile.
038     */
039    private Activation activation;
040
041    /**
042     * Information required to build the project.
043     */
044    private BuildBase build;
045
046
047      //-----------/
048     //- Methods -/
049    //-----------/
050
051    /**
052     * Method clone.
053     * 
054     * @return Profile
055     */
056    public Profile clone()
057    {
058        try
059        {
060            Profile copy = (Profile) super.clone();
061
062            if ( this.activation != null )
063            {
064                copy.activation = (Activation) this.activation.clone();
065            }
066
067            if ( this.build != null )
068            {
069                copy.build = (BuildBase) this.build.clone();
070            }
071
072            return copy;
073        }
074        catch ( java.lang.Exception ex )
075        {
076            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
077                + " does not support clone()" ).initCause( ex );
078        }
079    } //-- Profile clone()
080
081    /**
082     * Get the conditional logic which will automatically trigger
083     * the inclusion of this
084     *             profile.
085     * 
086     * @return Activation
087     */
088    public Activation getActivation()
089    {
090        return this.activation;
091    } //-- Activation getActivation()
092
093    /**
094     * Get information required to build the project.
095     * 
096     * @return BuildBase
097     */
098    public BuildBase getBuild()
099    {
100        return this.build;
101    } //-- BuildBase getBuild()
102
103    /**
104     * Get the identifier of this build profile. This is used for
105     * command line
106     *             activation, and identifies profiles to be
107     * merged.
108     * 
109     * @return String
110     */
111    public String getId()
112    {
113        return this.id;
114    } //-- String getId()
115
116    /**
117     * Set the conditional logic which will automatically trigger
118     * the inclusion of this
119     *             profile.
120     * 
121     * @param activation
122     */
123    public void setActivation( Activation activation )
124    {
125        this.activation = activation;
126    } //-- void setActivation( Activation )
127
128    /**
129     * Set information required to build the project.
130     * 
131     * @param build
132     */
133    public void setBuild( BuildBase build )
134    {
135        this.build = build;
136    } //-- void setBuild( BuildBase )
137
138    /**
139     * Set the identifier of this build profile. This is used for
140     * command line
141     *             activation, and identifies profiles to be
142     * merged.
143     * 
144     * @param id
145     */
146    public void setId( String id )
147    {
148        this.id = id;
149    } //-- void setId( String )
150
151    
152            
153    public static final String SOURCE_POM = "pom";
154
155    public static final String SOURCE_SETTINGS = "settings.xml";
156
157    // We don't want this to be parseable...it's sort of 'hidden'
158    // default source for this profile is in the pom itself.
159    private String source = SOURCE_POM;
160
161    public void setSource( String source )
162    {
163        this.source = source;
164    }
165
166    public String getSource()
167    {
168        return source;
169    }
170
171    /**
172     * @see java.lang.Object#toString()
173     */
174    public String toString()
175    {
176        return "Profile {id: " + getId() + ", source: " + getSource() + "}";
177    }
178            
179          
180}