upgrade spring, add javadoc, formatting

This commit is contained in:
2022-04-13 16:38:23 +02:00
parent 8ebed47574
commit eb829bfa26
168 changed files with 1554 additions and 2020 deletions
@@ -32,10 +32,10 @@ public class EmailManager {
/**
* Send text.
*
* @param to the to
* @param from the from
* @param to the to
* @param from the from
* @param subject the subject
* @param text the text
* @param text the text
* @return the mail message
*/
public MailMessage sendText(String to, String from, String subject, String text) {
@@ -52,10 +52,10 @@ public class EmailManager {
/**
* Send bcc.
*
* @param bcc the bcc
* @param from the from
* @param bcc the bcc
* @param from the from
* @param subject the subject
* @param text the text
* @param text the text
* @return the mail message
*/
public MailMessage sendBcc(String[] bcc, String from, String subject, String text) {
@@ -80,12 +80,10 @@ public class EmailManager {
UserProfileField primaryEmailUserProfileField = userProfileFieldManager.get(user.getId(),
UserProfileFields.PROFILE_FIELD_EMAIL_PRIMARY);
if (primaryEmailUserProfileField != null
&& "true".equals(primaryEmailUserProfileField.getValue())) {
if (primaryEmailUserProfileField != null && "true".equals(primaryEmailUserProfileField.getValue())) {
UserProfileField emailUserProfileField = userProfileFieldManager.get(user.getId(),
UserProfileFields.PROFILE_FIELD_EMAIL);
if (emailUserProfileField != null
&& StringUtils.hasText(emailUserProfileField.getValue())) {
if (emailUserProfileField != null && StringUtils.hasText(emailUserProfileField.getValue())) {
email = emailUserProfileField.getValue();
}
}
@@ -54,8 +54,7 @@ public class EmailController extends BaseController {
@PreAuthorize("hasRole('ROLE_ADMIN')")
@PostMapping("/test")
public MailMessage sendTest(@RequestBody String to) {
return emailManager.sendText(to, "no-reply@we.bstly.de", "Test Email",
"Test from we.bstly");
return emailManager.sendText(to, "no-reply@we.bstly.de", "Test Email", "Test from we.bstly");
}
/**
@@ -80,8 +79,7 @@ public class EmailController extends BaseController {
UserProfileField localeUserProfileField = userProfileFieldManager.get(user.getId(),
UserProfileFields.PROFILE_FIELD_LOCALE);
if (localeUserProfileField != null
&& StringUtils.hasText(localeUserProfileField.getValue())) {
if (localeUserProfileField != null && StringUtils.hasText(localeUserProfileField.getValue())) {
userMailModel.setLocale(localeUserProfileField.getValue());
}
@@ -91,6 +89,4 @@ public class EmailController extends BaseController {
return result;
}
}
@@ -16,7 +16,7 @@ public class UserMailModel {
* Instantiates a new user mail model.
*
* @param username the username
* @param email the email
* @param email the email
*/
public UserMailModel(String username, String email) {
super();