replaced english name with official name in emails

This commit is contained in:
Konstantinos Spyrou 2021-07-15 13:10:30 +00:00
parent 443c936ce0
commit cb9d651f89
1 changed files with 32 additions and 32 deletions

View File

@ -210,11 +210,11 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminRegistrationEmail(Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE content provider registration for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear administrator" + ",\n" +
"\n" +
"We received a request to register the " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "]" +
"We received a request to register the " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "]" +
" to the OpenAIRE compliant list of content providers. " +
"\n\n" +
"User Contact: " + authentication.getName() + " (" + ((OIDCAuthenticationToken) authentication).getUserInfo().getEmail() + ")" +
@ -236,12 +236,12 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserRegistrationEmail(Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE content provider registration for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
// String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
String message = "Dear "+SecurityContextHolder.getContext().getAuthentication().getName()+",\n" +
"\n" +
"We received a request to register the " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "]" +
"We received a request to register the " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "]" +
" to the OpenAIRE compliant list of content providers. " +
"\n\n" +
"Please do not reply to this message\n" +
@ -262,7 +262,7 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE new interface registration request started for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear administrator" + ",\n" +
"\n" +
@ -270,7 +270,7 @@ public class EmailUtilsImpl implements EmailUtils {
"Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
"Set: " + repositoryInterface.getAccessSet() + "\n" +
"Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
"to " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
"to " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
if (comment != null)
message += "\nThe users comment was '" + comment + "'\n";
@ -297,7 +297,7 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE new interface registration request started for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear "+SecurityContextHolder.getContext().getAuthentication().getName()+",\n" +
"\n" +
@ -305,7 +305,7 @@ public class EmailUtilsImpl implements EmailUtils {
"Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
"Set: " + repositoryInterface.getAccessSet() + "\n" +
"Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
"to " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
"to " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
if (comment != null) {
message += "\n Your comment was '" + comment + "'\n";
@ -331,12 +331,12 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE new interface registration request - results (success) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
// String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
String message = "Dear user,\n" +
"\n" +
"the compatibility test on " + "[" + repository.getEnglishName() + "]" +
"the compatibility test on " + "[" + repository.getOfficialName() + "]" +
" was successful and the datasource type \""+ repository.getDatasourceType() + "\" will be prepared for aggregation in OpenAIRE."+
"\n\n" +
"Please note that it usually takes about 3-4 weeks until a data source is indexed and its metadata visible on openaire.eu.\n\n" +
@ -364,11 +364,11 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE new interface registration request - results (success) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear admin ,\n" +
"\n" +
"the compatibility test on " + "[" + repository.getEnglishName() + "]" +
"the compatibility test on " + "[" + repository.getOfficialName() + "]" +
" was successful and the datasource type \""+ repository.getDatasourceType() + "\" will be prepared for aggregation in OpenAIRE."+
"\n\n" +
"Please note that it usually takes about 3-4 weeks until a data source is indexed and its metadata visible on openaire.eu.\n\n" +
@ -397,11 +397,11 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserRegistrationResultsFailureEmail(String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE new interface registration request - results (failure) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
// String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
String message = "Dear user,\n" +
"\n" +
"the compatibility test on " + "[" + repository.getEnglishName() + "]" +
"the compatibility test on " + "[" + repository.getOfficialName() + "]" +
" was not successful and the registration process was interrupted."+
"\n\n" +
"We will check what caused the problem and get back to you within a couple of days.\n\n" +
@ -429,11 +429,11 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE new interface registration request - results (failure) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear admin,\n" +
"\n" +
"the compatibility test on " + "[" + repository.getEnglishName() + "]" +
"the compatibility test on " + "[" + repository.getOfficialName() + "]" +
" was not successful and the registration process was interrupted."+
"\n\n" +
"We will check what caused the problem and get back to you within a couple of days.\n\n" +
@ -462,12 +462,12 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserUpdateResultsSuccessEmail(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE interface update request - results (success) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
// String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
String message = "Dear user,\n" +
"\n" +
"the compatibility test on [" + repository.getEnglishName()+"] has been successful\n\n" +
"the compatibility test on [" + repository.getOfficialName()+"] has been successful\n\n" +
"We will check your transmitted information and adjust the aggregation settings accordingly. Please note that it usually takes about 3-4 weeks until the changes are visible on openaire.eu."+"\n\n" +
"Registration identifier in OpenAIRE: "+ repository.getNamespacePrefix()+
"\nOfficial Name:" + repository.getOfficialName() +
@ -493,11 +493,11 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE interface update request - results (success) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear admin,\n" +
"\n" +
"the compatibility test on [" + repository.getEnglishName()+"] has been successful\n\n" +
"the compatibility test on [" + repository.getOfficialName()+"] has been successful\n\n" +
"We will check your transmitted information and adjust the aggregation settings accordingly. Please note that it usually takes about 3-4 weeks until the changes are visible on openaire.eu."+"\n\n" +
"Registration identifier in OpenAIRE: "+ repository.getNamespacePrefix()+
"\nOfficial Name:" + repository.getOfficialName() +
@ -524,12 +524,12 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserUpdateResultsFailureEmail(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE interface update request - results (failure) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
// String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
String message = "Dear user,\n" +
"\n" +
"the compatibility test on " + "[" + repository.getEnglishName() + "]" +
"the compatibility test on " + "[" + repository.getOfficialName() + "]" +
" was not successful."+
"\n\n" +
"WWe will check your transmitted information to see what caused the problem and get back to you within a couple of days.\n\n" +
@ -557,11 +557,11 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE interface update request - results (failure) for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear admin,\n" +
"\n" +
"the compatibility test on " + "[" + repository.getEnglishName() + "]" +
"the compatibility test on " + "[" + repository.getOfficialName() + "]" +
" was not successful."+
"\n\n" +
"WWe will check your transmitted information to see what caused the problem and get back to you within a couple of days.\n\n" +
@ -656,11 +656,11 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE content provider update information for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear administrator" + ",\n" +
"\n" +
"We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n\n" +
"We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n\n" +
"Please do not reply to this message\n" +
"This message has been generated automatically.\n\n" +
"Regards,\n" +
@ -678,12 +678,12 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE content provider update information for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
// String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
String message = "Dear user,\n" +
"\n" +
"We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n\n" +
"We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n\n" +
"Please do not reply to this message\n" +
"This message has been generated automatically.\n\n" +
"If you have any questions, write to 'helpdesk@openaire.eu'. \n\n" +
@ -702,7 +702,7 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendAdminUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE interface update request started for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
String message = "Dear administrator" + ",\n" +
"\n" +
@ -710,7 +710,7 @@ public class EmailUtilsImpl implements EmailUtils {
"Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
"Set: " + repositoryInterface.getAccessSet() + "\n" +
"Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
"for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
"for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
if (comment != null)
message += "\nThe users comment was '" + comment + "'\n";
@ -735,7 +735,7 @@ public class EmailUtilsImpl implements EmailUtils {
public void sendUserUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
try {
String subject = "OpenAIRE interface update request started for " +
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
// String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
String message = "Dear user,\n" +
@ -744,7 +744,7 @@ public class EmailUtilsImpl implements EmailUtils {
"Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
"Set: " + repositoryInterface.getAccessSet() + "\n" +
"Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
"for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
"for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
if (comment != null) {
message += "\n Your comment was '" + comment + "'\n";