hudson.plugins.violations
Class ViolationsConfig

java.lang.Object
  extended by hudson.plugins.violations.ViolationsConfig
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ViolationsConfig
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

The configuration class for the violations plugin.

See Also:
Serialized Form

Constructor Summary
ViolationsConfig()
          The constructor fot eh violations config.
 
Method Summary
 ViolationsConfig clone()
          Clone the config object.
 void fix()
          After configuration change, reset the numbers if they are out of range.
 java.lang.String getEncoding()
          Get the encoding.
 java.util.List<java.lang.String> getEncodings()
           
 java.lang.String getFauxProjectPath()
          Get the faux project path.
 int getLimit()
          Get the limit.
 java.lang.String getSourcePathPattern()
          Get the source path pattern.
 java.util.Set<Suppression> getSuppressions()
          Get the suppressions.
 java.util.TreeMap<java.lang.String,TypeConfig> getTypeConfigs()
          Get the map of types to their config.
 java.util.Map<java.lang.String,TypeDescriptor> getTypeDescriptorMap()
          Get the map of type descriptors (for jelly use).
 void setEncoding(java.lang.String encoding)
          Set the encoding.
 void setFauxProjectPath(java.lang.String fauxProjectPath)
          Set the faux project path.
 void setLimit(int limit)
          Set the limit.
 void setSourcePathPattern(java.lang.String sourcePathPattern)
          Set the source path patter.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViolationsConfig

public ViolationsConfig()
The constructor fot eh violations config. This creates a config with default values.

Method Detail

getSuppressions

public java.util.Set<Suppression> getSuppressions()
Get the suppressions. THis is created lazily - so synchronize the call.

Returns:
the current set of violation suppressions.

getTypeConfigs

public java.util.TreeMap<java.lang.String,TypeConfig> getTypeConfigs()
Get the map of types to their config.

Returns:
the type to config map.

getTypeDescriptorMap

public java.util.Map<java.lang.String,TypeDescriptor> getTypeDescriptorMap()
Get the map of type descriptors (for jelly use).

Returns:
the map of type descriptors.

clone

public ViolationsConfig clone()
Clone the config object.

Overrides:
clone in class java.lang.Object
Returns:
a copy of this object.

getLimit

public int getLimit()
Get the limit.

Returns:
the limit of violations per type to display per file.

setLimit

public void setLimit(int limit)
Set the limit.

Parameters:
limit - the value to use.

getSourcePathPattern

public java.lang.String getSourcePathPattern()
Get the source path pattern. This is used if one has a class but no source file. This is true for the current maven find bugs plugin. It may be true for other violation detectors as well.

Returns:
the source path pattern.

setSourcePathPattern

public void setSourcePathPattern(java.lang.String sourcePathPattern)
Set the source path patter.

Parameters:
sourcePathPattern - the value to use.

getFauxProjectPath

public java.lang.String getFauxProjectPath()
Get the faux project path. This is used for projects that are not actually in the hudson job directory area.

Returns:
the faux project path - may be blank.

setFauxProjectPath

public void setFauxProjectPath(java.lang.String fauxProjectPath)
Set the faux project path.

Parameters:
fauxProjectPath - the value to use.

getEncodings

public java.util.List<java.lang.String> getEncodings()

getEncoding

public java.lang.String getEncoding()
Get the encoding.

Returns:
the encoding of source files.

setEncoding

public void setEncoding(java.lang.String encoding)
Set the encoding.

Parameters:
encoding - the value to use.

fix

public void fix()
After configuration change, reset the numbers if they are out of range.



Copyright © 2004-2012. All Rights Reserved.