Package org.pentaho.platform.api.engine
Interface IMessageFormatter
-
public interface IMessageFormatter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidformatErrorMessage(String mimeType, String title, String message, StringBuffer messageBuffer)voidformatErrorMessage(String mimeType, String title, List messages, StringBuffer messageBuffer)voidformatFailureMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer)voidformatFailureMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, List defaultMessages)default voidformatFailureMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, List defaultMessages, boolean showStacktrace)voidformatResultSetAsHTMLRows(org.pentaho.commons.connection.IPentahoResultSet resultSet, StringBuffer messageBuffer)voidformatSuccessMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, boolean doMessages)voidformatSuccessMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, boolean doMessages, boolean doWrapper)StringgetFirstError(List messages)If PentahoMessenger.getUserString("ERROR") returns the string: "Error: {0} ({1})" (which is the case for English) Find the substring before the first "{".
-
-
-
Method Detail
-
formatErrorMessage
void formatErrorMessage(String mimeType, String title, String message, StringBuffer messageBuffer)
-
getFirstError
String getFirstError(List messages)
If PentahoMessenger.getUserString("ERROR") returns the string: "Error: {0} ({1})" (which is the case for English) Find the substring before the first "{". In this case, that would be: "Error: ". Return the first string in the messages list that contains the string "Error: ". If no string in the list contains "Error: ", return null;- Parameters:
messages-- Returns:
-
formatErrorMessage
void formatErrorMessage(String mimeType, String title, List messages, StringBuffer messageBuffer)
-
formatFailureMessage
void formatFailureMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, List defaultMessages)
-
formatFailureMessage
default void formatFailureMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, List defaultMessages, boolean showStacktrace)
- Parameters:
showStacktrace- if true, exception stacktrace (if it is in messages) will be put into formatted message for debug purposes
-
formatFailureMessage
void formatFailureMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer)
-
formatResultSetAsHTMLRows
void formatResultSetAsHTMLRows(org.pentaho.commons.connection.IPentahoResultSet resultSet, StringBuffer messageBuffer)
-
formatSuccessMessage
void formatSuccessMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, boolean doMessages)
-
formatSuccessMessage
void formatSuccessMessage(String mimeType, IRuntimeContext context, StringBuffer messageBuffer, boolean doMessages, boolean doWrapper)
-
-