blob: fda0acaf767ecf5c123e3143681670deaee4a228 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.ats.api.notify;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
/**
* Stores notification events generated by the framework or applications. Currently, send happens upon call to
* sendNotifications(). Eventually, a timer will kick the send event at certain intervals. This mechanism allows for
* notifications to be collected for a certain period of time and rolled into a single notification. This will
* eventually also support other types of notifications such as popups and allow the user to configure which events are
* sent and how.
*
* @author Donald G. Dunne
*/
@XmlRootElement
public class AtsNotificationCollector {
private String subject, body;
private final List<AtsNotificationEvent> notificationEvents = new ArrayList<AtsNotificationEvent>();
private final List<AtsWorkItemNotificationEvent> workItemNotificationEvents =
new ArrayList<AtsWorkItemNotificationEvent>();
public void addNotificationEvent(AtsNotificationEvent notificationEvent) {
notificationEvents.add(notificationEvent);
}
public List<AtsNotificationEvent> getNotificationEvents() {
return notificationEvents;
}
public void addWorkItemNotificationEvent(AtsWorkItemNotificationEvent workItemNotificationEvent) {
workItemNotificationEvents.add(workItemNotificationEvent);
}
public List<AtsWorkItemNotificationEvent> getWorkItemNotificationEvents() {
return workItemNotificationEvents;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
}
|