rj.tools.jcsc.rules
Class Rule

java.lang.Object
  extended byrj.tools.jcsc.rules.Rule

public class Rule
extends java.lang.Object

Encapsulates a Rule

Version:
__0.98.1__
Author:
Ralph Jocham

Constructor Summary
Rule(java.lang.String name, java.lang.String category, java.lang.String enabled, java.lang.String type, java.lang.String value, java.lang.String severity, java.lang.String[] choices)
          Creates a new Rule instance
 
Method Summary
 java.lang.String getCategory()
          Return the category of the Rule
 java.lang.String[] getChoices()
          If the Type is 'multchoice' get all the possible choices in an array of Strings
 java.lang.String getExamplePath()
          Get the path of the example .html String
 java.lang.String getName()
          Returns the name of the Rule
 int getSeverity()
          Get the severity of the Rule
 java.lang.String getType()
          Get the Type of the Rule: regexp regexp-multiline boolean ...
 java.lang.String getValue()
          Get the value to which the Rule is set
 boolean isEnabled()
          Is the Rule enabled
 void setEnabled(boolean flag)
          En-/disable the Rule
 void setSeverity(int severity)
          Set the Priority of the Rule
 void setValue(java.lang.String value)
          Set the value of the Rule
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rule

public Rule(java.lang.String name,
            java.lang.String category,
            java.lang.String enabled,
            java.lang.String type,
            java.lang.String value,
            java.lang.String severity,
            java.lang.String[] choices)
Creates a new Rule instance

Parameters:
name -
category -
enabled -
type -
value -
severity -
choices -
Method Detail

getName

public java.lang.String getName()
Returns the name of the Rule

Returns:
String

getCategory

public java.lang.String getCategory()
Return the category of the Rule

Returns:
String

isEnabled

public boolean isEnabled()
Is the Rule enabled

Returns:
boolean

setEnabled

public void setEnabled(boolean flag)
En-/disable the Rule

Parameters:
flag -

getType

public java.lang.String getType()
Get the Type of the Rule:

Returns:
String

getValue

public java.lang.String getValue()
Get the value to which the Rule is set

Returns:
String

setValue

public void setValue(java.lang.String value)
Set the value of the Rule

Parameters:
value -

getSeverity

public int getSeverity()
Get the severity of the Rule

Returns:
itn

setSeverity

public void setSeverity(int severity)
Set the Priority of the Rule

Parameters:
severity -

getChoices

public java.lang.String[] getChoices()
If the Type is 'multchoice' get all the possible choices in an array of Strings

Returns:
String[]

getExamplePath

public java.lang.String getExamplePath()
Get the path of the example .html String

Returns:
String

toString

public java.lang.String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns:
a string representation of the object.


(c) 1999-2005 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License