Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Component |
|
| 1.2222222222222223;1.222 |
1 | /* | |
2 | * $Id$ | |
3 | */ | |
4 | ||
5 | package org.apache.maven.plugins.assembly.model; | |
6 | ||
7 | /** | |
8 | * Describes the component layout and packaging. | |
9 | * | |
10 | * @version $Revision$ $Date$ | |
11 | */ | |
12 | 0 | public class Component implements java.io.Serializable { |
13 | ||
14 | ||
15 | //--------------------------/ | |
16 | //- Class/Member Variables -/ | |
17 | //--------------------------/ | |
18 | ||
19 | /** | |
20 | * Field fileSets | |
21 | */ | |
22 | private java.util.List fileSets; | |
23 | ||
24 | /** | |
25 | * Field files | |
26 | */ | |
27 | private java.util.List files; | |
28 | ||
29 | /** | |
30 | * Field dependencySets | |
31 | */ | |
32 | private java.util.List dependencySets; | |
33 | ||
34 | /** | |
35 | * Field repositories | |
36 | */ | |
37 | private java.util.List repositories; | |
38 | ||
39 | ||
40 | //-----------/ | |
41 | //- Methods -/ | |
42 | //-----------/ | |
43 | ||
44 | /** | |
45 | * Method addDependencySet | |
46 | * | |
47 | * @param dependencySet | |
48 | */ | |
49 | public void addDependencySet(DependencySet dependencySet) | |
50 | { | |
51 | 0 | getDependencySets().add( dependencySet ); |
52 | 0 | } //-- void addDependencySet(DependencySet) |
53 | ||
54 | /** | |
55 | * Method addFile | |
56 | * | |
57 | * @param fileItem | |
58 | */ | |
59 | public void addFile(FileItem fileItem) | |
60 | { | |
61 | 0 | getFiles().add( fileItem ); |
62 | 0 | } //-- void addFile(FileItem) |
63 | ||
64 | /** | |
65 | * Method addFileSet | |
66 | * | |
67 | * @param fileSet | |
68 | */ | |
69 | public void addFileSet(FileSet fileSet) | |
70 | { | |
71 | 0 | getFileSets().add( fileSet ); |
72 | 0 | } //-- void addFileSet(FileSet) |
73 | ||
74 | /** | |
75 | * Method addRepository | |
76 | * | |
77 | * @param repository | |
78 | */ | |
79 | public void addRepository(Repository repository) | |
80 | { | |
81 | 0 | getRepositories().add( repository ); |
82 | 0 | } //-- void addRepository(Repository) |
83 | ||
84 | /** | |
85 | * Method getDependencySets | |
86 | */ | |
87 | public java.util.List getDependencySets() | |
88 | { | |
89 | 0 | if ( this.dependencySets == null ) |
90 | { | |
91 | 0 | this.dependencySets = new java.util.ArrayList(); |
92 | } | |
93 | ||
94 | 0 | return this.dependencySets; |
95 | } //-- java.util.List getDependencySets() | |
96 | ||
97 | /** | |
98 | * Method getFileSets | |
99 | */ | |
100 | public java.util.List getFileSets() | |
101 | { | |
102 | 0 | if ( this.fileSets == null ) |
103 | { | |
104 | 0 | this.fileSets = new java.util.ArrayList(); |
105 | } | |
106 | ||
107 | 0 | return this.fileSets; |
108 | } //-- java.util.List getFileSets() | |
109 | ||
110 | /** | |
111 | * Method getFiles | |
112 | */ | |
113 | public java.util.List getFiles() | |
114 | { | |
115 | 0 | if ( this.files == null ) |
116 | { | |
117 | 0 | this.files = new java.util.ArrayList(); |
118 | } | |
119 | ||
120 | 0 | return this.files; |
121 | } //-- java.util.List getFiles() | |
122 | ||
123 | /** | |
124 | * Method getRepositories | |
125 | */ | |
126 | public java.util.List getRepositories() | |
127 | { | |
128 | 0 | if ( this.repositories == null ) |
129 | { | |
130 | 0 | this.repositories = new java.util.ArrayList(); |
131 | } | |
132 | ||
133 | 0 | return this.repositories; |
134 | } //-- java.util.List getRepositories() | |
135 | ||
136 | /** | |
137 | * Method removeDependencySet | |
138 | * | |
139 | * @param dependencySet | |
140 | */ | |
141 | public void removeDependencySet(DependencySet dependencySet) | |
142 | { | |
143 | 0 | getDependencySets().remove( dependencySet ); |
144 | 0 | } //-- void removeDependencySet(DependencySet) |
145 | ||
146 | /** | |
147 | * Method removeFile | |
148 | * | |
149 | * @param fileItem | |
150 | */ | |
151 | public void removeFile(FileItem fileItem) | |
152 | { | |
153 | 0 | getFiles().remove( fileItem ); |
154 | 0 | } //-- void removeFile(FileItem) |
155 | ||
156 | /** | |
157 | * Method removeFileSet | |
158 | * | |
159 | * @param fileSet | |
160 | */ | |
161 | public void removeFileSet(FileSet fileSet) | |
162 | { | |
163 | 0 | getFileSets().remove( fileSet ); |
164 | 0 | } //-- void removeFileSet(FileSet) |
165 | ||
166 | /** | |
167 | * Method removeRepository | |
168 | * | |
169 | * @param repository | |
170 | */ | |
171 | public void removeRepository(Repository repository) | |
172 | { | |
173 | 0 | getRepositories().remove( repository ); |
174 | 0 | } //-- void removeRepository(Repository) |
175 | ||
176 | /** | |
177 | * Set | |
178 | * | |
179 | * Specifies which dependencies to include in the | |
180 | * assembly. A | |
181 | * dependencySet is specified by providing one or | |
182 | * more of | |
183 | * <dependencySet> subelements. | |
184 | * | |
185 | * | |
186 | * | |
187 | * @param dependencySets | |
188 | */ | |
189 | public void setDependencySets(java.util.List dependencySets) | |
190 | { | |
191 | 0 | this.dependencySets = dependencySets; |
192 | 0 | } //-- void setDependencySets(java.util.List) |
193 | ||
194 | /** | |
195 | * Set | |
196 | * | |
197 | * Specifies which groups of files to include in | |
198 | * the assembly. A | |
199 | * fileSet is specified by providing one or more of | |
200 | * <fileSet> | |
201 | * subelements. | |
202 | * | |
203 | * | |
204 | * | |
205 | * @param fileSets | |
206 | */ | |
207 | public void setFileSets(java.util.List fileSets) | |
208 | { | |
209 | 0 | this.fileSets = fileSets; |
210 | 0 | } //-- void setFileSets(java.util.List) |
211 | ||
212 | /** | |
213 | * Set | |
214 | * | |
215 | * Specifies which single files to include in the | |
216 | * assembly. A file | |
217 | * is specified by providing one or more of | |
218 | * <file> | |
219 | * subelements. | |
220 | * | |
221 | * | |
222 | * | |
223 | * @param files | |
224 | */ | |
225 | public void setFiles(java.util.List files) | |
226 | { | |
227 | 0 | this.files = files; |
228 | 0 | } //-- void setFiles(java.util.List) |
229 | ||
230 | /** | |
231 | * Set | |
232 | * | |
233 | * Specifies a set of repositories to include in | |
234 | * the assembly. A | |
235 | * repository is specified by providing one or more | |
236 | * of | |
237 | * <repository> subelements. | |
238 | * | |
239 | * | |
240 | * | |
241 | * @param repositories | |
242 | */ | |
243 | public void setRepositories(java.util.List repositories) | |
244 | { | |
245 | 0 | this.repositories = repositories; |
246 | 0 | } //-- void setRepositories(java.util.List) |
247 | ||
248 | ||
249 | 0 | private String modelEncoding = "UTF-8"; |
250 | ||
251 | public void setModelEncoding( String modelEncoding ) | |
252 | { | |
253 | 0 | this.modelEncoding = modelEncoding; |
254 | 0 | } |
255 | ||
256 | public String getModelEncoding() | |
257 | { | |
258 | 0 | return modelEncoding; |
259 | }} |