MobiKind kind = MobiKind.valueOf(kindString);
Integer alertId = alert.getId();
StringBuilder b = new StringBuilder("alertText=");
Resource res = alert.getAlertDefinition().getResource();
AlertManagerLocal alertManager = LookupUtil.getAlertManager();
switch (kind) {
case VOICE:
b.append("Alert on resource ");
do {
b.append(res.getName());
res = res.getParentResource();
if (res != null)
b.append(" with parent ");
} while (res != null);
b.append(". Cause is ");
// Switch locale to english, as the voice synthesizer expects this for now
Locale currentLocale = Locale.getDefault();
Locale.setDefault(Locale.ENGLISH);
b.append(alertManager.prettyPrintAlertConditions(alert, false));
Locale.setDefault(currentLocale);
boolean willBeDisabled = alertManager.willDefinitionBeDisabled(alert);
if (willBeDisabled)
b.append(" The alert definition will now be disabled. \n\n");
// b.append(" Please press ");