1 |
26600
|
sandro.lab
|
package eu.dnetlib.enabling.is.sn.rmi;
|
2 |
|
|
|
3 |
|
|
import java.util.List;
|
4 |
|
|
|
5 |
|
|
import javax.jws.WebParam;
|
6 |
|
|
import javax.jws.WebService;
|
7 |
|
|
import javax.xml.ws.wsaddressing.W3CEndpointReference;
|
8 |
|
|
|
9 |
|
|
import eu.dnetlib.common.rmi.BaseService;
|
10 |
|
|
|
11 |
|
|
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
12 |
|
|
public interface ISSNService extends BaseService {
|
13 |
|
|
|
14 |
|
|
/**
|
15 |
|
|
* fossil.
|
16 |
|
|
*
|
17 |
|
|
* @param topic
|
18 |
|
|
* @return
|
19 |
|
|
* @throws ISSNException
|
20 |
|
|
*/
|
21 |
|
|
String getCurrentMessage(@WebParam(name = "topic") String topic) throws ISSNException;
|
22 |
|
|
|
23 |
|
|
/**
|
24 |
|
|
* puts a subcription in a paused state. paused subscription are not notified even when triggered.
|
25 |
|
|
*
|
26 |
|
|
* @param subscrId
|
27 |
|
|
* subscription identifier
|
28 |
|
|
* @return returns false if the subscription is already paused.
|
29 |
|
|
* @throws ISSNException
|
30 |
|
|
* may happen
|
31 |
|
|
*/
|
32 |
|
|
boolean pauseSubscription(@WebParam(name = "subscrId") String subscrId) throws ISSNException;
|
33 |
|
|
|
34 |
|
|
/**
|
35 |
|
|
* Used to renew the subscription before it expires.
|
36 |
|
|
*
|
37 |
|
|
* <p>
|
38 |
|
|
* In practice it resets the ttl to another value, so it can be used to reset a infinte ttl subscription to a finite
|
39 |
|
|
* value.
|
40 |
|
|
* </p>
|
41 |
|
|
*
|
42 |
|
|
* @param subscrId
|
43 |
|
|
* subscription id
|
44 |
|
|
* @param terminationTime
|
45 |
|
|
* new ttl (from now), or 0 (infinite)
|
46 |
|
|
* @return true if successful
|
47 |
|
|
* @throws ISSNException
|
48 |
|
|
* may happen
|
49 |
|
|
*/
|
50 |
|
|
boolean renew(@WebParam(name = "subscrId") String subscrId, @WebParam(name = "terminationTime") int terminationTime) throws ISSNException;
|
51 |
|
|
|
52 |
|
|
/**
|
53 |
|
|
* resumes a paused subscription.
|
54 |
|
|
*
|
55 |
|
|
* @param subscrId
|
56 |
|
|
* subscription id
|
57 |
|
|
* @return true if resumed. false if it was not paused.
|
58 |
|
|
* @throws ISSNException
|
59 |
|
|
* may happen
|
60 |
|
|
*/
|
61 |
|
|
boolean resumeSubscription(@WebParam(name = "subscrId") String subscrId) throws ISSNException;
|
62 |
|
|
|
63 |
|
|
/**
|
64 |
|
|
* @param consumerReference
|
65 |
|
|
* epr to be called when the notification is triggered
|
66 |
|
|
* @param topicExpression
|
67 |
|
|
* topic expression to register
|
68 |
|
|
* @param initialTerminationTime
|
69 |
|
|
* ttl in seconds (0 = infinite)
|
70 |
|
|
* @return subscription id
|
71 |
|
|
* @throws ISSNException
|
72 |
|
|
* may happen
|
73 |
|
|
*/
|
74 |
|
|
String subscribe(
|
75 |
|
|
@WebParam(name = "consumerReference") W3CEndpointReference consumerReference,
|
76 |
|
|
@WebParam(name = "topicExpression") String topicExpression,
|
77 |
|
|
@WebParam(name = "initialTerminationTime") int initialTerminationTime) throws ISSNException;
|
78 |
|
|
|
79 |
|
|
boolean unsubscribe(@WebParam(name = "subscrId") String subscrId) throws ISSNException;
|
80 |
|
|
|
81 |
|
|
/**
|
82 |
|
|
* fossil.
|
83 |
|
|
*
|
84 |
|
|
* @param resourceType
|
85 |
|
|
* @param profileId
|
86 |
|
|
* @param profile
|
87 |
|
|
* @return
|
88 |
|
|
* @throws ISSNException
|
89 |
|
|
*/
|
90 |
|
|
boolean actionCreatePerformed(
|
91 |
|
|
@WebParam(name = "resourceType") String resourceType,
|
92 |
|
|
@WebParam(name = "profileId") String profileId,
|
93 |
|
|
@WebParam(name = "profile") String profile) throws ISSNException;
|
94 |
|
|
|
95 |
|
|
/**
|
96 |
|
|
* fossil.
|
97 |
|
|
*
|
98 |
|
|
* @param resourceType
|
99 |
|
|
* @param profileId
|
100 |
|
|
* @param profileBefore
|
101 |
|
|
* @param profileAfter
|
102 |
|
|
* @return
|
103 |
|
|
* @throws ISSNException
|
104 |
|
|
*/
|
105 |
|
|
boolean actionUpdatePerformed(
|
106 |
|
|
@WebParam(name = "resourceType") String resourceType,
|
107 |
|
|
@WebParam(name = "profileId") String profileId,
|
108 |
|
|
@WebParam(name = "profileBefore") String profileBefore,
|
109 |
|
|
@WebParam(name = "profileAfter") String profileAfter) throws ISSNException;
|
110 |
|
|
|
111 |
|
|
/**
|
112 |
|
|
* fossil.
|
113 |
|
|
*
|
114 |
|
|
* @param resourceType
|
115 |
|
|
* @param profileId
|
116 |
|
|
* @return
|
117 |
|
|
* @throws ISSNException
|
118 |
|
|
*/
|
119 |
|
|
boolean actionDeletePerformed(@WebParam(name = "resourceType") String resourceType, @WebParam(name = "profileId") String profileId)
|
120 |
|
|
throws ISSNException;
|
121 |
|
|
|
122 |
|
|
/**
|
123 |
|
|
* list all subscriptions. Mostly for debug reasons.
|
124 |
|
|
*
|
125 |
|
|
* @return list of subscription ids.
|
126 |
|
|
*/
|
127 |
|
|
List<String> listSubscriptions();
|
128 |
|
|
|
129 |
|
|
}
|