com.ibm.ibmi.are.xml.rules.fileattr
Class FileCreationTimeRule
java.lang.Object
com.ibm.are.xml.rules.Rule
com.ibm.are.xml.rules.fileattr.FileAttributeRule
com.ibm.ibmi.are.xml.rules.fileattr.IBMiFileAttributeRule
com.ibm.ibmi.are.xml.rules.fileattr.FileCreationTimeRule
public class FileCreationTimeRule
- extends IBMiFileAttributeRule
Rule class that verifies the creation date and time of an IFS file
- Author:
- IBM
Field Summary |
static java.lang.String |
COPYRIGHT
Copyright for class bytecode |
Constructor Summary |
FileCreationTimeRule(java.util.Map ruleInfo)
The API constructor for this class. |
FileCreationTimeRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo,
java.lang.String theFile,
java.lang.String expectedCreationTime)
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- Copyright for class bytecode
- See Also:
- Constant Field Values
FileCreationTimeRule
public FileCreationTimeRule(java.util.Map ruleInfo)
- The API constructor for this class. This API can be used to leverage
the capabilities of this rule class from within any Application Runtime Expert plugin.
- Parameters:
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 |
name |
The full path of the file to verify |
Yes |
Path must be fully qualified |
N/A |
creationTime |
The expected creation time for the specified file |
Yes |
The expected value must be formatted as a long value, which represents the creation time of the file as the number of milliseconds since Epoch (January 1st, 1970). |
N/A |
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 |
FileCreationTimeRule
public FileCreationTimeRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo,
java.lang.String theFile,
java.lang.String expectedCreationTime)
- This constructor is for internal class use only. New instances of this class should only
be created using the API constructor for this class.
run
public boolean run(com.ibm.are.plugin.Plugin plugin)
- Runs the rule, which performs the check/verification implemented by that rule.
- Specified by:
run
in class Rule
- Parameters:
plugin
- The plugin for which the rule is being run for.
- Returns:
true
if the verification was successful and no problems were found.
false
if the verification resulted in a problem being found and reported.