|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.student.common.messagebuilder.impl.AbstractMessageBuilder
org.kuali.student.common.messagebuilder.impl.MessageBuilderImpl
public class MessageBuilderImpl
This MessageBuilder class builds a summary message from
plain strings or templates. Summary message is built from analysing the
outcome of a boolean expression.
| Constructor Summary | |
|---|---|
MessageBuilderImpl(String language,
MessageTreeBuilder treeNodeMessageBuilder)
Constructor. |
|
| Method Summary | |
|---|---|
BooleanFunctionResult |
build(String booleanRule,
MessageContainer messageContainer)
Builds and evaluates a boolean expression and returns the message and result of the expression. |
BooleanFunctionResult |
build(String booleanRule,
MessageContainer messageContainer,
Map<String,Object> messageContextMap)
Builds and evaluates a boolean expression and returns the message and result of the expression. |
String |
buildMessage(String booleanRule,
MessageContainer messageContainer)
Builds a message from a list of messages using a boolean expression. |
| Methods inherited from class org.kuali.student.common.messagebuilder.impl.AbstractMessageBuilder |
|---|
build, build, build |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageBuilderImpl(String language,
MessageTreeBuilder treeNodeMessageBuilder)
language - String Boolean operators' language (English and/or)treeNodeMessageBuilder - AST tree node Message builder| Method Detail |
|---|
public BooleanFunctionResult build(String booleanRule,
MessageContainer messageContainer)
Builds and evaluates a boolean expression and returns the message and result of the expression.
Note: Order of boolean operation: ANDs before ORs and operations inside parentheses before anything else.
Example 1: 'A AND B OR C AND D' internally evaluates to '(A AND B) OR (C AND D)'booleanExpression = "A*B+C*D"
Example 2: '(M1 AND M2) OR M3'
booleanExpression = "(M1*M2)+M3"
build in interface MessageBuilderbooleanRule - Boolean expressionmessageContainer - Contains a list of messages
MessageBuilderException - Errors building message
public BooleanFunctionResult build(String booleanRule,
MessageContainer messageContainer,
Map<String,Object> messageContextMap)
Builds and evaluates a boolean expression and returns the message and result of the expression.
Note: Order of boolean operation: ANDs before ORs and operations inside parentheses before anything else.
if messageContainer contains any velocity templates
with keys/tokens then messageContextMap must be set.
booleanExpression = "A*B+C*D"
Example 2: '(M1 AND M2) OR M3'
booleanExpression = "(M1*M2)+M3"
build in interface MessageBuilderbooleanRule - Boolean expressionmessageContainer - Contains a list of messagesmessageContextMap - Message context template map
MessageBuilderException - Errors building message
public String buildMessage(String booleanRule,
MessageContainer messageContainer)
buildMessage in interface MessageBuilderbooleanRule - Boolean expressionmessageContainer - Contains a list of messages
MessageBuilderException - Errors building message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||