Package org.cyclos.server.utils
Class MessageProcessingHelper
- java.lang.Object
-
- org.cyclos.server.utils.MessageProcessingHelper
-
public class MessageProcessingHelper extends Object
Contains utility methods to process messages
-
-
Constructor Summary
Constructors Constructor Description MessageProcessingHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringprocessDate(String message)Process a message, using the string between # and # as date pattern for today, example: "We are on #MM/yyyy#" on january, 2006, would result in "We are on 01/2006"static StringprocessDate(String message, Date date)Process a message, using the string between # and # as date pattern for the specified date, example: "We are on #MM/yyyy#" on january, 2006, would result in "We are on 01/2006"static StringprocessVariables(String message, Map<String,?> values)Process a message, replacing the specified variables between # and # example: "The member #member# paid you #amount# units." with the values map containing member => John; amount => 4 will result in "The member John paid you 4 units".
-
-
-
Method Detail
-
processDate
public static String processDate(String message)
Process a message, using the string between # and # as date pattern for today, example: "We are on #MM/yyyy#" on january, 2006, would result in "We are on 01/2006"
-
processDate
public static String processDate(String message, Date date)
Process a message, using the string between # and # as date pattern for the specified date, example: "We are on #MM/yyyy#" on january, 2006, would result in "We are on 01/2006"
-
processVariables
public static String processVariables(String message, Map<String,?> values)
Process a message, replacing the specified variables between # and # example: "The member #member# paid you #amount# units." with the values map containing member => John; amount => 4 will result in "The member John paid you 4 units".
-
-