|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.websphere.brb.ConstraintReturn
ConstraintReturn is used to represent the result of firing one constraint type rule. The result may be either true (the rule succeeded) or false (the rule failed). If the result is true, the ConstraintReturn object contains no other information. If the result is false, the ConstraintReturn object may contain information indicating what caused the failure. This failure information can be in one of two forms. If the ConstraintReturn represents the result of a rule with no dependent rules, then the resource bundle name, message key, and replacement arguments will be filled in. These are used by getMessage and getLocalizedMessage to produce formatted text indicating the cause of the failure. If the rule represented by this ConstraintReturn has dependent rules, each of which could have their own result, then the ContraintReturn object will contain an array of ConstraintReturn objects representing the dependent rules. An example of this is the base rule implementor RuleAND which ANDs together the results of its dependent rules. If one or more dependent rules fails, then RuleAND will return a ConstraintReturn object that contains an array of ConstraintReturn objects, one for each dependent rule that failed. When getMessage or getLocalizedMessage is called on a ConstraintReturn object that contains an array of ConstraintReturns the final formatted message will be built up from the messages returned by each of the dependent ConstraintReturns.
Field Summary | |
java.lang.Object[] |
arguments
Array of replacement arguments to be inserted into the message text for this object. |
ConstraintReturn[] |
constraintReturns
Array of ConstraintReturns representing results from dependent rules. |
protected com.ibm.websphere.exception.DistributedExceptionInfo |
exceptionInfo
Object containing the localization information (resource bundle name, message key, format arguments, and default text) for the message for this ConstraintReturn object. |
boolean |
result
The result of the rule represented by this object. |
Constructor Summary | |
ConstraintReturn()
Default ConstraintReturn constructor. |
|
ConstraintReturn(boolean value)
Constraint return constructor. |
|
ConstraintReturn(boolean inResult,
ConstraintReturn[] inConstraintReturns)
ConstraintReturn constructor. |
|
ConstraintReturn(boolean inResult,
java.lang.String inResourceBundleName,
java.lang.String inMessageKey,
java.lang.Object[] inFormatArgs,
java.lang.String inDefaultMessage)
ConstraintReturn constructor. |
Method Summary | |
java.lang.String |
getLocalizedMessage()
Retrieve the message text for this ConstraintReturn object, formatted for the current locale. |
java.lang.String |
getMessage()
Retrieve the formatted message text for this ConstraintReturn object, formatted for the current locale. |
boolean |
result()
Retrieve the overall result of the rule represented by this object. |
void |
result(boolean inResult)
Set the overall result of the rule represented by this object. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public boolean result
public ConstraintReturn[] constraintReturns
protected com.ibm.websphere.exception.DistributedExceptionInfo exceptionInfo
public java.lang.Object[] arguments
Constructor Detail |
public ConstraintReturn()
public ConstraintReturn(boolean value)
value
- booleanpublic ConstraintReturn(boolean inResult, ConstraintReturn[] inConstraintReturns)
inResult
- Result of rule. A value of true means the rule succeeded, while false means it failed.inConstraintReturns
- Array of ConstraintReturns representing the results of
dependent rules.public ConstraintReturn(boolean inResult, java.lang.String inResourceBundleName, java.lang.String inMessageKey, java.lang.Object[] inFormatArgs, java.lang.String inDefaultMessage)
inResult
- Result of rule. A value of true means the rule succeeded, while false means it failed.inResourceBundleName
- Name of the resource bundle to be used to format the message.inMessageKey
- The key used to look up the message text in the resource bundle.inFormatArgs
- Replacement arguments to be inserted into the message text.inDefaultMessage
- Default text that will be used for the message if there is no
resource bundle or message key.Method Detail |
public java.lang.String getLocalizedMessage()
public java.lang.String getMessage()
public boolean result()
public void result(boolean inResult)
inResult
- Result of rule. A value of true means the rule succeeded, while false means that it failed.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |