Project

General

Profile

« Previous | Next » 

Revision 61414

replaced english name with official name in emails

View differences:

modules/uoa-repository-manager-service/branches/aai_roles_new/src/main/java/eu/dnetlib/repo/manager/service/EmailUtilsImpl.java
210 210
    public void sendAdminRegistrationEmail(Repository repository, Authentication authentication) throws Exception {
211 211
        try {
212 212
            String subject = "OpenAIRE content provider registration for " +
213
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
213
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
214 214

  
215 215
            String message = "Dear administrator" + ",\n" +
216 216
                    "\n" +
217
                    "We received a request to register the " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "]" +
217
                    "We received a request to register the " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "]" +
218 218
                    " to the OpenAIRE compliant list of content providers. " +
219 219
                    "\n\n" +
220 220
                    "User Contact: " + authentication.getName() + " (" + ((OIDCAuthenticationToken) authentication).getUserInfo().getEmail() + ")" +
......
236 236
    public void sendUserRegistrationEmail(Repository repository, Authentication authentication) throws Exception {
237 237
        try {
238 238
            String subject = "OpenAIRE content provider registration for " +
239
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
239
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
240 240

  
241 241
//            String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
242 242
            String message = "Dear "+SecurityContextHolder.getContext().getAuthentication().getName()+",\n" +
243 243
                    "\n" +
244
                    "We received a request to register the " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "]" +
244
                    "We received a request to register the " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "]" +
245 245
                    " to the OpenAIRE compliant list of content providers. " +
246 246
                    "\n\n" +
247 247
                    "Please do not reply to this message\n" +
......
262 262
    public void sendAdminRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
263 263
        try {
264 264
            String subject = "OpenAIRE new interface registration request started for " +
265
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
265
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
266 266

  
267 267
            String message = "Dear administrator" + ",\n" +
268 268
                    "\n" +
......
270 270
                    "Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
271 271
                    "Set: " + repositoryInterface.getAccessSet() + "\n" +
272 272
                    "Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
273
                    "to " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
273
                    "to " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
274 274

  
275 275
            if (comment != null)
276 276
                message += "\nThe users comment was '" + comment + "'\n";
......
297 297
    public void sendUserRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
298 298
        try {
299 299
            String subject = "OpenAIRE new interface registration request started for " +
300
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
300
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
301 301

  
302 302
            String message = "Dear "+SecurityContextHolder.getContext().getAuthentication().getName()+",\n" +
303 303
                    "\n" +
......
305 305
                    "Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
306 306
                    "Set: " + repositoryInterface.getAccessSet() + "\n" +
307 307
                    "Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
308
                    "to " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
308
                    "to " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
309 309

  
310 310
            if (comment != null) {
311 311
                message += "\n Your comment was '" + comment + "'\n";
......
331 331
    public void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
332 332
        try {
333 333
            String subject = "OpenAIRE new interface registration request - results (success) for " +
334
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
334
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
335 335

  
336 336
//            String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
337 337
            String message = "Dear user,\n" +
338 338
                    "\n" +
339
                    "the compatibility test on " + "[" + repository.getEnglishName() + "]" +
339
                    "the compatibility test on " + "[" + repository.getOfficialName() + "]" +
340 340
                    " was successful and the datasource type \""+ repository.getDatasourceType()  + "\" will be prepared for aggregation in OpenAIRE."+
341 341
                    "\n\n" +
342 342
                    "Please note that it usually takes about 3-4 weeks until a data source is indexed and it’s metadata visible on openaire.eu.\n\n" +
......
364 364
    public void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
365 365
        try {
366 366
            String subject = "OpenAIRE new interface registration request - results (success) for " +
367
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
367
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
368 368

  
369 369
            String message = "Dear admin ,\n" +
370 370
                    "\n" +
371
                    "the compatibility test on " + "[" + repository.getEnglishName() + "]" +
371
                    "the compatibility test on " + "[" + repository.getOfficialName() + "]" +
372 372
                    " was successful and the datasource type \""+ repository.getDatasourceType()  + "\" will be prepared for aggregation in OpenAIRE."+
373 373
                    "\n\n" +
374 374
                    "Please note that it usually takes about 3-4 weeks until a data source is indexed and it’s metadata visible on openaire.eu.\n\n" +
......
397 397
    public void sendUserRegistrationResultsFailureEmail(String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
398 398
        try {
399 399
            String subject = "OpenAIRE new interface registration request - results (failure) for " +
400
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
400
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
401 401
            //            String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
402 402
            String message = "Dear user,\n" +
403 403
                    "\n" +
404
                    "the compatibility test on " + "[" + repository.getEnglishName() + "]" +
404
                    "the compatibility test on " + "[" + repository.getOfficialName() + "]" +
405 405
                    " was not successful and the registration process was interrupted."+
406 406
                    "\n\n" +
407 407
                    "We will check what caused the problem and get back to you within a couple of days.\n\n" +
......
429 429
    public void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
430 430
        try {
431 431
            String subject = "OpenAIRE new interface registration request - results (failure) for " +
432
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
432
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
433 433

  
434 434
            String message = "Dear admin,\n" +
435 435
                    "\n" +
436
                    "the compatibility test on " + "[" + repository.getEnglishName() + "]" +
436
                    "the compatibility test on " + "[" + repository.getOfficialName() + "]" +
437 437
                    " was not successful and the registration process was interrupted."+
438 438
                    "\n\n" +
439 439
                    "We will check what caused the problem and get back to you within a couple of days.\n\n" +
......
462 462
    public void sendUserUpdateResultsSuccessEmail(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
463 463
        try {
464 464
            String subject = "OpenAIRE interface update request - results (success) for " +
465
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
465
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
466 466

  
467 467
            //            String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
468 468
            String message = "Dear user,\n" +
469 469
                    "\n" +
470
                    "the compatibility test on [" + repository.getEnglishName()+"] has been successful\n\n" +
470
                    "the compatibility test on [" + repository.getOfficialName()+"] has been successful\n\n" +
471 471
                    "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" +
472 472
                    "Registration identifier in OpenAIRE: "+ repository.getNamespacePrefix()+
473 473
                    "\nOfficial Name:" + repository.getOfficialName() +
......
493 493
    public void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
494 494
            try {
495 495
                String subject = "OpenAIRE interface update request - results (success) for " +
496
                        repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
496
                        repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
497 497

  
498 498
                String message = "Dear admin,\n" +
499 499
                        "\n" +
500
                        "the compatibility test on [" + repository.getEnglishName()+"] has been successful\n\n" +
500
                        "the compatibility test on [" + repository.getOfficialName()+"] has been successful\n\n" +
501 501
                        "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" +
502 502
                        "Registration identifier in OpenAIRE: "+ repository.getNamespacePrefix()+
503 503
                        "\nOfficial Name:" + repository.getOfficialName() +
......
524 524
    public void sendUserUpdateResultsFailureEmail(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
525 525
        try {
526 526
            String subject = "OpenAIRE interface update request - results (failure) for " +
527
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
527
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
528 528

  
529 529
            //            String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
530 530
            String message = "Dear user,\n" +
531 531
                    "\n" +
532
                    "the compatibility test on " + "[" + repository.getEnglishName() + "]" +
532
                    "the compatibility test on " + "[" + repository.getOfficialName() + "]" +
533 533
                    " was not successful."+
534 534
                    "\n\n" +
535 535
                    "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 557
    public void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception {
558 558
        try {
559 559
            String subject = "OpenAIRE interface update request - results (failure) for " +
560
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
560
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
561 561

  
562 562
            String message = "Dear admin,\n" +
563 563
                    "\n" +
564
                    "the compatibility test on " + "[" + repository.getEnglishName() + "]" +
564
                    "the compatibility test on " + "[" + repository.getOfficialName() + "]" +
565 565
                    " was not successful."+
566 566
                    "\n\n" +
567 567
                    "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 656
    public void sendAdminUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception {
657 657
        try {
658 658
            String subject = "OpenAIRE content provider update information for " +
659
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
659
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
660 660

  
661 661
            String message = "Dear administrator" + ",\n" +
662 662
                    "\n" +
663
                    "We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n\n" +
663
                    "We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n\n" +
664 664
                    "Please do not reply to this message\n" +
665 665
                    "This message has been generated automatically.\n\n" +
666 666
                    "Regards,\n" +
......
678 678
    public void sendUserUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception {
679 679
        try {
680 680
            String subject = "OpenAIRE content provider update information for " +
681
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
681
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
682 682

  
683 683
            //            String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
684 684
            String message = "Dear user,\n" +
685 685
                    "\n" +
686
                    "We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n\n" +
686
                    "We received a request to update the basic information for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n\n" +
687 687
                    "Please do not reply to this message\n" +
688 688
                    "This message has been generated automatically.\n\n" +
689 689
                    "If you have any questions, write to 'helpdesk@openaire.eu'. \n\n" +
......
702 702
    public void sendAdminUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
703 703
        try {
704 704
            String subject = "OpenAIRE interface update request started for " +
705
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
705
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
706 706

  
707 707
            String message = "Dear administrator" + ",\n" +
708 708
                    "\n" +
......
710 710
                    "Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
711 711
                    "Set: " + repositoryInterface.getAccessSet() + "\n" +
712 712
                    "Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
713
                    "for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
713
                    "for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
714 714

  
715 715
            if (comment != null)
716 716
                message += "\nThe users comment was '" + comment + "'\n";
......
735 735
    public void sendUserUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception {
736 736
        try {
737 737
            String subject = "OpenAIRE interface update request started for " +
738
                    repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
738
                    repository.getDatasourceType() + "[" + repository.getOfficialName() + "]";
739 739

  
740 740
            //            String message = "Dear " + ((OIDCAuthenticationToken) authentication).getUserInfo().getName() + ",\n" +
741 741
            String message = "Dear user,\n" +
......
744 744
                    "Base URL: " + repositoryInterface.getBaseUrl() + "\n" +
745 745
                    "Set: " + repositoryInterface.getAccessSet() + "\n" +
746 746
                    "Guidelines: " + repositoryInterface.getDesiredCompatibilityLevel() + "\n\n" +
747
                    "for " + repository.getDatasourceType() + "[" + repository.getEnglishName() + "].\n";
747
                    "for " + repository.getDatasourceType() + "[" + repository.getOfficialName() + "].\n";
748 748

  
749 749
            if (comment != null) {
750 750
                message += "\n Your comment was '" + comment + "'\n";

Also available in: Unified diff