View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * Modifications to the build process which is activated based on
10   * environmental
11   *         parameters or command line arguments.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class Profile
17      extends ModelBase
18      implements java.io.Serializable, java.lang.Cloneable
19  {
20  
21        //--------------------------/
22       //- Class/Member Variables -/
23      //--------------------------/
24  
25      /**
26       * The identifier of this build profile. This is used for
27       * command line
28       *             activation, and identifies profiles to be
29       * merged.
30       *           
31       */
32      private String id = "default";
33  
34      /**
35       * The conditional logic which will automatically trigger the
36       * inclusion of this
37       *             profile.
38       */
39      private Activation activation;
40  
41      /**
42       * Information required to build the project.
43       */
44      private BuildBase build;
45  
46  
47        //-----------/
48       //- Methods -/
49      //-----------/
50  
51      /**
52       * Method clone.
53       * 
54       * @return Profile
55       */
56      public Profile clone()
57      {
58          try
59          {
60              Profile copy = (Profile) super.clone();
61  
62              if ( this.activation != null )
63              {
64                  copy.activation = (Activation) this.activation.clone();
65              }
66  
67              if ( this.build != null )
68              {
69                  copy.build = (BuildBase) this.build.clone();
70              }
71  
72              return copy;
73          }
74          catch ( java.lang.Exception ex )
75          {
76              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
77                  + " does not support clone()" ).initCause( ex );
78          }
79      } //-- Profile clone()
80  
81      /**
82       * Get the conditional logic which will automatically trigger
83       * the inclusion of this
84       *             profile.
85       * 
86       * @return Activation
87       */
88      public Activation getActivation()
89      {
90          return this.activation;
91      } //-- Activation getActivation()
92  
93      /**
94       * Get information required to build the project.
95       * 
96       * @return BuildBase
97       */
98      public BuildBase getBuild()
99      {
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 }