1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.plugins.checkstyle.exec;
20
21 import java.io.ByteArrayOutputStream;
22 import java.io.File;
23 import java.util.Collection;
24 import java.util.List;
25
26 import com.puppycrawl.tools.checkstyle.DefaultLogger;
27 import com.puppycrawl.tools.checkstyle.api.AuditListener;
28 import org.apache.maven.artifact.Artifact;
29 import org.apache.maven.model.Resource;
30 import org.apache.maven.project.MavenProject;
31
32
33
34
35
36
37 public class CheckstyleExecutorRequest {
38
39
40
41
42 private String includes;
43
44
45
46
47 private String excludes;
48
49
50
51
52 private String resourceIncludes;
53
54
55
56
57 private String resourceExcludes;
58
59 private MavenProject project;
60
61 private String suppressionsLocation;
62
63 private boolean includeTestSourceDirectory;
64
65 private Collection<File> testSourceDirectories;
66
67 private Collection<File> sourceDirectories;
68
69 private boolean includeResources;
70
71 private boolean includeTestResources;
72
73 private List<Resource> resources;
74
75 private List<Resource> testResources;
76
77 private boolean failsOnError;
78
79 private AuditListener listener;
80
81 private boolean consoleOutput;
82
83 private DefaultLogger defaultLogger;
84
85 private ByteArrayOutputStream stringOutputStream;
86
87 private String propertiesLocation;
88
89
90
91 private String configLocation;
92
93 private String propertyExpansion;
94
95 private String headerLocation;
96
97 private String cacheFile;
98
99 private String suppressionsFileExpression;
100
101 private String encoding;
102
103
104
105
106 private boolean aggregate = false;
107
108
109
110
111 private List<MavenProject> reactorProjects;
112
113
114
115
116 private List<Artifact> licenseArtifacts;
117
118
119
120
121 private List<Artifact> configurationArtifacts;
122
123
124
125
126 private boolean omitIgnoredModules;
127
128
129
130
131 public CheckstyleExecutorRequest() {
132
133 }
134
135
136
137
138
139
140 public String getIncludes() {
141 return includes;
142 }
143
144 public CheckstyleExecutorRequest setIncludes(String includes) {
145 this.includes = includes;
146 return this;
147 }
148
149 public String getExcludes() {
150 return excludes;
151 }
152
153 public CheckstyleExecutorRequest setExcludes(String excludes) {
154 this.excludes = excludes;
155 return this;
156 }
157
158 public String getResourceIncludes() {
159 return resourceIncludes;
160 }
161
162 public CheckstyleExecutorRequest setResourceIncludes(String resourceIncludes) {
163 this.resourceIncludes = resourceIncludes;
164 return this;
165 }
166
167 public String getResourceExcludes() {
168 return resourceExcludes;
169 }
170
171 public CheckstyleExecutorRequest setResourceExcludes(String resourceExcludes) {
172 this.resourceExcludes = resourceExcludes;
173 return this;
174 }
175
176 public MavenProject getProject() {
177 return project;
178 }
179
180 public CheckstyleExecutorRequest setProject(MavenProject project) {
181 this.project = project;
182 return this;
183 }
184
185 public String getSuppressionsLocation() {
186 return suppressionsLocation;
187 }
188
189 public CheckstyleExecutorRequest setSuppressionsLocation(String suppressionsLocation) {
190 this.suppressionsLocation = suppressionsLocation;
191 return this;
192 }
193
194 public boolean isIncludeTestSourceDirectory() {
195 return includeTestSourceDirectory;
196 }
197
198 public CheckstyleExecutorRequest setIncludeTestSourceDirectory(boolean includeTestSourceDirectory) {
199 this.includeTestSourceDirectory = includeTestSourceDirectory;
200 return this;
201 }
202
203 public Collection<File> getTestSourceDirectories() {
204 return testSourceDirectories;
205 }
206
207 public CheckstyleExecutorRequest setTestSourceDirectories(Collection<File> testSourceDirectories) {
208 this.testSourceDirectories = testSourceDirectories;
209 return this;
210 }
211
212 public Collection<File> getSourceDirectories() {
213 return sourceDirectories;
214 }
215
216 public CheckstyleExecutorRequest setSourceDirectories(Collection<File> sourceDirectories) {
217 this.sourceDirectories = sourceDirectories;
218 return this;
219 }
220
221 public List<Resource> getResources() {
222 return resources;
223 }
224
225 public CheckstyleExecutorRequest setResources(List<Resource> resources) {
226 this.resources = resources;
227 return this;
228 }
229
230 public List<Resource> getTestResources() {
231 return testResources;
232 }
233
234 public CheckstyleExecutorRequest setTestResources(List<Resource> testResources) {
235 this.testResources = testResources;
236 return this;
237 }
238
239 public boolean isFailsOnError() {
240 return failsOnError;
241 }
242
243 public CheckstyleExecutorRequest setFailsOnError(boolean failsOnError) {
244 this.failsOnError = failsOnError;
245 return this;
246 }
247
248 public AuditListener getListener() {
249 return listener;
250 }
251
252 public CheckstyleExecutorRequest setListener(AuditListener listener) {
253 this.listener = listener;
254 return this;
255 }
256
257 public boolean isConsoleOutput() {
258 return consoleOutput;
259 }
260
261 public CheckstyleExecutorRequest setConsoleOutput(boolean consoleOutput) {
262 this.consoleOutput = consoleOutput;
263 return this;
264 }
265
266 public CheckstyleExecutorRequest setConsoleListener(DefaultLogger defaultLogger) {
267 this.defaultLogger = defaultLogger;
268 return this;
269 }
270
271 public DefaultLogger getConsoleListener() {
272 return this.defaultLogger;
273 }
274
275 public ByteArrayOutputStream getStringOutputStream() {
276 return stringOutputStream;
277 }
278
279 public CheckstyleExecutorRequest setStringOutputStream(ByteArrayOutputStream stringOutputStream) {
280 this.stringOutputStream = stringOutputStream;
281 return this;
282 }
283
284 public String getConfigLocation() {
285 return configLocation;
286 }
287
288 public CheckstyleExecutorRequest setConfigLocation(String configLocation) {
289 this.configLocation = configLocation;
290 return this;
291 }
292
293 public String getPropertyExpansion() {
294 return propertyExpansion;
295 }
296
297 public CheckstyleExecutorRequest setPropertyExpansion(String propertyExpansion) {
298 this.propertyExpansion = propertyExpansion;
299 return this;
300 }
301
302 public String getHeaderLocation() {
303 return headerLocation;
304 }
305
306 public CheckstyleExecutorRequest setHeaderLocation(String headerLocation) {
307 this.headerLocation = headerLocation;
308 return this;
309 }
310
311 public String getCacheFile() {
312 return cacheFile;
313 }
314
315 public CheckstyleExecutorRequest setCacheFile(String cacheFile) {
316 this.cacheFile = cacheFile;
317 return this;
318 }
319
320 public String getSuppressionsFileExpression() {
321 return suppressionsFileExpression;
322 }
323
324 public CheckstyleExecutorRequest setSuppressionsFileExpression(String suppressionsFileExpression) {
325 this.suppressionsFileExpression = suppressionsFileExpression;
326 return this;
327 }
328
329 public String getEncoding() {
330 return encoding;
331 }
332
333 public CheckstyleExecutorRequest setEncoding(String encoding) {
334 this.encoding = encoding;
335 return this;
336 }
337
338 public String getPropertiesLocation() {
339 return propertiesLocation;
340 }
341
342 public CheckstyleExecutorRequest setPropertiesLocation(String propertiesLocation) {
343 this.propertiesLocation = propertiesLocation;
344 return this;
345 }
346
347
348
349
350
351
352 public boolean isAggregate() {
353 return aggregate;
354 }
355
356
357
358
359
360
361
362 public CheckstyleExecutorRequest setAggregate(boolean pAggregate) {
363 this.aggregate = pAggregate;
364 return this;
365 }
366
367
368
369
370
371
372 public List<MavenProject> getReactorProjects() {
373 return reactorProjects;
374 }
375
376
377
378
379
380
381
382 public CheckstyleExecutorRequest setReactorProjects(List<MavenProject> pReactorProjects) {
383 this.reactorProjects = pReactorProjects;
384 return this;
385 }
386
387
388
389
390
391
392 public List<Artifact> getLicenseArtifacts() {
393 return licenseArtifacts;
394 }
395
396
397
398
399
400
401
402 public CheckstyleExecutorRequest setLicenseArtifacts(List<Artifact> licenseArtifacts) {
403 this.licenseArtifacts = licenseArtifacts;
404 return this;
405 }
406
407
408
409
410
411
412 public List<Artifact> getConfigurationArtifacts() {
413 return configurationArtifacts;
414 }
415
416
417
418
419
420
421
422 public CheckstyleExecutorRequest setConfigurationArtifacts(List<Artifact> configArtifacts) {
423 this.configurationArtifacts = configArtifacts;
424 return this;
425 }
426
427 public boolean isIncludeResources() {
428 return includeResources;
429 }
430
431
432
433
434
435 public CheckstyleExecutorRequest setIncludeResources(boolean includeResources) {
436 this.includeResources = includeResources;
437 return this;
438 }
439
440 public boolean isIncludeTestResources() {
441 return includeTestResources;
442 }
443
444
445
446
447
448 public CheckstyleExecutorRequest setIncludeTestResources(boolean includeTestResources) {
449 this.includeTestResources = includeTestResources;
450 return this;
451 }
452
453
454
455
456
457
458 public boolean isOmitIgnoredModules() {
459 return omitIgnoredModules;
460 }
461
462
463
464
465
466 public CheckstyleExecutorRequest setOmitIgnoredModules(boolean omitIgnoredModules) {
467 this.omitIgnoredModules = omitIgnoredModules;
468 return this;
469 }
470 }