Project

General

Profile

« Previous | Next » 

Revision 36854

sending (optional) emails to coordinators when a request has been submitted

View differences:

RequestManagerImpl.java
47 47
    @Autowired
48 48
    private ExecutorService executorService;
49 49

  
50
    private boolean sendCoordinatorEmails = false;
51

  
50 52
	@Override
51 53
	public Request saveRequest(final Request request) {
52 54

  
......
189 191
                        case NONO:
190 192
                            break;
191 193
                    }
194

  
195
                    if (sendCoordinatorEmails) {
196
                        for (Person coordinator:requestInfo.getProject().getCoordinators())
197
                            emailUtils.sendCoordinatorRequestSubmittedEmail(coordinator, requestInfo);
198
                    }
192 199
                } catch (MessagingException e) {
193 200
                    e.printStackTrace();
194 201
                } catch (PersonManagerException e) {
195 202
                    e.printStackTrace();
196 203
                }
197

  
198 204
            }
199 205
        });
200 206

  
......
381 387

  
382 388
        return req;
383 389
    }
390

  
391
    public boolean isSendCoordinatorEmails() {
392
        return sendCoordinatorEmails;
393
    }
394

  
395
    public void setSendCoordinatorEmails(boolean sendCoordinatorEmails) {
396
        this.sendCoordinatorEmails = sendCoordinatorEmails;
397
    }
384 398
}

Also available in: Unified diff