1 /*
2 =================== DO NOT EDIT THIS FILE ====================
3 Generated by Modello 1.0.1 on 2009-09-09 03:30:24,
4 any modifications will be overwritten.
5 ==============================================================
6 */
7
8 package org.apache.maven.profiles;
9
10 /**
11 * Root element of the profiles.xml file.
12 *
13 * @version $Revision$ $Date$
14 */
15 public class ProfilesRoot
16 implements java.io.Serializable
17 {
18
19 //--------------------------/
20 //- Class/Member Variables -/
21 //--------------------------/
22
23 /**
24 * Field profiles.
25 */
26 private java.util.List<Profile> profiles;
27
28 /**
29 * Field activeProfiles.
30 */
31 private java.util.List<String> activeProfiles;
32
33 /**
34 * Field modelEncoding.
35 */
36 private String modelEncoding = "UTF-8";
37
38
39 //-----------/
40 //- Methods -/
41 //-----------/
42
43 /**
44 * Method addActiveProfile.
45 *
46 * @param string
47 */
48 public void addActiveProfile( String string )
49 {
50 if ( !(string instanceof String) )
51 {
52 throw new ClassCastException( "ProfilesRoot.addActiveProfiles(string) parameter must be instanceof " + String.class.getName() );
53 }
54 getActiveProfiles().add( string );
55 } //-- void addActiveProfile( String )
56
57 /**
58 * Method addProfile.
59 *
60 * @param profile
61 */
62 public void addProfile( Profile profile )
63 {
64 if ( !(profile instanceof Profile) )
65 {
66 throw new ClassCastException( "ProfilesRoot.addProfiles(profile) parameter must be instanceof " + Profile.class.getName() );
67 }
68 getProfiles().add( profile );
69 } //-- void addProfile( Profile )
70
71 /**
72 * Method getActiveProfiles.
73 *
74 * @return List
75 */
76 public java.util.List<String> getActiveProfiles()
77 {
78 if ( this.activeProfiles == null )
79 {
80 this.activeProfiles = new java.util.ArrayList<String>();
81 }
82
83 return this.activeProfiles;
84 } //-- java.util.List<String> getActiveProfiles()
85
86 /**
87 * Method getModelEncoding.
88 *
89 * @return the current encoding used when reading/writing this
90 * model
91 */
92 public String getModelEncoding()
93 {
94 return modelEncoding;
95 } //-- String getModelEncoding()
96
97 /**
98 * Method getProfiles.
99 *
100 * @return List
101 */
102 public java.util.List<Profile> getProfiles()
103 {
104 if ( this.profiles == null )
105 {
106 this.profiles = new java.util.ArrayList<Profile>();
107 }
108
109 return this.profiles;
110 } //-- java.util.List<Profile> getProfiles()
111
112 /**
113 * Method removeActiveProfile.
114 *
115 * @param string
116 */
117 public void removeActiveProfile( String string )
118 {
119 if ( !(string instanceof String) )
120 {
121 throw new ClassCastException( "ProfilesRoot.removeActiveProfiles(string) parameter must be instanceof " + String.class.getName() );
122 }
123 getActiveProfiles().remove( string );
124 } //-- void removeActiveProfile( String )
125
126 /**
127 * Method removeProfile.
128 *
129 * @param profile
130 */
131 public void removeProfile( Profile profile )
132 {
133 if ( !(profile instanceof Profile) )
134 {
135 throw new ClassCastException( "ProfilesRoot.removeProfiles(profile) parameter must be instanceof " + Profile.class.getName() );
136 }
137 getProfiles().remove( profile );
138 } //-- void removeProfile( Profile )
139
140 /**
141 * Set list of manually-activated build profiles, specified in
142 * the order in which
143 * they should be applied.
144 *
145 * @param activeProfiles
146 */
147 public void setActiveProfiles( java.util.List<String> activeProfiles )
148 {
149 this.activeProfiles = activeProfiles;
150 } //-- void setActiveProfiles( java.util.List )
151
152 /**
153 * Set an encoding used for reading/writing the model.
154 *
155 * @param modelEncoding
156 */
157 public void setModelEncoding( String modelEncoding )
158 {
159 this.modelEncoding = modelEncoding;
160 } //-- void setModelEncoding( String )
161
162 /**
163 * Set configuration of build profiles for adjusting the build
164 * according to environmental parameters.
165 *
166 * @param profiles
167 */
168 public void setProfiles( java.util.List<Profile> profiles )
169 {
170 this.profiles = profiles;
171 } //-- void setProfiles( java.util.List )
172
173
174 }