use of org.eclipse.vorto.repository.notification.INotificationService.NotificationProblem in project vorto by eclipse.
the class RequestAccessToNamespaceMessage method getContent.
@Override
public String getContent() {
Map<String, Object> map = new HashMap<>();
map.put("host", host);
map.put("namespace", request.getNamespaceName());
map.put("requestingUser", request.getRequestingUsername());
map.put("targetUser", request.getTargetUsername());
map.put("suggestedRoles", request.getSuggestedRoles());
map.put("recipient", recipient.getUsername());
String subject = Strings.nullToEmpty(request.getTargetSubject()).trim().isEmpty() ? "n/a" : request.getTargetSubject();
map.put("subject", subject);
try {
return renderer.render(map);
} catch (Exception e) {
throw new NotificationProblem("Problem rendering request access to namespace email content", e);
}
}
use of org.eclipse.vorto.repository.notification.INotificationService.NotificationProblem in project vorto by eclipse.
the class DeleteAccountMessage method getContent.
@Override
public String getContent() {
Map<String, Object> ctx = new HashMap<>(1);
ctx.put("user", recipient);
try {
return renderer.render(ctx);
} catch (Exception e) {
throw new NotificationProblem("Problem rendering delete account email content", e);
}
}
use of org.eclipse.vorto.repository.notification.INotificationService.NotificationProblem in project vorto by eclipse.
the class RolesChangedInNamespaceMessage method getContent.
@Override
public String getContent() {
Map<String, Object> map = new HashMap<>();
map.put("namespace", namespace);
map.put("roles", roles);
map.put("recipient", recipient.getUsername());
try {
return renderer.render(map);
} catch (Exception e) {
throw new NotificationProblem("Problem rendering roles changed in namespace email content", e);
}
}
use of org.eclipse.vorto.repository.notification.INotificationService.NotificationProblem in project vorto by eclipse.
the class WorkItemPendingMessage method getContent.
@Override
public String getContent() {
Map<String, Object> ctx = new HashMap<>(1);
ctx.put("user", recipient);
ctx.put("model", modelInfo);
try {
return renderer.render(ctx);
} catch (Exception e) {
throw new NotificationProblem("Problem rendering notification message", e);
}
}
use of org.eclipse.vorto.repository.notification.INotificationService.NotificationProblem in project vorto by eclipse.
the class CommentReplyMessage method getContent.
@Override
public String getContent() {
Map<String, Object> ctx = new HashMap<>(1);
ctx.put("model", modelInfo);
ctx.put("comment", commentMessage);
try {
return renderer.render(ctx);
} catch (Exception e) {
throw new NotificationProblem("Problem rendering notification message", e);
}
}
Aggregations