| java.lang.Object com.methodhead.util.MhfStringUtils
MhfStringUtils | public class MhfStringUtils (Code) | | |
Method Summary | |
protected static Map | extractProperties(Object o) Utility method to extract the properties of o as a map. | public static String | hashAndEncode(String s) Encrypts s by MD5 hashing it and Base64 encoding the
result. | public static String | merge(String text, Map fields) Utility method to merge the values in fields into text,
returning the resulting message. | public static String | merge(String text, Object o) Merges the properties of o into the template, returning the
resulting message. |
extractProperties | protected static Map extractProperties(Object o)(Code) | | Utility method to extract the properties of o as a map.
|
hashAndEncode | public static String hashAndEncode(String s)(Code) | | Encrypts s by MD5 hashing it and Base64 encoding the
result.
|
merge | public static String merge(String text, Map fields)(Code) | | Utility method to merge the values in fields into text,
returning the resulting message. The keys and values are treated as
Strings. If the template references a field that is not provided
by fields, a RuntimeException is thrown.
|
merge | public static String merge(String text, Object o)(Code) | | Merges the properties of o into the template, returning the
resulting message. The properties of are treated as Strings.
DynaBeans are supported. Keep in mind that inherent properties
of objects (e.g., "class") are not omitted. If the template references a
property that is not provided by o, a RuntimeException
is thrown.
|
|
|