1
2
3
4
5 package org.apache.maven.profiles;
6
7
8
9
10
11 import java.util.Date;
12
13
14
15
16
17
18 public class ProfilesRoot implements java.io.Serializable {
19
20
21
22
23
24
25
26
27
28 private java.util.List profiles;
29
30
31
32
33 private java.util.List activeProfiles;
34
35
36
37
38
39
40
41
42
43
44
45 public void addActiveProfile( String string )
46 {
47 if ( !(string instanceof String) )
48 {
49 throw new ClassCastException( "ProfilesRoot.addActiveProfiles(string) parameter must be instanceof " + String.class.getName() );
50 }
51 getActiveProfiles().add( string );
52 }
53
54
55
56
57
58
59 public void addProfile( Profile profile )
60 {
61 if ( !(profile instanceof Profile) )
62 {
63 throw new ClassCastException( "ProfilesRoot.addProfiles(profile) parameter must be instanceof " + Profile.class.getName() );
64 }
65 getProfiles().add( profile );
66 }
67
68
69
70
71
72
73 public java.util.List getActiveProfiles()
74 {
75 if ( this.activeProfiles == null )
76 {
77 this.activeProfiles = new java.util.ArrayList();
78 }
79
80 return this.activeProfiles;
81 }
82
83
84
85
86
87
88 public java.util.List getProfiles()
89 {
90 if ( this.profiles == null )
91 {
92 this.profiles = new java.util.ArrayList();
93 }
94
95 return this.profiles;
96 }
97
98
99
100
101
102
103 public void removeActiveProfile( String string )
104 {
105 if ( !(string instanceof String) )
106 {
107 throw new ClassCastException( "ProfilesRoot.removeActiveProfiles(string) parameter must be instanceof " + String.class.getName() );
108 }
109 getActiveProfiles().remove( string );
110 }
111
112
113
114
115
116
117 public void removeProfile( Profile profile )
118 {
119 if ( !(profile instanceof Profile) )
120 {
121 throw new ClassCastException( "ProfilesRoot.removeProfiles(profile) parameter must be instanceof " + Profile.class.getName() );
122 }
123 getProfiles().remove( profile );
124 }
125
126
127
128
129
130
131
132
133
134
135 public void setActiveProfiles( java.util.List activeProfiles )
136 {
137 this.activeProfiles = activeProfiles;
138 }
139
140
141
142
143
144
145
146
147
148
149 public void setProfiles( java.util.List profiles )
150 {
151 this.profiles = profiles;
152 }
153
154
155 private String modelEncoding = "UTF-8";
156
157
158
159
160
161
162 public void setModelEncoding( String modelEncoding )
163 {
164 this.modelEncoding = modelEncoding;
165 }
166
167
168
169
170 public String getModelEncoding()
171 {
172 return modelEncoding;
173 }
174 }