1 |
41699
|
sandro.lab
|
package eu.dnetlib.enabling.is.sn;
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* This class encapsulates the notification message sent to ISSN subscribers.
|
5 |
|
|
*
|
6 |
|
|
* @author marko
|
7 |
|
|
*
|
8 |
|
|
*/
|
9 |
|
|
public class NotificationMessage {
|
10 |
|
|
|
11 |
|
|
/**
|
12 |
|
|
* subscription identifier.
|
13 |
|
|
*/
|
14 |
|
|
private String subscriptionId;
|
15 |
|
|
|
16 |
|
|
/**
|
17 |
|
|
* subscription topic that triggered the notification.
|
18 |
|
|
*/
|
19 |
|
|
private String topic;
|
20 |
|
|
|
21 |
|
|
/**
|
22 |
|
|
* resource identifier that triggered the notification.
|
23 |
|
|
*/
|
24 |
|
|
private String resourceId;
|
25 |
|
|
|
26 |
|
|
/**
|
27 |
|
|
* message body.
|
28 |
|
|
*/
|
29 |
|
|
private String body;
|
30 |
|
|
|
31 |
|
|
/**
|
32 |
|
|
* default constructor.
|
33 |
|
|
*/
|
34 |
|
|
public NotificationMessage() {
|
35 |
|
|
// no operation
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
/**
|
39 |
|
|
* constructor with full parameters.
|
40 |
|
|
*
|
41 |
|
|
* @param subscriptionId subscription identifier
|
42 |
|
|
* @param topic produced topic
|
43 |
|
|
* @param resourceId resource identifier of the resource which triggered the notification, or null
|
44 |
|
|
* @param body body of the document which triggered the notification, or null
|
45 |
|
|
*/
|
46 |
|
|
public NotificationMessage(final String subscriptionId, final String topic, final String resourceId, final String body) {
|
47 |
|
|
super();
|
48 |
|
|
this.subscriptionId = subscriptionId;
|
49 |
|
|
this.topic = topic;
|
50 |
|
|
this.resourceId = resourceId;
|
51 |
|
|
this.body = body;
|
52 |
|
|
}
|
53 |
|
|
|
54 |
|
|
public String getSubscriptionId() {
|
55 |
|
|
return subscriptionId;
|
56 |
|
|
}
|
57 |
|
|
|
58 |
|
|
public void setSubscriptionId(final String subscriptionId) {
|
59 |
|
|
this.subscriptionId = subscriptionId;
|
60 |
|
|
}
|
61 |
|
|
|
62 |
|
|
public String getTopic() {
|
63 |
|
|
return topic;
|
64 |
|
|
}
|
65 |
|
|
|
66 |
|
|
public void setTopic(final String topic) {
|
67 |
|
|
this.topic = topic;
|
68 |
|
|
}
|
69 |
|
|
|
70 |
|
|
public String getResourceId() {
|
71 |
|
|
return resourceId;
|
72 |
|
|
}
|
73 |
|
|
|
74 |
|
|
public void setResourceId(final String resourceId) {
|
75 |
|
|
this.resourceId = resourceId;
|
76 |
|
|
}
|
77 |
|
|
|
78 |
|
|
public String getBody() {
|
79 |
|
|
return body;
|
80 |
|
|
}
|
81 |
|
|
|
82 |
|
|
public void setBody(final String body) {
|
83 |
|
|
this.body = body;
|
84 |
|
|
}
|
85 |
|
|
}
|