Search in sources :

Example 1 with InvitationApprovalSubmissionArachneMailMessage

use of com.odysseusinc.arachne.portal.service.mail.InvitationApprovalSubmissionArachneMailMessage in project ArachneCentralAPI by OHDSI.

the class BaseSubmissionServiceImpl method notifyOwnersAboutNewSubmission.

@Override
public void notifyOwnersAboutNewSubmission(T submission) {
    Set<IUser> dnOwners = DataNodeUtils.getDataNodeOwners(submission.getDataSource().getDataNode());
    dnOwners.remove(submission.getAuthor());
    try {
        for (IUser owner : dnOwners) {
            mailSender.send(new InvitationApprovalSubmissionArachneMailMessage(WebSecurityConfig.getDefaultPortalURI(), owner, submission));
        }
    } catch (Exception ignore) {
        LOGGER.error(ignore.getLocalizedMessage());
    }
    notifyOwnersAboutSubmissionUpdateViaSocket(submission);
}
Also used : InvitationApprovalSubmissionArachneMailMessage(com.odysseusinc.arachne.portal.service.mail.InvitationApprovalSubmissionArachneMailMessage) IUser(com.odysseusinc.arachne.portal.model.IUser) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) ValidationException(com.odysseusinc.arachne.portal.exception.ValidationException) NoExecutableFileException(com.odysseusinc.arachne.portal.exception.NoExecutableFileException) PermissionDeniedException(com.odysseusinc.arachne.portal.exception.PermissionDeniedException) NotExistException(com.odysseusinc.arachne.portal.exception.NotExistException)

Aggregations

NoExecutableFileException (com.odysseusinc.arachne.portal.exception.NoExecutableFileException)1 NotExistException (com.odysseusinc.arachne.portal.exception.NotExistException)1 PermissionDeniedException (com.odysseusinc.arachne.portal.exception.PermissionDeniedException)1 ValidationException (com.odysseusinc.arachne.portal.exception.ValidationException)1 IUser (com.odysseusinc.arachne.portal.model.IUser)1 InvitationApprovalSubmissionArachneMailMessage (com.odysseusinc.arachne.portal.service.mail.InvitationApprovalSubmissionArachneMailMessage)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1