|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.are.xml.rules.Rule
com.ibm.are.xml.rules.command.SearchRule
com.ibm.ibmi.are.xml.rules.command.IBMiMessageSearchRule
public class IBMiMessageSearchRule
Rule class that searches the messages generated by an IBM i command to verify it contains the specified text
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
Copyright for class bytecode |
static java.lang.String |
MESSAGE_OUTPUT
The message output source |
static java.lang.String |
MESSAGES_OUTPUT
Same as the MESSAGE_OUTPUT |
Fields inherited from class com.ibm.are.xml.rules.command.SearchRule |
---|
MAP_ITEM_SOURCE, STANDARD_ERR, STANDARD_OUT |
Fields inherited from class com.ibm.are.xml.rules.Rule |
---|
MAP_ITEM_CHECK_CLASS, MAP_ITEM_CHECK_OBJECT, MAP_ITEM_CHECK_TYPE, MAP_ITEM_ERROR_LEVEL, MAP_ITEM_EXPECTED_VALUE, MAP_ITEM_MATCH_CASE |
Constructor Summary | |
---|---|
IBMiMessageSearchRule(java.util.Map ruleInfo)
The API constructor for this class. |
|
IBMiMessageSearchRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo,
Check checkOperation,
com.ibm.are.xml.rules.command.CommandRunRule commandRule,
java.lang.String source)
This constructor is for internal class use only. |
Method Summary | |
---|---|
boolean |
run(com.ibm.are.plugin.Plugin plugin)
Runs the rule, which performs the check/verification implemented by that rule. |
Methods inherited from class com.ibm.are.xml.rules.Rule |
---|
getNodeInfo, report, report |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String MESSAGE_OUTPUT
public static final java.lang.String MESSAGES_OUTPUT
MESSAGE_OUTPUT
Constructor Detail |
---|
public IBMiMessageSearchRule(java.util.Map ruleInfo)
ruleInfo
- Any object that implements the java.util.Map
interface.
This map contains a set of key/value pairs which specify all of the
information needed by this rule class to perform its check.
Rule Info Map Contents
The table below describes all items, both required and optional, that are allowed to be
in the ruleInfo
map passed to the API constructor.
Key | Description | Required | Valid Values | Default Value |
---|---|---|---|---|
type | The type of shell the command needs to be run in | Yes |
|
N/A |
commandString | The full command string to be run | Yes | The command string must be formatted such that it can be run directly in the shell environment specified by the type item in the map. |
N/A |
source | The output source, which is the IBM i message output | Yes | Both the IBM i message ID itself as well as the message text is searched for the specified text | N/A |
checkClass | The data type (class) of the expected and actual values. | No |
|
string |
checkType | The type of check to perform between the expected and actual values. Or said another way,
this value specifies how the expected and actual values are compared. The check type
is related to the check class, so care must be taken when specifying these two values.
For example, a check type of inRange is valid only if the check class is set to
numeric . |
No | For a list of all supported check types, see the com.ibm.are.xml.check.Check class documentation |
equals |
expectedValue | The expected value is the value that is used to compare against, or check, the actual value. | Yes | The only limitations on this value is that it cannot be null or an empty, zero length string. |
N/A |
matchCase | Specifies whether or not character case is honored when performing string comparisons.
This value is only applicable when the check class value is set to string , and is
ignored for any other check class. |
No |
A value of |
false |
errorLevel | Specifies the severity level a problem is reported at for this check. If the comparison between the
expected and actual values is not successful, which means the comparison result was false ,
a problem is reported. The severity of the reported problem is determined by the error level. |
No |
|
error |
public IBMiMessageSearchRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo, Check checkOperation, com.ibm.are.xml.rules.command.CommandRunRule commandRule, java.lang.String source)
Method Detail |
---|
public boolean run(com.ibm.are.plugin.Plugin plugin)
run
in class SearchRule
plugin
- The plugin for which the rule is being run for.
true
if the verification was successful and no problems were found.
false
if the verification resulted in a problem being found and reported.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |