hudson.plugins.cigame.rules.plugins.violation
Class DefaultViolationRule

java.lang.Object
  extended by hudson.plugins.cigame.rules.plugins.violation.DefaultViolationRule
All Implemented Interfaces:
Rule

public class DefaultViolationRule
extends java.lang.Object
implements Rule


Constructor Summary
DefaultViolationRule(java.lang.String typeName, java.lang.String violationName, int pointsForAddingViolation, int pointsForRemovingViolation)
           
 
Method Summary
 RuleResult evaluate(hudson.model.AbstractBuild<?,?> build)
          Evaluate the build and return the points for it
protected  double evaluateReport(hudson.plugins.violations.ViolationsReport report, hudson.plugins.violations.ViolationsReport previousReport)
          Get the score for the current report
 java.lang.String getName()
          Returns the name of the rule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultViolationRule

public DefaultViolationRule(java.lang.String typeName,
                            java.lang.String violationName,
                            int pointsForAddingViolation,
                            int pointsForRemovingViolation)
Method Detail

evaluate

public RuleResult evaluate(hudson.model.AbstractBuild<?,?> build)
Description copied from interface: Rule
Evaluate the build and return the points for it

Specified by:
evaluate in interface Rule
Parameters:
build - build to calculate points for
Returns:
the result of the rule; null if the rule should be ignored.

evaluateReport

protected double evaluateReport(hudson.plugins.violations.ViolationsReport report,
                                hudson.plugins.violations.ViolationsReport previousReport)
Get the score for the current report

Parameters:
report - can not be null
previousReport - can not be null
Returns:

getName

public java.lang.String getName()
Description copied from interface: Rule
Returns the name of the rule

Specified by:
getName in interface Rule
Returns:
name of the rule


Copyright © 2008. All Rights Reserved.