com.ibm.ibmi.are.xml.rules.userprofile
Class UserProfileRule

java.lang.Object
  extended by com.ibm.are.xml.rules.Rule
      extended by com.ibm.ibmi.are.xml.rules.userprofile.UserProfileRule
Direct Known Subclasses:
AccountingCodeRule, CcsidRule, CharacterIdRule, CountryIdRule, GroupAuthorityRule, GroupAuthorityTypeRule, GroupIdRule, GroupProfileRule, JobDescriptionRule, LanguageIdRule, LimitCapabilitiesRule, LocaleRule, MessageQueueRule, OutputQueueRule, OwnerRule, PasswordExpirationIntervalRule, PasswordExpiredRule, PasswordRule, SpecialAuthorityRule, SpecialEnvironmentRule, StatusRule, SupplementalGroupRule, UserClassRule, UserIdRule

public abstract class UserProfileRule
extends Rule

Abstract base class for all user profile verification rules

Author:
IBM

Field Summary
static java.lang.String COPYRIGHT
          Copyright for class bytecode
static java.lang.String MAP_ITEM_NAME
          The user profile name
 
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
UserProfileRule(java.util.Map ruleInfo)
          The API constructor for this class.
UserProfileRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo, java.lang.String name, Check checkOperation)
          This constructor is for internal class use only.
 
Method Summary
abstract  java.lang.Object getActualValue(com.ibm.as400.access.User theUser)
          Retrieves the actual value for the user profile field that is being verified.
abstract  java.lang.String getFieldName()
          Retrieves the descriptive name of the user profile field
 com.ibm.as400.access.User getUser(com.ibm.are.plugin.Plugin plugin)
          Retrieves the IBM Toolbox for Java User object that models the user profile being verified
 java.lang.String getUserName()
          Retrieves the user profile name
 boolean run(com.ibm.are.plugin.Plugin plugin)
          Runs the rule, which performs the check/verification implemented by that rule.
 void setUserName(java.lang.String theName)
          Sets the user profile name
 
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

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright for class bytecode

See Also:
Constant Field Values

MAP_ITEM_NAME

public static final java.lang.String MAP_ITEM_NAME
The user profile name

See Also:
Constant Field Values
Constructor Detail

UserProfileRule

public UserProfileRule(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 user profile name. Yes Any valid IBM i user profile name N/A
checkClass The data type (class) of the expected and actual values. No
  • string
  • numeric
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
  • true
  • false

A value of true means that case is honored when performing string comparisons. A value of false means that case is ignored when performing string comparisons.

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
  • warning
  • info
error

UserProfileRule

public UserProfileRule(com.ibm.are.xml.rules.XmlNodeInfo nodeInfo,
                       java.lang.String name,
                       Check checkOperation)
This constructor is for internal class use only. New instances of this class should only be created using the API constructor for this class.

Method Detail

getUserName

public java.lang.String getUserName()
Retrieves the user profile name

Returns:
The user profile name

setUserName

public void setUserName(java.lang.String theName)
Sets the user profile name

Parameters:
theName - The user profile name to set

getUser

public com.ibm.as400.access.User getUser(com.ibm.are.plugin.Plugin plugin)
Retrieves the IBM Toolbox for Java User object that models the user profile being verified

Parameters:
plugin - The plugin for which the user profile is being verified
Returns:
The IBM Toolbox for Java User object that models the user profile being verified

getActualValue

public abstract java.lang.Object getActualValue(com.ibm.as400.access.User theUser)
Retrieves the actual value for the user profile field that is being verified.

Parameters:
theUser - The user profile to retrieve the actual value from
Returns:
The actual value for the field that is being verified

getFieldName

public abstract java.lang.String getFieldName()
Retrieves the descriptive name of the user profile field

Returns:
The descriptive name of the user profile field

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.