|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.sys.MessageBuilder
public class MessageBuilder
This class provides a set of utilities that can be used to build error message
Constructor Summary | |
---|---|
MessageBuilder()
|
Method Summary | |
---|---|
static void |
addMessageIntoList(List<Message> messageList,
Message message)
add the given message into the given message list |
static String |
buildErrorMessageWithDataDictionary(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass,
String attributeName,
String currentValue)
build the error message with the given label and current value |
static Message |
buildMessage(String errorMessageKey,
int errorType)
Build the error message with the message body and error type |
static Message |
buildMessage(String errorMessageKey,
String invalidValue)
Build the message for a fatal error with the message body and invalid value |
static Message |
buildMessage(String errorMessageKey,
String invalidValue,
int errorType)
Build the error message with the message body, invalid value and error type |
static Message |
buildMessageWithPlaceHolder(String errorMessageKey,
int errorType,
Object... invalidValues)
Build the error message with the message body, invalid value and error type. |
static Message |
buildMessageWithPlaceHolder(String errorMessageKey,
Object... invalidValues)
Build the message for a fatal error with the message body and invalid value. |
static String |
formatMessageBody(String errorMessageBody,
String invalidValue)
Format the error message body based on the given error message and invalid value |
static String |
getPropertyString(String messageKey)
get the message from application resource properties with the given key |
static String |
getShortLabel(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass,
String attributeName)
get the label of the specified attribute of the given business object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageBuilder()
Method Detail |
---|
public static void addMessageIntoList(List<Message> messageList, Message message)
messageList
- the given message listmessage
- the given messagepublic static Message buildMessage(String errorMessageKey, int errorType)
public static Message buildMessage(String errorMessageKey, String invalidValue)
public static Message buildMessage(String errorMessageKey, String invalidValue, int errorType)
public static String formatMessageBody(String errorMessageBody, String invalidValue)
public static Message buildMessageWithPlaceHolder(String errorMessageKey, int errorType, Object... invalidValues)
public static Message buildMessageWithPlaceHolder(String errorMessageKey, Object... invalidValues)
public static String getPropertyString(String messageKey)
messageKey
- the given message key
public static String buildErrorMessageWithDataDictionary(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass, String attributeName, String currentValue)
label
- the given labelcurrentValue
- the given current value
public static String getShortLabel(Class<? extends org.kuali.rice.kns.bo.BusinessObject> businessObjectClass, String attributeName)
businessObjectClass
- the given business objectattributeName
- the specified attribute name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |