|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.brb.implementor.ImplementorHelper
A helper class for RuleImplementor implementations.
Field Summary | |
---|---|
static int |
EQUALS
|
static int |
GREATER_THAN
|
static int |
GREATER_THAN_EQUALS
|
static int |
LESS_THAN
|
static int |
LESS_THAN_EQUALS
|
static int |
RANGE_INCLUSIVE
|
static int |
RANGE_NONINCLUSIVE
|
Constructor Summary | |
---|---|
ImplementorHelper()
|
Method Summary | |
---|---|
static void |
assertParamLength(java.lang.Object[] params,
int correctParamLength,
java.lang.String name)
Ensure that the parameter list which is passed has the given number of parameters, and that each parameter is non-null. |
static void |
assertParamLengthAllowNulls(java.lang.Object[] params,
int correctParamLength,
java.lang.String name)
Ensure that the parameter list which is passed has the given number of parameters. |
static ConstraintReturn |
compare(java.lang.Object val1,
java.lang.Object val2,
java.lang.Object val3,
int operator,
java.lang.String name)
Compare the values using the given operator and return the result. |
static java.lang.String |
getMessage(java.lang.String resourceKey,
java.lang.Object[] formatArgs)
Retrieve a translated message from the Business Rule Beans default resource bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EQUALS
public static final int LESS_THAN
public static final int LESS_THAN_EQUALS
public static final int GREATER_THAN
public static final int GREATER_THAN_EQUALS
public static final int RANGE_INCLUSIVE
public static final int RANGE_NONINCLUSIVE
Constructor Detail |
public ImplementorHelper()
Method Detail |
public static void assertParamLength(java.lang.Object[] params, int correctParamLength, java.lang.String name) throws BRBeansIllegalArgumentException
params
- the parameter list to checkcorrectParamLength
- the proper length of the parameter listname
- the class and method name of the calling method to fill in as
replacement text.
BRBeansIllegalArgumentException
- if the parameter list is the wrong length, or any of
the parameters are nullpublic static void assertParamLengthAllowNulls(java.lang.Object[] params, int correctParamLength, java.lang.String name) throws BRBeansIllegalArgumentException
params
- the parameter list to checkcorrectParamLength
- the proper length of the parameter listname
- the class and method name of the calling method to fill in as
replacement text.
BRBeansIllegalArgumentException
- if the parameter list is the wrong lengthpublic static ConstraintReturn compare(java.lang.Object val1, java.lang.Object val2, java.lang.Object val3, int operator, java.lang.String name) throws BRBeansIllegalArgumentException
If the operator specified is RANGE_INCLUSIVE or RANGE_NONINCLUSIVE, then all three values must be specified (none can be null). In this case val1 is the lower bound of the range, val2 is the value to be checked, and val3 is the upper bound. If any of the three values is null, an exception is thrown. For other operators only val1 and val2 are used. val3 is ignored. val1 is the left-hand operand and val2 is the right-hand operand.
val1
- the left-hand operandval2
- the right-hand operand, or middle operand if val3 is non-nullval3
- the right-hand operand for a three-operand operator, or nulloperator
- the operator to usename
- the rule implementor calling this method
BRBeansIllegalArgumentException
public static java.lang.String getMessage(java.lang.String resourceKey, java.lang.Object[] formatArgs)
resourceKey
- The key in the resource bundle that
will be used to select the specific message that is retrieved for
getMessage().
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |