* Calculate an RFC 2822 compliant message identifier from a numeric + string identifier. Given
* the same numeric and string identifier, the same message id will be generated.
*/
public static String calculateMessageId(Long id, String s) {
WikiPreferences prefs = Preferences.instance().get(WikiPreferences.class);
Hash hash = (Hash)Component.getInstance(Hash.class);
String domain;
try {
URI uri = new URI(prefs.getBaseUrl());
domain = uri.getHost();
} catch (Exception ex) {
throw new RuntimeException("Could not parse preferences value baseUrl into a host name", ex);
}
StringBuilder msgId = new StringBuilder();