Class NotificationSupport
- java.lang.Object
-
- de.trustable.ca3s.core.web.rest.support.NotificationSupport
-
@RestController @RequestMapping("/api") public class NotificationSupport extends ObjectREST controller for test sending of notification.
-
-
Constructor Summary
Constructors Constructor Description NotificationSupport(NameAndRoleUtil nameAndRoleUtil, UserRepository userRepository, NotificationService notificationService, CertificateRepository certificateRepository, CSRRepository csrRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnotifyCerificateRevoked(String certId)POST api/notification/sendCertificateRevoked: send out certificate revocation info.intnotifyRAOfficerHolderOnExpiry()POST api/notification/sendExpiryPendingSummary: send out certificate expiry and request pending summary.voidnotifyRAOfficerOnRequest(String csrId)POST api/notification/sendRAOfficerOnRequest: send out notification on new request to assigned RA.intnotifyRequestorOnExpiry(String certId)POST api/notification/sendExpiryPendingSummary: send out certificate expiry and request pending summary.intnotifyRequestorOnExpirySummary()POST api/notification/sendExpiryPendingSummary: send out certificate expiry and request pending summary.voidnotifyUserCerificateRevoked(String certId)POST api/notification/sendUserCertificateRevoked: send out certificate revocation info.voidnotifyUserCertificateIssued(String certId)POST api/notification/sendUserCertificateIssued: send out certificate issuance info.voidnotifyUserCertificateRejected(String csrId)POST api/notification/sendUserCertificateRejected: send out certificate request rejection info.
-
-
-
Constructor Detail
-
NotificationSupport
public NotificationSupport(NameAndRoleUtil nameAndRoleUtil, UserRepository userRepository, NotificationService notificationService, CertificateRepository certificateRepository, CSRRepository csrRepository)
-
-
Method Detail
-
notifyRAOfficerHolderOnExpiry
@PostMapping("notification/sendExpiryPendingSummary") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public int notifyRAOfficerHolderOnExpiry() throws javax.mail.MessagingExceptionPOST api/notification/sendExpiryPendingSummary: send out certificate expiry and request pending summary.- Returns:
- the number of expiring certificates .
- Throws:
javax.mail.MessagingException
-
notifyRequestorOnExpirySummary
@PostMapping("notification/sendRequestorExpiry") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public int notifyRequestorOnExpirySummary() throws javax.mail.MessagingExceptionPOST api/notification/sendExpiryPendingSummary: send out certificate expiry and request pending summary.- Returns:
- the number of expiring certificates .
- Throws:
javax.mail.MessagingException
-
notifyRequestorOnExpiry
@PostMapping("notification/sendRequestorExpiry/{certId}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public int notifyRequestorOnExpiry(@PathVariable String certId) throws javax.mail.MessagingExceptionPOST api/notification/sendExpiryPendingSummary: send out certificate expiry and request pending summary.- Returns:
- the number of expiring certificates .
- Throws:
javax.mail.MessagingException
-
notifyRAOfficerOnRequest
@PostMapping("notification/sendRAOfficerOnRequest/{csrId}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public void notifyRAOfficerOnRequest(@PathVariable String csrId)POST api/notification/sendRAOfficerOnRequest: send out notification on new request to assigned RA.
-
notifyUserCertificateIssued
@PostMapping("notification/sendUserCertificateIssued/{certId}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public void notifyUserCertificateIssued(@PathVariable String certId) throws javax.mail.MessagingExceptionPOST api/notification/sendUserCertificateIssued: send out certificate issuance info.- Throws:
javax.mail.MessagingException
-
notifyUserCertificateRejected
@PostMapping("notification/sendUserCertificateRejected/{csrId}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public void notifyUserCertificateRejected(@PathVariable String csrId) throws javax.mail.MessagingExceptionPOST api/notification/sendUserCertificateRejected: send out certificate request rejection info.- Throws:
javax.mail.MessagingException
-
notifyCerificateRevoked
@PostMapping("notification/sendCertificateRevoked/{certId}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public void notifyCerificateRevoked(@PathVariable String certId) throws javax.mail.MessagingExceptionPOST api/notification/sendCertificateRevoked: send out certificate revocation info.- Throws:
javax.mail.MessagingException
-
notifyUserCerificateRevoked
@PostMapping("notification/sendUserCertificateRevoked/{certId}") @PreAuthorize("hasRole(\"ROLE_ADMIN\")") public void notifyUserCerificateRevoked(@PathVariable String certId) throws javax.mail.MessagingExceptionPOST api/notification/sendUserCertificateRevoked: send out certificate revocation info.- Throws:
javax.mail.MessagingException
-
-