Coverage Report - org.apache.maven.plugin.checkstyle.CheckstyleExecutorRequest
 
Classes in this File Line Coverage Branch Coverage Complexity
CheckstyleExecutorRequest
98%
61/62
N/A
1
 
 1  
 package org.apache.maven.plugin.checkstyle;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import java.io.ByteArrayOutputStream;
 23  
 import java.io.File;
 24  
 
 25  
 import org.apache.maven.plugin.logging.Log;
 26  
 import org.apache.maven.project.MavenProject;
 27  
 
 28  
 import com.puppycrawl.tools.checkstyle.DefaultLogger;
 29  
 import com.puppycrawl.tools.checkstyle.api.AuditListener;
 30  
 
 31  
 /**
 32  
  * @author <a href="mailto:olamy@apache.org">olamy</a>
 33  
  * @since 2.5
 34  
  * @version $Id$
 35  
  */
 36  
 public class CheckstyleExecutorRequest
 37  
 {
 38  
    
 39  
     /**
 40  
      * Specifies the names filter of the source files to be used for Checkstyle.
 41  
      */
 42  
     private String includes;
 43  
 
 44  
     /**
 45  
      * Specifies the names filter of the source files to be excluded for Checkstyle.
 46  
      */
 47  
     private String excludes;
 48  
     
 49  
     private MavenProject project;
 50  
     
 51  
     private Log log;
 52  
     
 53  
     private String suppressionsLocation;
 54  
     
 55  
     private boolean includeTestSourceDirectory;
 56  
     
 57  
     private File testSourceDirectory;
 58  
     
 59  
     private File sourceDirectory;
 60  
     
 61  
     private boolean failsOnError;
 62  
     
 63  
     private AuditListener listener;
 64  
     
 65  
     private boolean consoleOutput;
 66  
     
 67  
     private DefaultLogger defaultLogger;
 68  
     
 69  
     private ByteArrayOutputStream stringOutputStream;
 70  
     
 71  
     private String propertiesLocation;
 72  
     
 73  
     //
 74  
     
 75  
     private String configLocation;
 76  
 
 77  
     private String propertyExpansion;
 78  
     
 79  
     private String headerLocation; 
 80  
     
 81  
     private String cacheFile;  
 82  
     
 83  
     private String suppressionsFileExpression;
 84  
     
 85  
     private String encoding; 
 86  
 
 87  
     public CheckstyleExecutorRequest( )
 88  32
     {
 89  
         //nothing 
 90  32
     }    
 91  
     
 92  
     public String getIncludes()
 93  
     {
 94  32
         return includes;
 95  
     }
 96  
 
 97  
     public CheckstyleExecutorRequest setIncludes( String includes )
 98  
     {
 99  32
         this.includes = includes;
 100  32
         return this;
 101  
     }
 102  
 
 103  
     public String getExcludes()
 104  
     {
 105  32
         return excludes;
 106  
     }
 107  
 
 108  
     public CheckstyleExecutorRequest setExcludes( String excludes )
 109  
     {
 110  32
         this.excludes = excludes;
 111  32
         return this;
 112  
     }
 113  
 
 114  
     public MavenProject getProject()
 115  
     {
 116  124
         return project;
 117  
     }
 118  
 
 119  
     public CheckstyleExecutorRequest setProject( MavenProject project )
 120  
     {
 121  32
         this.project = project;
 122  32
         return this;
 123  
     }
 124  
 
 125  
     public Log getLog()
 126  
     {
 127  54
         return log;
 128  
     }
 129  
 
 130  
     public CheckstyleExecutorRequest setLog( Log log )
 131  
     {
 132  32
         this.log = log;
 133  32
         return this;
 134  
     }
 135  
 
 136  
     public String getSuppressionsLocation()
 137  
     {
 138  32
         return suppressionsLocation;
 139  
     }
 140  
 
 141  
     public CheckstyleExecutorRequest setSuppressionsLocation( String suppressionsLocation )
 142  
     {
 143  32
         this.suppressionsLocation = suppressionsLocation;
 144  32
         return this;
 145  
     }
 146  
 
 147  
     public boolean isIncludeTestSourceDirectory()
 148  
     {
 149  92
         return includeTestSourceDirectory;
 150  
     }
 151  
 
 152  
     public CheckstyleExecutorRequest setIncludeTestSourceDirectory( boolean includeTestSourceDirectory )
 153  
     {
 154  32
         this.includeTestSourceDirectory = includeTestSourceDirectory;
 155  32
         return this;
 156  
     }
 157  
 
 158  
     public File getTestSourceDirectory()
 159  
     {
 160  0
         return testSourceDirectory;
 161  
     }
 162  
 
 163  
     public CheckstyleExecutorRequest setTestSourceDirectory( File testSourceDirectory )
 164  
     {
 165  32
         this.testSourceDirectory = testSourceDirectory;
 166  32
         return this;
 167  
     }
 168  
 
 169  
     public File getSourceDirectory()
 170  
     {
 171  126
         return sourceDirectory;
 172  
     }
 173  
 
 174  
     public CheckstyleExecutorRequest setSourceDirectory( File sourceDirectory )
 175  
     {
 176  32
         this.sourceDirectory = sourceDirectory;
 177  32
         return this;
 178  
     }
 179  
 
 180  
     public boolean isFailsOnError()
 181  
     {
 182  30
         return failsOnError;
 183  
     }
 184  
 
 185  
     public CheckstyleExecutorRequest setFailsOnError( boolean failsOnError )
 186  
     {
 187  32
         this.failsOnError = failsOnError;
 188  32
         return this;
 189  
     }
 190  
 
 191  
     public AuditListener getListener()
 192  
     {
 193  30
         return listener;
 194  
     }
 195  
 
 196  
     public CheckstyleExecutorRequest setListener( AuditListener listener )
 197  
     {
 198  32
         this.listener = listener;
 199  32
         return this;
 200  
     }
 201  
 
 202  
     public boolean isConsoleOutput()
 203  
     {
 204  30
         return consoleOutput;
 205  
     }
 206  
 
 207  
     public CheckstyleExecutorRequest setConsoleOutput( boolean consoleOutput )
 208  
     {
 209  32
         this.consoleOutput = consoleOutput;
 210  32
         return this;
 211  
     }
 212  
     
 213  
     public CheckstyleExecutorRequest setConsoleListener(DefaultLogger defaultLogger)
 214  
     {
 215  32
         this.defaultLogger = defaultLogger;
 216  32
         return this;
 217  
     }
 218  
 
 219  
     public DefaultLogger getConsoleListener()
 220  
     {
 221  8
         return this.defaultLogger;
 222  
     }
 223  
 
 224  
     public ByteArrayOutputStream getStringOutputStream()
 225  
     {
 226  56
         return stringOutputStream;
 227  
     }
 228  
 
 229  
     public CheckstyleExecutorRequest setStringOutputStream( ByteArrayOutputStream stringOutputStream )
 230  
     {
 231  32
         this.stringOutputStream = stringOutputStream;
 232  32
         return this;
 233  
     }
 234  
     
 235  
     public String getConfigLocation()
 236  
     {
 237  60
         return configLocation;
 238  
     }
 239  
 
 240  
     public CheckstyleExecutorRequest setConfigLocation( String configLocation )
 241  
     {
 242  32
         this.configLocation = configLocation;
 243  32
         return this;
 244  
     }
 245  
 
 246  
     public String getPropertyExpansion()
 247  
     {
 248  30
         return propertyExpansion;
 249  
     }
 250  
 
 251  
     public CheckstyleExecutorRequest setPropertyExpansion( String propertyExpansion )
 252  
     {
 253  32
         this.propertyExpansion = propertyExpansion;
 254  32
         return this;
 255  
     }
 256  
     
 257  
     public String getHeaderLocation()
 258  
     {
 259  34
         return headerLocation;
 260  
     }
 261  
 
 262  
     public CheckstyleExecutorRequest setHeaderLocation( String headerLocation )
 263  
     {
 264  32
         this.headerLocation = headerLocation;
 265  32
         return this;
 266  
     }
 267  
 
 268  
     public String getCacheFile()
 269  
     {
 270  90
         return cacheFile;
 271  
     }
 272  
 
 273  
     public CheckstyleExecutorRequest setCacheFile( String cacheFile )
 274  
     {
 275  32
         this.cacheFile = cacheFile;
 276  32
         return this;
 277  
     }
 278  
 
 279  
     public String getSuppressionsFileExpression()
 280  
     {
 281  30
         return suppressionsFileExpression;
 282  
     }
 283  
 
 284  
     public CheckstyleExecutorRequest setSuppressionsFileExpression( String suppressionsFileExpression )
 285  
     {
 286  32
         this.suppressionsFileExpression = suppressionsFileExpression;
 287  32
         return this;
 288  
     }
 289  
 
 290  
     public String getEncoding()
 291  
     {
 292  90
         return encoding;
 293  
     }
 294  
 
 295  
     public CheckstyleExecutorRequest setEncoding( String encoding )
 296  
     {
 297  32
         this.encoding = encoding;
 298  32
         return this;
 299  
     }    
 300  
     
 301  
     public String getPropertiesLocation()
 302  
     {
 303  30
         return propertiesLocation;
 304  
     }
 305  
 
 306  
     public void setPropertiesLocation( String propertiesLocation )
 307  
     {
 308  32
         this.propertiesLocation = propertiesLocation;
 309  32
     }    
 310  
 }