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