org.cogroo.tools.checker
Class JavaRuleDefinition

java.lang.Object
  extended by org.cogroo.tools.checker.JavaRuleDefinition
All Implemented Interfaces:
RuleDefinition

public class JavaRuleDefinition
extends Object
implements RuleDefinition

Implementation of RuleDefinitionI to be used in Java based rules. This is used to display human readable information about the rules in places like Cogroo Comunidade


Constructor Summary
JavaRuleDefinition(String id, String category, String group, String description, String message, String shortMessage, List<Example> examples)
          Creates a new Java rule definition
 
Method Summary
 String getCategory()
          rule category
 String getDescription()
          a description
 List<Example> getExamples()
          examples of this errors catch by this rule
 String getGroup()
          rule group
 String getId()
          prefixed identifier
 String getMessage()
          long error message generated by this rule
 RuleType getRuleType()
          Will always return RuleType.JAVA
 String getShortMessage()
          short error message generated by this rule
 boolean isXMLBased()
          Will allways return false
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaRuleDefinition

public JavaRuleDefinition(String id,
                          String category,
                          String group,
                          String description,
                          String message,
                          String shortMessage,
                          List<Example> examples)
Creates a new Java rule definition

Parameters:
id - prefixed identifier
category - rule category
group - rule group
description - a description
message - long error message generated by this rule
shortMessage - short error message generated by this rule
examples - examples of this errors catch by this rule
Method Detail

getId

public String getId()
Description copied from interface: RuleDefinition
prefixed identifier

Specified by:
getId in interface RuleDefinition
Returns:
the prefixed identifier

getCategory

public String getCategory()
Description copied from interface: RuleDefinition
rule category

Specified by:
getCategory in interface RuleDefinition
Returns:
the rule category

getGroup

public String getGroup()
Description copied from interface: RuleDefinition
rule group

Specified by:
getGroup in interface RuleDefinition
Returns:
the rule group

getDescription

public String getDescription()
Description copied from interface: RuleDefinition
a description

Specified by:
getDescription in interface RuleDefinition
Returns:
a description

getMessage

public String getMessage()
Description copied from interface: RuleDefinition
long error message generated by this rule

Specified by:
getMessage in interface RuleDefinition
Returns:
the long error message generated by this rule

getShortMessage

public String getShortMessage()
Description copied from interface: RuleDefinition
short error message generated by this rule

Specified by:
getShortMessage in interface RuleDefinition
Returns:
short error message generated by this rule

getExamples

public List<Example> getExamples()
Description copied from interface: RuleDefinition
examples of this errors catch by this rule

Specified by:
getExamples in interface RuleDefinition
Returns:
examples of this errors catch by this rule

getRuleType

public RuleType getRuleType()
Will always return RuleType.JAVA

Specified by:
getRuleType in interface RuleDefinition
Returns:
See Also:
RuleDefinition.getRuleType()

isXMLBased

public boolean isXMLBased()
Will allways return false

Specified by:
isXMLBased in interface RuleDefinition
Returns:
True if this definition is from a XML based rule.
See Also:
RuleDefinition.isXMLBased()


Copyright © 2012-2013 CoGrOO. All Rights Reserved.