|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.student.common.messagebuilder.impl.AbstractMessageBuilder
public abstract class AbstractMessageBuilder
This AbstractMessageBuilder
class builds a summary message
from plain strings or Velocity template messages. Summary message is built
from analysing the outcome of a boolean expression.
If no language is specified then the default language locale is used.
Constructor Summary | |
---|---|
AbstractMessageBuilder(String language,
MessageTreeBuilder treeNodeMessageBuilder)
Constructor. |
Method Summary | |
---|---|
BooleanFunctionResult |
build()
|
BooleanFunctionResult |
build(String booleanExpression,
Map<String,? extends BooleanMessage> messageMap)
Builds and evaluates a boolean expression and returns the message and result of the expression. |
BooleanFunctionResult |
build(String booleanExpression,
Map<String,? extends BooleanMessage> messageMap,
Map<String,Object> messageContextMap)
Builds and evaluates a boolean expression and returns the message and result of the expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMessageBuilder(String language, MessageTreeBuilder treeNodeMessageBuilder)
language
- LanguagetreeNodeMessageBuilder
- AST tree node Message builderMethod Detail |
---|
public BooleanFunctionResult build(String booleanExpression, Map<String,? extends BooleanMessage> messageMap)
Builds and evaluates a boolean expression and returns the message and result
of the expression. Messages in the messageMap
can
also contain VTL (Velocity Template Language) but without any VTL keys
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"
booleanExpression
- Boolean expressionmessageMap
- Contains a map of messages (or VTL)
public BooleanFunctionResult build(String booleanExpression, Map<String,? extends BooleanMessage> messageMap, Map<String,Object> messageContextMap)
Builds and evaluates a boolean expression and returns the message and result
of the expression. Messages in the messageMap
can
also contain VTL (Velocity Template Language).
messageContextMap
contains Velocity key/value entries
referenced in the messageMap
.
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"
booleanExpression
- Boolean expressionmessageMap
- Contains a map of messages (or VTL)messageContextMap
- Message contact map for Velocity Template Engine
MessageBuilderException
- Errors building messagepublic BooleanFunctionResult build()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |