1 package org.apache.maven.plugin.checkstyle;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.ByteArrayOutputStream;
23 import java.io.File;
24 import java.util.List;
25
26 import org.apache.maven.model.Resource;
27 import org.apache.maven.plugin.logging.Log;
28 import org.apache.maven.project.MavenProject;
29
30 import com.puppycrawl.tools.checkstyle.DefaultLogger;
31 import com.puppycrawl.tools.checkstyle.api.AuditListener;
32
33
34
35
36
37
38 public class CheckstyleExecutorRequest
39 {
40
41
42
43
44 private String includes;
45
46
47
48
49 private String excludes;
50
51 private MavenProject project;
52
53 private Log log;
54
55 private String suppressionsLocation;
56
57 private boolean includeTestSourceDirectory;
58
59 private File testSourceDirectory;
60
61 private File sourceDirectory;
62
63 private List<Resource> resources;
64
65 private boolean failsOnError;
66
67 private AuditListener listener;
68
69 private boolean consoleOutput;
70
71 private DefaultLogger defaultLogger;
72
73 private ByteArrayOutputStream stringOutputStream;
74
75 private String propertiesLocation;
76
77
78
79 private String configLocation;
80
81 private String propertyExpansion;
82
83 private String headerLocation;
84
85 private String cacheFile;
86
87 private String suppressionsFileExpression;
88
89 private String encoding;
90
91
92
93
94 private boolean aggregate = false;
95
96
97
98
99 private List<MavenProject> reactorProjects;
100
101
102
103
104 public CheckstyleExecutorRequest( )
105 {
106
107 }
108
109
110
111
112
113
114 public String getIncludes()
115 {
116 return includes;
117 }
118
119 public CheckstyleExecutorRequest setIncludes( String includes )
120 {
121 this.includes = includes;
122 return this;
123 }
124
125 public String getExcludes()
126 {
127 return excludes;
128 }
129
130 public CheckstyleExecutorRequest setExcludes( String excludes )
131 {
132 this.excludes = excludes;
133 return this;
134 }
135
136 public MavenProject getProject()
137 {
138 return project;
139 }
140
141 public CheckstyleExecutorRequest setProject( MavenProject project )
142 {
143 this.project = project;
144 return this;
145 }
146
147 public Log getLog()
148 {
149 return log;
150 }
151
152 public CheckstyleExecutorRequest setLog( Log log )
153 {
154 this.log = log;
155 return this;
156 }
157
158 public String getSuppressionsLocation()
159 {
160 return suppressionsLocation;
161 }
162
163 public CheckstyleExecutorRequest setSuppressionsLocation( String suppressionsLocation )
164 {
165 this.suppressionsLocation = suppressionsLocation;
166 return this;
167 }
168
169 public boolean isIncludeTestSourceDirectory()
170 {
171 return includeTestSourceDirectory;
172 }
173
174 public CheckstyleExecutorRequest setIncludeTestSourceDirectory( boolean includeTestSourceDirectory )
175 {
176 this.includeTestSourceDirectory = includeTestSourceDirectory;
177 return this;
178 }
179
180 public File getTestSourceDirectory()
181 {
182 return testSourceDirectory;
183 }
184
185 public CheckstyleExecutorRequest setTestSourceDirectory( File testSourceDirectory )
186 {
187 this.testSourceDirectory = testSourceDirectory;
188 return this;
189 }
190
191 public File getSourceDirectory()
192 {
193 return sourceDirectory;
194 }
195
196 public CheckstyleExecutorRequest setSourceDirectory( File sourceDirectory )
197 {
198 this.sourceDirectory = sourceDirectory;
199 return this;
200 }
201
202 public List<Resource> getResources()
203 {
204 return resources;
205 }
206
207 public CheckstyleExecutorRequest setResources( List<Resource> resources )
208 {
209 this.resources = resources;
210 return this;
211 }
212
213 public boolean isFailsOnError()
214 {
215 return failsOnError;
216 }
217
218 public CheckstyleExecutorRequest setFailsOnError( boolean failsOnError )
219 {
220 this.failsOnError = failsOnError;
221 return this;
222 }
223
224 public AuditListener getListener()
225 {
226 return listener;
227 }
228
229 public CheckstyleExecutorRequest setListener( AuditListener listener )
230 {
231 this.listener = listener;
232 return this;
233 }
234
235 public boolean isConsoleOutput()
236 {
237 return consoleOutput;
238 }
239
240 public CheckstyleExecutorRequest setConsoleOutput( boolean consoleOutput )
241 {
242 this.consoleOutput = consoleOutput;
243 return this;
244 }
245
246 public CheckstyleExecutorRequest setConsoleListener( DefaultLogger defaultLogger )
247 {
248 this.defaultLogger = defaultLogger;
249 return this;
250 }
251
252 public DefaultLogger getConsoleListener()
253 {
254 return this.defaultLogger;
255 }
256
257 public ByteArrayOutputStream getStringOutputStream()
258 {
259 return stringOutputStream;
260 }
261
262 public CheckstyleExecutorRequest setStringOutputStream( ByteArrayOutputStream stringOutputStream )
263 {
264 this.stringOutputStream = stringOutputStream;
265 return this;
266 }
267
268 public String getConfigLocation()
269 {
270 return configLocation;
271 }
272
273 public CheckstyleExecutorRequest setConfigLocation( String configLocation )
274 {
275 this.configLocation = configLocation;
276 return this;
277 }
278
279 public String getPropertyExpansion()
280 {
281 return propertyExpansion;
282 }
283
284 public CheckstyleExecutorRequest setPropertyExpansion( String propertyExpansion )
285 {
286 this.propertyExpansion = propertyExpansion;
287 return this;
288 }
289
290 public String getHeaderLocation()
291 {
292 return headerLocation;
293 }
294
295 public CheckstyleExecutorRequest setHeaderLocation( String headerLocation )
296 {
297 this.headerLocation = headerLocation;
298 return this;
299 }
300
301 public String getCacheFile()
302 {
303 return cacheFile;
304 }
305
306 public CheckstyleExecutorRequest setCacheFile( String cacheFile )
307 {
308 this.cacheFile = cacheFile;
309 return this;
310 }
311
312 public String getSuppressionsFileExpression()
313 {
314 return suppressionsFileExpression;
315 }
316
317 public CheckstyleExecutorRequest setSuppressionsFileExpression( String suppressionsFileExpression )
318 {
319 this.suppressionsFileExpression = suppressionsFileExpression;
320 return this;
321 }
322
323 public String getEncoding()
324 {
325 return encoding;
326 }
327
328 public CheckstyleExecutorRequest setEncoding( String encoding )
329 {
330 this.encoding = encoding;
331 return this;
332 }
333
334 public String getPropertiesLocation()
335 {
336 return propertiesLocation;
337 }
338
339 public void setPropertiesLocation( String propertiesLocation )
340 {
341 this.propertiesLocation = propertiesLocation;
342 }
343
344
345
346
347
348
349 public boolean isAggregate()
350 {
351 return aggregate;
352 }
353
354
355
356
357
358
359
360 public CheckstyleExecutorRequest setAggregate( boolean pAggregate )
361 {
362 this.aggregate = pAggregate;
363 return this;
364 }
365
366
367
368
369
370
371 public List<MavenProject> getReactorProjects()
372 {
373 return reactorProjects;
374 }
375
376
377
378
379
380
381
382 public CheckstyleExecutorRequest setReactorProjects( List<MavenProject> pReactorProjects )
383 {
384 this.reactorProjects = pReactorProjects;
385 return this;
386 }
387 }