View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:09:18,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * Modifications to the build process which is activated based on
12   * environmental
13   *         parameters or command line arguments.
14   * 
15   * @version $Revision$ $Date$
16   */
17  @SuppressWarnings( "all" )
18  public class Profile
19      extends ModelBase
20      implements java.io.Serializable, java.lang.Cloneable
21  {
22  
23        //--------------------------/
24       //- Class/Member Variables -/
25      //--------------------------/
26  
27      /**
28       * The identifier of this build profile. This is used for
29       * command line
30       *             activation, and identifies profiles to be
31       * merged.
32       *           
33       */
34      private String id = "default";
35  
36      /**
37       * The conditional logic which will automatically trigger the
38       * inclusion of this
39       *             profile.
40       */
41      private Activation activation;
42  
43      /**
44       * Information required to build the project.
45       */
46      private BuildBase build;
47  
48  
49        //-----------/
50       //- Methods -/
51      //-----------/
52  
53      /**
54       * Method clone.
55       * 
56       * @return Profile
57       */
58      public Profile clone()
59      {
60          try
61          {
62              Profile copy = (Profile) super.clone();
63  
64              if ( this.activation != null )
65              {
66                  copy.activation = (Activation) this.activation.clone();
67              }
68  
69              if ( this.build != null )
70              {
71                  copy.build = (BuildBase) this.build.clone();
72              }
73  
74              return copy;
75          }
76          catch ( java.lang.Exception ex )
77          {
78              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
79                  + " does not support clone()" ).initCause( ex );
80          }
81      } //-- Profile clone()
82  
83      /**
84       * Get the conditional logic which will automatically trigger
85       * the inclusion of this
86       *             profile.
87       * 
88       * @return Activation
89       */
90      public Activation getActivation()
91      {
92          return this.activation;
93      } //-- Activation getActivation()
94  
95      /**
96       * Get information required to build the project.
97       * 
98       * @return BuildBase
99       */
100     public BuildBase getBuild()
101     {
102         return this.build;
103     } //-- BuildBase getBuild()
104 
105     /**
106      * Get the identifier of this build profile. This is used for
107      * command line
108      *             activation, and identifies profiles to be
109      * merged.
110      * 
111      * @return String
112      */
113     public String getId()
114     {
115         return this.id;
116     } //-- String getId()
117 
118     /**
119      * Set the conditional logic which will automatically trigger
120      * the inclusion of this
121      *             profile.
122      * 
123      * @param activation
124      */
125     public void setActivation( Activation activation )
126     {
127         this.activation = activation;
128     } //-- void setActivation( Activation )
129 
130     /**
131      * Set information required to build the project.
132      * 
133      * @param build
134      */
135     public void setBuild( BuildBase build )
136     {
137         this.build = build;
138     } //-- void setBuild( BuildBase )
139 
140     /**
141      * Set the identifier of this build profile. This is used for
142      * command line
143      *             activation, and identifies profiles to be
144      * merged.
145      * 
146      * @param id
147      */
148     public void setId( String id )
149     {
150         this.id = id;
151     } //-- void setId( String )
152 
153     
154             
155     public static final String SOURCE_POM = "pom";
156 
157     public static final String SOURCE_SETTINGS = "settings.xml";
158 
159     // We don't want this to be parseable...it's sort of 'hidden'
160     // default source for this profile is in the pom itself.
161     private String source = SOURCE_POM;
162 
163     public void setSource( String source )
164     {
165         this.source = source;
166     }
167 
168     public String getSource()
169     {
170         return source;
171     }
172 
173     /**
174      * @see java.lang.Object#toString()
175      */
176     public String toString()
177     {
178         return "Profile {id: " + getId() + ", source: " + getSource() + "}";
179     }
180             
181           
182 }