Skip to content
Snippets Groups Projects
Commit f53f37a6 authored by kbeyro's avatar kbeyro
Browse files

update list to be string created

parent e09fb720
Branches
Tags
2 merge requests!41release/1.6.4 into 'develop',!40Create separate appState for domains
......@@ -18,6 +18,7 @@ import net.geant.nmaas.notifications.types.persistence.entity.FormType;
import net.geant.nmaas.notifications.types.service.FormTypeService;
import net.geant.nmaas.portal.api.configuration.ConfigurationView;
import net.geant.nmaas.portal.api.domain.UserView;
import net.geant.nmaas.portal.api.domain.VlabAppListElement;
import net.geant.nmaas.portal.api.exception.MissingElementException;
import net.geant.nmaas.portal.api.exception.ProcessingException;
import net.geant.nmaas.portal.persistent.entity.Role;
......@@ -160,6 +161,10 @@ public class NotificationManager {
OffsetDateTime offsetDateTime = OffsetDateTime.parse(v.toString());
mailAttributes.getOtherAttributes().put(k,offsetDateTime.format(DateTimeFormatter.ofPattern("dd.MM.yyyy")));
});
List<VlabAppListElement> appList = objectMapper.convertValue(mailAttributes.getOtherAttributes().get("appList"), new TypeReference<List<VlabAppListElement>>() {});
mailAttributes.getOtherAttributes().put("appList",appList.stream().map(VlabAppListElement::getAppListName).collect(Collectors.joining())) ;
}
if (contactFormKey.isEmpty()) {
log.error("Invalid contact form request, subType is null");
......
package net.geant.nmaas.portal.api.domain;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class VlabAppListElement {
private String appListName;
}
......@@ -11,7 +11,7 @@
"subject": "nmaas: New vLAB request",
"template": {
"HEADER": "Dear ${username},",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><#list appList as app><span>${app.appListName}, </span></#list><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><p>${appList}</p><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"SENDER": "Best regards,<br />nmaas Team",
"NOREPLY": "This is an automatically generated message, please do not reply.",
"SENDER_POLICY": ""
......@@ -22,7 +22,7 @@
"subject": "nmaas: New vLAB request",
"template": {
"HEADER": "Dear ${username},",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><#list appList as app><span>${app.appListName}, </span></#list><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><p>${appList}</p><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"SENDER": "Best regards,<br />nmaas Team",
"NOREPLY": "This is an automatically generated message, please do not reply.",
"SENDER_POLICY": ""
......@@ -33,7 +33,7 @@
"subject": "nmaas: New vLAB request",
"template": {
"HEADER": "Dear ${username},",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><#list appList as app><span>${app.appListName}, </span></#list><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><p>${appList}</p><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"SENDER": "Best regards,<br />nmaas Team",
"NOREPLY": "This is an automatically generated message, please do not reply.",
"SENDER_POLICY": ""
......@@ -44,7 +44,7 @@
"subject": "nmaas: New vLAB request",
"template": {
"HEADER": "Dear ${username},",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><#list appList as app><span>${app.appListName}, </span></#list><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"CONTENT": "<p>New vLAB request was sent from the contact form.</p><p>Requester email: ${email}</p><p>Requester institution: ${institution}</p><p>Requested number of lab participants: ${students}</p><p>Requested number of lab managers: ${managers}</p><p>List of considered applications:</p><p>${appList}</p><p>vLAB start date: ${startDay}</p><p>vLAB end date: ${endDay}</p><p>Additional information: ${message}</p>",
"SENDER": "Best regards,<br />nmaas Team",
"NOREPLY": "This is an automatically generated message, please do not reply.",
"SENDER_POLICY": ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment