Revision 45103
Added by Claudio Atzori about 7 years ago
modules/cnr-rmi-api/trunk/deploy.info | ||
---|---|---|
1 |
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/cnr-rmi-api/trunk/", "deploy_repository": "dnet4-snapshots", "version": "4", "mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it", "deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet4-snapshots", "name": "cnr-rmi-api"} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/hnm/rmi/HostingNodeManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.hnm.rmi; |
|
2 |
|
|
3 |
import javax.jws.WebParam; |
|
4 |
import javax.jws.WebService; |
|
5 |
|
|
6 |
import eu.dnetlib.common.rmi.BaseService; |
|
7 |
|
|
8 |
/** |
|
9 |
* The HostingNodeManager Service is used to ... |
|
10 |
* |
|
11 |
* |
|
12 |
*/ |
|
13 |
|
|
14 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
15 |
public interface HostingNodeManagerService extends BaseService { |
|
16 |
public String echo(@WebParam(name = "s") String s); |
|
17 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/hcm/rmi/HostingContextManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.hcm.rmi; |
|
2 |
|
|
3 |
import javax.jws.WebService; |
|
4 |
|
|
5 |
import eu.dnetlib.common.rmi.BaseService; |
|
6 |
|
|
7 |
/** |
|
8 |
* Like a HostingNodeManager, but any webapp (web context) can have its own. |
|
9 |
* <p> |
|
10 |
* useful for dispatching notifications shared by all the services local to a single context. |
|
11 |
* </p> |
|
12 |
* |
|
13 |
* @author marko |
|
14 |
* @author antonis |
|
15 |
* |
|
16 |
*/ |
|
17 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
18 |
public interface HostingContextManagerService extends BaseService { |
|
19 |
|
|
20 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/resultset/rmi/ResultSetException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.resultset.rmi; |
|
2 |
|
|
3 |
import eu.dnetlib.common.rmi.RMIException; |
|
4 |
|
|
5 |
public class ResultSetException extends RMIException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = -7130554407601059627L; |
|
11 |
|
|
12 |
public ResultSetException(Throwable e) { |
|
13 |
super(e); |
|
14 |
// TODO Auto-generated constructor stub |
|
15 |
} |
|
16 |
|
|
17 |
public ResultSetException(String string) { |
|
18 |
super(string); |
|
19 |
} |
|
20 |
|
|
21 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/resultset/rmi/ResultSetService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.resultset.rmi; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import javax.jws.WebMethod; |
|
6 |
import javax.jws.WebParam; |
|
7 |
import javax.jws.WebService; |
|
8 |
import javax.xml.ws.wsaddressing.W3CEndpointReference; |
|
9 |
|
|
10 |
import eu.dnetlib.common.rmi.BaseService; |
|
11 |
|
|
12 |
/** |
|
13 |
* ResultSet service interface. |
|
14 |
* |
|
15 |
* TODO: implement other compatibility methods as needed. |
|
16 |
* |
|
17 |
* @author marko |
|
18 |
* |
|
19 |
*/ |
|
20 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
21 |
public interface ResultSetService extends BaseService { |
|
22 |
/** |
|
23 |
* create a new pull rs. |
|
24 |
* |
|
25 |
* @param bdId |
|
26 |
* bulk data identifier |
|
27 |
* @param initialPageSize |
|
28 |
* page size for the polling on the server side. |
|
29 |
* @param expiryTime |
|
30 |
* RS expiry time |
|
31 |
* @return |
|
32 |
*/ |
|
33 |
W3CEndpointReference createPullRSEPR( |
|
34 |
@WebParam(name = "dataProviderServiceAddress") W3CEndpointReference dataProviderEPR, |
|
35 |
@WebParam(name = "bdId") String bdId, |
|
36 |
@WebParam(name = "initialPageSize") int initialPageSize, |
|
37 |
@WebParam(name = "expiryTime") int expiryTime, |
|
38 |
@WebParam(name = "styleSheet") String styleSheet, |
|
39 |
@WebParam(name = "keepAliveTime") Integer keepAliveTime, |
|
40 |
@WebParam(name = "total") Integer total); |
|
41 |
|
|
42 |
/** |
|
43 |
* create a new pull rs. |
|
44 |
* |
|
45 |
* compatibility version |
|
46 |
* |
|
47 |
* @param bdId |
|
48 |
* bulk data identifier |
|
49 |
* @param initialPageSize |
|
50 |
* page size for the polling on the server side. |
|
51 |
* @param expiryTime |
|
52 |
* RS expiry time |
|
53 |
* @return |
|
54 |
*/ |
|
55 |
W3CEndpointReference createPullRS( |
|
56 |
@WebParam(name = "dataProviderServiceAddress") String dataProviderServiceAddress, |
|
57 |
@WebParam(name = "bdId") String bdId, |
|
58 |
@WebParam(name = "initialPageSize") int initialPageSize, |
|
59 |
@WebParam(name = "expiryTime") int expiryTime, |
|
60 |
@WebParam(name = "styleSheet") String styleSheet, |
|
61 |
@WebParam(name = "keepAliveTime") Integer keepAliveTime, |
|
62 |
@WebParam(name = "total") Integer total); |
|
63 |
|
|
64 |
/** |
|
65 |
* close a result set. A closed resultset is guaranteed not to grow. |
|
66 |
* |
|
67 |
* @param rsId |
|
68 |
*/ |
|
69 |
void closeRS(@WebParam(name = "rsId") String rsId); |
|
70 |
|
|
71 |
/** |
|
72 |
* get one 'page' of results. |
|
73 |
* |
|
74 |
* TODO: define how results are returned when the range is not present in the result set. |
|
75 |
* |
|
76 |
* @param fromPosition |
|
77 |
* counting from 1 |
|
78 |
* @param toPosition |
|
79 |
* included |
|
80 |
* @param requestMode |
|
81 |
* @return a page of data |
|
82 |
*/ |
|
83 |
List<String> getResult( |
|
84 |
@WebParam(name = "rsId") String rsId, |
|
85 |
@WebParam(name = "fromPosition") int fromPosition, |
|
86 |
@WebParam(name = "toPosition") int toPosition, |
|
87 |
@WebParam(name = "requestMode") String requestMode) throws ResultSetException; |
|
88 |
|
|
89 |
/** |
|
90 |
* get the number of result elements present in the resultset. |
|
91 |
* |
|
92 |
* @param rsId |
|
93 |
* result set identifier |
|
94 |
* @return number of results available in the resultset |
|
95 |
* @throws ResultSetException |
|
96 |
*/ |
|
97 |
int getNumberOfElements(@WebParam(name = "rsId") String rsId) throws ResultSetException; |
|
98 |
|
|
99 |
/** |
|
100 |
* create a new push resultset. |
|
101 |
* |
|
102 |
* @param expiryTime RS expiry time |
|
103 |
* @param keepAliveTime keep alive time |
|
104 |
* @return epr of new resultset |
|
105 |
* @throws ResultSetException |
|
106 |
*/ |
|
107 |
W3CEndpointReference createPushRS(@WebParam(name = "expiryTime") int expiryTime, @WebParam(name = "keepAliveTime") int keepAliveTime) |
|
108 |
throws ResultSetException; |
|
109 |
|
|
110 |
/** |
|
111 |
* add new data to a push resultset. |
|
112 |
* |
|
113 |
* @param rsId resultset id |
|
114 |
* @param elements list of elements to be addded |
|
115 |
* @return dummy value |
|
116 |
* @throws ResultSetException |
|
117 |
*/ |
|
118 |
String populateRS(@WebParam(name = "rsId") String rsId, @WebParam(name = "elements") List<String> elements) throws ResultSetException; |
|
119 |
|
|
120 |
/** |
|
121 |
* return current status of a resultset. |
|
122 |
* |
|
123 |
* @param rsId resultset id |
|
124 |
* @return status |
|
125 |
* @throws ResultSetException |
|
126 |
*/ |
|
127 |
String getRSStatus(@WebParam(name = "rsId") String rsId) throws ResultSetException; |
|
128 |
|
|
129 |
/** |
|
130 |
* read a resultset property. |
|
131 |
* |
|
132 |
* @param rsId resultset id |
|
133 |
* @param name property value |
|
134 |
* @return property value |
|
135 |
* @throws ResultSetException |
|
136 |
*/ |
|
137 |
String getProperty(@WebParam(name = "rsId") String rsId, @WebParam(name = "name") String name) throws ResultSetException; |
|
138 |
|
|
139 |
@WebMethod(operationName = "identify") |
|
140 |
public String identify(); |
|
141 |
|
|
142 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/sn/rmi/SubscriptionRequestRejectedException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.sn.rmi; |
|
2 |
|
|
3 |
/** |
|
4 |
* Thrown when a subscription request is rejected. |
|
5 |
* |
|
6 |
* @author claudio |
|
7 |
* |
|
8 |
*/ |
|
9 |
public class SubscriptionRequestRejectedException extends ISSNException { |
|
10 |
|
|
11 |
/** |
|
12 |
* |
|
13 |
*/ |
|
14 |
private static final long serialVersionUID = 263095606953662098L; |
|
15 |
|
|
16 |
public SubscriptionRequestRejectedException(String message) { |
|
17 |
super(message); |
|
18 |
// TODO Auto-generated constructor stub |
|
19 |
} |
|
20 |
|
|
21 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/sn/rmi/ISSNException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.sn.rmi; |
|
2 |
|
|
3 |
import eu.dnetlib.common.rmi.RMIException; |
|
4 |
|
|
5 |
public class ISSNException extends RMIException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = -7384073901457430004L; |
|
11 |
|
|
12 |
public ISSNException(final Throwable e) { |
|
13 |
super(e); |
|
14 |
} |
|
15 |
|
|
16 |
public ISSNException(final String message) { |
|
17 |
super(message); |
|
18 |
} |
|
19 |
|
|
20 |
public ISSNException(final String message, final Throwable e) { |
|
21 |
super(message, e); |
|
22 |
} |
|
23 |
|
|
24 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/sn/rmi/ISSNService.java | ||
---|---|---|
1 |
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, SubscriptionRequestRejectedException; |
|
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 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/registry/ISRegistryDocumentNotFoundException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.registry; |
|
2 |
|
|
3 |
import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException; |
|
4 |
|
|
5 |
public class ISRegistryDocumentNotFoundException extends ISRegistryException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = -1304948213334188538L; |
|
11 |
|
|
12 |
public ISRegistryDocumentNotFoundException(String string, Throwable e) { |
|
13 |
super(string, e); |
|
14 |
// TODO Auto-generated constructor stub |
|
15 |
} |
|
16 |
|
|
17 |
public ISRegistryDocumentNotFoundException(String string) { |
|
18 |
super(string); |
|
19 |
// TODO Auto-generated constructor stub |
|
20 |
} |
|
21 |
|
|
22 |
public ISRegistryDocumentNotFoundException(Throwable e) { |
|
23 |
super(e); |
|
24 |
// TODO Auto-generated constructor stub |
|
25 |
} |
|
26 |
|
|
27 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/registry/rmi/ISRegistryException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.registry.rmi; |
|
2 |
|
|
3 |
import eu.dnetlib.common.rmi.RMIException; |
|
4 |
|
|
5 |
public class ISRegistryException extends RMIException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = -3347405941287624771L; |
|
11 |
|
|
12 |
public ISRegistryException(Throwable e) { |
|
13 |
super(e); |
|
14 |
} |
|
15 |
|
|
16 |
public ISRegistryException(String string) { |
|
17 |
super(string); |
|
18 |
} |
|
19 |
|
|
20 |
public ISRegistryException(String string, Throwable e) { |
|
21 |
super(string, e); |
|
22 |
} |
|
23 |
|
|
24 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/registry/rmi/ISRegistryService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.registry.rmi; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import javax.jws.WebService; |
|
6 |
|
|
7 |
import eu.dnetlib.common.rmi.BaseService; |
|
8 |
import eu.dnetlib.enabling.is.registry.ISRegistryDocumentNotFoundException; |
|
9 |
|
|
10 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
11 |
public interface ISRegistryService extends BaseService { |
|
12 |
|
|
13 |
boolean addOrUpdateResourceType(String resourceType, String resourceSchema) throws ISRegistryException; |
|
14 |
|
|
15 |
boolean addResourceType(String resourceType, String resourceSchema) throws ISRegistryException; |
|
16 |
|
|
17 |
boolean deleteProfile(String profId) throws ISRegistryException, ISRegistryDocumentNotFoundException; |
|
18 |
|
|
19 |
@Deprecated |
|
20 |
boolean deleteProfiles(List<String> arrayprofId) throws ISRegistryException; |
|
21 |
|
|
22 |
/** |
|
23 |
* @param resourceType |
|
24 |
* @param hierarchical |
|
25 |
* remove subscription topics |
|
26 |
* @return |
|
27 |
* @throws ISRegistryException |
|
28 |
*/ |
|
29 |
boolean deleteResourceType(String resourceType, Boolean hierarchical) throws ISRegistryException; |
|
30 |
|
|
31 |
boolean executeXUpdate(String XQuery) throws ISRegistryException; |
|
32 |
|
|
33 |
String insertProfileForValidation(String resourceType, String resourceProfile) throws ISRegistryException; |
|
34 |
|
|
35 |
String invalidateProfile(String profId) throws ISRegistryException; |
|
36 |
|
|
37 |
boolean refreshProfile(String profId, String resourceType) throws ISRegistryException; |
|
38 |
|
|
39 |
/** |
|
40 |
* register a XML Profile. |
|
41 |
* |
|
42 |
* @param resourceProfile |
|
43 |
* xml profile |
|
44 |
* @return profile id |
|
45 |
* @throws ISRegistryException |
|
46 |
*/ |
|
47 |
String registerProfile(String resourceProfile) throws ISRegistryException; |
|
48 |
|
|
49 |
String registerSecureProfile(String resourceProfId, String secureProfId) throws ISRegistryException; |
|
50 |
|
|
51 |
boolean updateProfile(String profId, String resourceProfile, String resourceType) throws ISRegistryException; |
|
52 |
|
|
53 |
@Deprecated |
|
54 |
String updateProfileDHN(String resourceProfile) throws ISRegistryException; |
|
55 |
|
|
56 |
boolean addProfileNode(String profId, String xpath, String node) throws ISRegistryException; |
|
57 |
|
|
58 |
boolean updateProfileNode(String profId, String xpath, String node) throws ISRegistryException; |
|
59 |
|
|
60 |
boolean removeProfileNode(String profId, String nodeId) throws ISRegistryException; |
|
61 |
|
|
62 |
@Deprecated |
|
63 |
boolean updateRegionDescription(String profId, String resourceProfile) throws ISRegistryException; |
|
64 |
|
|
65 |
String validateProfile(String profId) throws ISRegistryException; |
|
66 |
|
|
67 |
@Deprecated |
|
68 |
List<String> validateProfiles(List<String> profIds) throws ISRegistryException; |
|
69 |
|
|
70 |
void addBlackBoardMessage(String profId, String messageId, String message) throws ISRegistryException; |
|
71 |
|
|
72 |
void replyBlackBoardMessage(String profId, String message) throws ISRegistryException; |
|
73 |
|
|
74 |
void deleteBlackBoardMessage(String profId, String messageId) throws ISRegistryException; |
|
75 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/lookup/rmi/ISLookUpDocumentNotFoundException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.lookup.rmi; |
|
2 |
|
|
3 |
import javax.xml.ws.WebFault; |
|
4 |
|
|
5 |
|
|
6 |
/** |
|
7 |
* Thrown when a given document is not found. |
|
8 |
* |
|
9 |
* @author marko |
|
10 |
* |
|
11 |
*/ |
|
12 |
@WebFault |
|
13 |
public class ISLookUpDocumentNotFoundException extends ISLookUpException { |
|
14 |
|
|
15 |
/** |
|
16 |
* exception chain + message. |
|
17 |
* |
|
18 |
* @param message message |
|
19 |
* @param e |
|
20 |
*/ |
|
21 |
public ISLookUpDocumentNotFoundException(String message, Throwable e) { |
|
22 |
super(message, e); |
|
23 |
} |
|
24 |
|
|
25 |
/** |
|
26 |
* exception chain constructor. |
|
27 |
* @param e |
|
28 |
*/ |
|
29 |
public ISLookUpDocumentNotFoundException(Throwable e) { |
|
30 |
super(e); |
|
31 |
} |
|
32 |
|
|
33 |
/** |
|
34 |
* exception message. |
|
35 |
* |
|
36 |
* @param message |
|
37 |
*/ |
|
38 |
public ISLookUpDocumentNotFoundException(String message) { |
|
39 |
super(message); |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* |
|
44 |
*/ |
|
45 |
private static final long serialVersionUID = 2295995755165801937L; |
|
46 |
|
|
47 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/lookup/rmi/ISLookUpException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.lookup.rmi; |
|
2 |
|
|
3 |
import javax.xml.ws.WebFault; |
|
4 |
|
|
5 |
import eu.dnetlib.common.rmi.RMIException; |
|
6 |
|
|
7 |
@WebFault |
|
8 |
public class ISLookUpException extends RMIException { |
|
9 |
|
|
10 |
/** |
|
11 |
* |
|
12 |
*/ |
|
13 |
private static final long serialVersionUID = -5626136963653382533L; |
|
14 |
|
|
15 |
public ISLookUpException(Throwable e) { |
|
16 |
super(e); |
|
17 |
} |
|
18 |
|
|
19 |
public ISLookUpException(String message, Throwable e) { |
|
20 |
super(message, e); |
|
21 |
} |
|
22 |
|
|
23 |
public ISLookUpException(String message) { |
|
24 |
super(message); |
|
25 |
} |
|
26 |
|
|
27 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/lookup/rmi/ISLookUpService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.lookup.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 ISLookUpService extends BaseService { |
|
13 |
|
|
14 |
Boolean flushCachedResultSets(); |
|
15 |
|
|
16 |
@Deprecated |
|
17 |
String getCollection(@WebParam(name = "profId") String profId, @WebParam(name = "format") String format) throws ISLookUpException; |
|
18 |
|
|
19 |
String retrieveCollection(@WebParam(name = "profId") String profId) throws ISLookUpException; |
|
20 |
|
|
21 |
String getResourceProfile(@WebParam(name = "profId") String profId) throws ISLookUpException, ISLookUpDocumentNotFoundException; |
|
22 |
|
|
23 |
String getResourceProfileByQuery(@WebParam(name = "XQuery") String XQuery) throws ISLookUpException, ISLookUpDocumentNotFoundException; |
|
24 |
|
|
25 |
String getResourceQoSParams(@WebParam(name = "id") String id) throws ISLookUpException; |
|
26 |
|
|
27 |
String getResourceTypeSchema(@WebParam(name = "resourceType") String resourceType) throws ISLookUpException, ISLookUpDocumentNotFoundException; |
|
28 |
|
|
29 |
W3CEndpointReference listCollections( |
|
30 |
@WebParam(name = "format") String format, |
|
31 |
@WebParam(name = "idfather") String idfather, |
|
32 |
@WebParam(name = "owner") String owner) throws ISLookUpException; |
|
33 |
|
|
34 |
@Deprecated |
|
35 |
W3CEndpointReference listCommunities() throws ISLookUpException; |
|
36 |
|
|
37 |
@Deprecated |
|
38 |
List<String> listDHNIDs() throws ISLookUpException; |
|
39 |
|
|
40 |
@Deprecated |
|
41 |
W3CEndpointReference listResourceProfiles( |
|
42 |
@WebParam(name = "resourceKind") String resourceKind, |
|
43 |
@WebParam(name = "format") String format, |
|
44 |
@WebParam(name = "resourceType") String resourceType) throws ISLookUpException; |
|
45 |
|
|
46 |
List<String> listResourceTypes() throws ISLookUpException; |
|
47 |
|
|
48 |
@Deprecated |
|
49 |
List<String> listServiceIDs(@WebParam(name = "serviceType") String serviceType) throws ISLookUpException; |
|
50 |
|
|
51 |
@Deprecated |
|
52 |
List<String> listServiceTypes() throws ISLookUpException; |
|
53 |
|
|
54 |
/** |
|
55 |
* Like searchProfile(), but bypassing the resultset. Useful for short xquery results. |
|
56 |
* |
|
57 |
* @param xquery xquery to be executed |
|
58 |
* @return list of strings (never null) |
|
59 |
* @throws ISLookUpException could happen |
|
60 |
*/ |
|
61 |
List<String> quickSearchProfile(@WebParam(name = "XQuery") String xquery) throws ISLookUpException; |
|
62 |
|
|
63 |
/** |
|
64 |
* Performs an xquery and returns the result using a standard ResultSet interface. |
|
65 |
* |
|
66 |
* @param xquery xquery to be executed |
|
67 |
* @return epr to a resultset |
|
68 |
* @throws ISLookUpException could happen |
|
69 |
*/ |
|
70 |
W3CEndpointReference searchProfile(@WebParam(name = "XQuery") String xquery) throws ISLookUpException; |
|
71 |
|
|
72 |
@Deprecated |
|
73 |
W3CEndpointReference listMDStores(@WebParam(name = "metadataformat") String metadataformat) throws ISLookUpException; |
|
74 |
|
|
75 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/store/rmi/ISStoreException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.store.rmi; |
|
2 |
|
|
3 |
import eu.dnetlib.common.rmi.RMIException; |
|
4 |
|
|
5 |
public class ISStoreException extends RMIException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = 8683126829156096420L; |
|
11 |
|
|
12 |
public ISStoreException(Throwable e) { |
|
13 |
super(e); |
|
14 |
} |
|
15 |
|
|
16 |
public ISStoreException(String message, Throwable e) { |
|
17 |
super(message, e); |
|
18 |
} |
|
19 |
|
|
20 |
public ISStoreException(String message) { |
|
21 |
super(message); |
|
22 |
} |
|
23 |
|
|
24 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/is/store/rmi/ISStoreService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.is.store.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 ISStoreService extends BaseService { |
|
13 |
|
|
14 |
boolean createFileColl(@WebParam(name = "fileColl") String fileColl) throws ISStoreException; |
|
15 |
|
|
16 |
@Deprecated |
|
17 |
boolean deleteArrayXML(@WebParam(name = "fileNames") List<String> fileNames, @WebParam(name = "fileColl") String fileColl) throws ISStoreException; |
|
18 |
|
|
19 |
boolean deleteFileColl(@WebParam(name = "fileColl") String fileColl) throws ISStoreException; |
|
20 |
|
|
21 |
boolean deleteXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl) throws ISStoreException; |
|
22 |
|
|
23 |
boolean executeXUpdate(@WebParam(name = "query") String query) throws ISStoreException; |
|
24 |
|
|
25 |
List<String> getFileColls() throws ISStoreException; |
|
26 |
|
|
27 |
List<String> getFileNames(@WebParam(name = "fileColl") String fileColl) throws ISStoreException; |
|
28 |
|
|
29 |
String getXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl) throws ISStoreException; |
|
30 |
|
|
31 |
String getXMLbyQuery(@WebParam(name = "query") String query) throws ISStoreException; |
|
32 |
|
|
33 |
boolean insertXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl, @WebParam(name = "file") String file) |
|
34 |
throws ISStoreException; |
|
35 |
|
|
36 |
boolean reindex(); |
|
37 |
|
|
38 |
@Deprecated |
|
39 |
W3CEndpointReference searchXML(@WebParam(name = "query") String query) throws ISStoreException; |
|
40 |
|
|
41 |
List<String> quickSearchXML(@WebParam(name = "query") String query) throws ISStoreException; |
|
42 |
|
|
43 |
boolean sync(); |
|
44 |
|
|
45 |
boolean updateXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl, @WebParam(name = "file") String file) |
|
46 |
throws ISStoreException; |
|
47 |
|
|
48 |
String backup() throws ISStoreException; |
|
49 |
|
|
50 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/enabling/dlm/rmi/DlmService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.dlm.rmi; |
|
2 |
|
|
3 |
import javax.jws.WebService; |
|
4 |
|
|
5 |
import eu.dnetlib.common.rmi.BaseService; |
|
6 |
|
|
7 |
/** |
|
8 |
* Distributed lock manager. Currently is used mostly to start the underlying lock manager (e.g. zookeeper) and let |
|
9 |
* client interface directly with it. |
|
10 |
* |
|
11 |
* <p>The DLM service profile contains the entry point of the underlying locking service.</p> |
|
12 |
* |
|
13 |
* @author marko |
|
14 |
* |
|
15 |
*/ |
|
16 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
17 |
public interface DlmService extends BaseService { |
|
18 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/common/rmi/DNetRestDocumentation.java | ||
---|---|---|
1 |
package eu.dnetlib.common.rmi; |
|
2 |
|
|
3 |
import java.lang.annotation.ElementType; |
|
4 |
import java.lang.annotation.Retention; |
|
5 |
import java.lang.annotation.RetentionPolicy; |
|
6 |
import java.lang.annotation.Target; |
|
7 |
|
|
8 |
/** |
|
9 |
* Created by claudio on 30/11/2016. |
|
10 |
* to be used in REST controllers, and autodiscovered to build and publish their documentation |
|
11 |
*/ |
|
12 |
@Target({ElementType.TYPE}) |
|
13 |
@Retention(RetentionPolicy.RUNTIME) |
|
14 |
public @interface DNetRestDocumentation { |
|
15 |
|
|
16 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/common/rmi/UnimplementedException.java | ||
---|---|---|
1 |
package eu.dnetlib.common.rmi; |
|
2 |
|
|
3 |
public class UnimplementedException extends RuntimeException { |
|
4 |
|
|
5 |
/** |
|
6 |
* |
|
7 |
*/ |
|
8 |
private static final long serialVersionUID = 6040968020696349497L; |
|
9 |
|
|
10 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/common/rmi/RMIException.java | ||
---|---|---|
1 |
package eu.dnetlib.common.rmi; |
|
2 |
|
|
3 |
/** |
|
4 |
* |
|
5 |
* All RMI exception thrown from the service remote method invocation interfaces inherit this class |
|
6 |
* |
|
7 |
* @author marko |
|
8 |
* |
|
9 |
*/ |
|
10 |
abstract public class RMIException extends Exception { // NOPMD |
|
11 |
|
|
12 |
/** |
|
13 |
* |
|
14 |
*/ |
|
15 |
private static final long serialVersionUID = 428841258652765265L; |
|
16 |
|
|
17 |
public RMIException(final Throwable exception) { |
|
18 |
super(exception); |
|
19 |
} |
|
20 |
|
|
21 |
public RMIException(final String string) { |
|
22 |
super(string); |
|
23 |
} |
|
24 |
|
|
25 |
public RMIException(final String string, final Throwable exception) { |
|
26 |
super(string, exception); |
|
27 |
} |
|
28 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/common/rmi/APIDeprecatedException.java | ||
---|---|---|
1 |
package eu.dnetlib.common.rmi; |
|
2 |
|
|
3 |
public class APIDeprecatedException extends RuntimeException { |
|
4 |
|
|
5 |
/** |
|
6 |
* |
|
7 |
*/ |
|
8 |
private static final long serialVersionUID = -5606373588445519515L; |
|
9 |
|
|
10 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/common/rmi/BaseService.java | ||
---|---|---|
1 |
package eu.dnetlib.common.rmi; |
|
2 |
|
|
3 |
import javax.jws.WebMethod; |
|
4 |
import javax.jws.WebParam; |
|
5 |
import javax.jws.WebService; |
|
6 |
|
|
7 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
8 |
public interface BaseService { |
|
9 |
|
|
10 |
/** |
|
11 |
* All DRIVER services must implement method notify() in order to communicate with the IS_SN |
|
12 |
* |
|
13 |
* @param subsrciptionId |
|
14 |
* @param topic |
|
15 |
* @param isId |
|
16 |
* @param message |
|
17 |
*/ |
|
18 |
@WebMethod(operationName = "notify") |
|
19 |
public void notify(@WebParam(name = "subscrId") String subscriptionId, |
|
20 |
@WebParam(name = "topic") String topic, |
|
21 |
@WebParam(name = "is_id") String isId, |
|
22 |
@WebParam(name = "message") String message); |
|
23 |
|
|
24 |
/** |
|
25 |
* Identifies the service's version. Version syntax: ${NAME}-${MAJOR}.${MINOR}.${MICRO}[-${LABEL}] |
|
26 |
* |
|
27 |
* @return the service's version |
|
28 |
*/ |
|
29 |
@WebMethod(operationName = "identify") |
|
30 |
public String identify(); |
|
31 |
|
|
32 |
public void start(); |
|
33 |
|
|
34 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/utility/objectpackaging/rmi/ObjectPackagingException.java | ||
---|---|---|
1 |
package eu.dnetlib.data.utility.objectpackaging.rmi; |
|
2 |
|
|
3 |
import javax.xml.ws.WebFault; |
|
4 |
|
|
5 |
import eu.dnetlib.common.rmi.RMIException; |
|
6 |
|
|
7 |
@WebFault |
|
8 |
public class ObjectPackagingException extends RMIException { |
|
9 |
|
|
10 |
private static final long serialVersionUID = 3468254939586031822L; |
|
11 |
|
|
12 |
/** |
|
13 |
* |
|
14 |
*/ |
|
15 |
|
|
16 |
public ObjectPackagingException(Throwable e) { |
|
17 |
super(e); |
|
18 |
} |
|
19 |
|
|
20 |
public ObjectPackagingException(String message, Throwable e) { |
|
21 |
super(message, e); |
|
22 |
} |
|
23 |
|
|
24 |
public ObjectPackagingException(String message) { |
|
25 |
super(message); |
|
26 |
} |
|
27 |
|
|
28 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/utility/objectpackaging/rmi/ObjectPackagingService.java | ||
---|---|---|
1 |
package eu.dnetlib.data.utility.objectpackaging.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 |
/** The Object Packaging Service is used to combine the records spread |
|
12 |
* into one information package, namely an Object Record. |
|
13 |
*/ |
|
14 |
|
|
15 |
|
|
16 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
17 |
public interface ObjectPackagingService extends BaseService { |
|
18 |
/** Return the EPR of the resultSet containing the generated packages |
|
19 |
* |
|
20 |
* @param eprs A list of EPRs used to access the input resultSets. ResultSets MUST be ordered using an order key identified by xpath_ID |
|
21 |
* @param xpath_ID A valid xpath, used to access the ordered ID of the elements of the input resultSets. |
|
22 |
* @return EPR of the generated resultset |
|
23 |
*/ |
|
24 |
W3CEndpointReference generatePackages(@WebParam(name="eprs") List<W3CEndpointReference> eprs, |
|
25 |
@WebParam(name="xpath_ID") String xpath_ID) throws ObjectPackagingException; |
|
26 |
|
|
27 |
/** Return the EPR of the resultSet containing the unpackaged element |
|
28 |
* |
|
29 |
* @param epr The epr used to access the resultset that contains input packages, packages are xml record in this format: <objectRecord><elem>REC1</elem><elem>REC2</elem><elem>REC3</elem></objectRecord> |
|
30 |
* @return EPR of the generated resultset |
|
31 |
*/ |
|
32 |
W3CEndpointReference splitPackages(@WebParam(name="epr") W3CEndpointReference epr) throws ObjectPackagingException; |
|
33 |
|
|
34 |
|
|
35 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/information/collectionservice/rmi/CollectionServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.data.information.collectionservice.rmi; |
|
2 |
|
|
3 |
|
|
4 |
import javax.xml.ws.WebFault; |
|
5 |
|
|
6 |
import eu.dnetlib.common.rmi.RMIException; |
|
7 |
|
|
8 |
@WebFault |
|
9 |
public class CollectionServiceException extends RMIException { |
|
10 |
|
|
11 |
/** |
|
12 |
* |
|
13 |
*/ |
|
14 |
private static final long serialVersionUID = 8094008463553904905L; |
|
15 |
|
|
16 |
public CollectionServiceException(Throwable e) { |
|
17 |
super(e); |
|
18 |
} |
|
19 |
|
|
20 |
public CollectionServiceException(String message, Throwable e) { |
|
21 |
super(message, e); |
|
22 |
} |
|
23 |
|
|
24 |
public CollectionServiceException(String message) { |
|
25 |
super(message); |
|
26 |
} |
|
27 |
|
|
28 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/information/collectionservice/rmi/CollectionService.java | ||
---|---|---|
1 |
package eu.dnetlib.data.information.collectionservice.rmi; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import javax.jws.WebParam; |
|
6 |
import javax.jws.WebService; |
|
7 |
|
|
8 |
import eu.dnetlib.common.rmi.BaseService; |
|
9 |
|
|
10 |
/** |
|
11 |
* The Collection Service is used to ... |
|
12 |
* |
|
13 |
* |
|
14 |
*/ |
|
15 |
|
|
16 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
17 |
public interface CollectionService extends BaseService { |
|
18 |
|
|
19 |
public String getCollection(@WebParam(name = "collId") final String collId) throws CollectionServiceException; |
|
20 |
|
|
21 |
public List<String> getCollections(@WebParam(name = "collIds") final List<String> collIds) throws CollectionServiceException; |
|
22 |
|
|
23 |
public void updateCollection(@WebParam(name = "coll") final String coll) throws CollectionServiceException; |
|
24 |
|
|
25 |
public void deleteCollection(@WebParam(name = "collId") final String collId) throws CollectionServiceException; |
|
26 |
|
|
27 |
public String createCollection(@WebParam(name = "coll") final String coll) throws CollectionServiceException; |
|
28 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/information/publisher/rmi/PublisherService.java | ||
---|---|---|
1 |
package eu.dnetlib.data.information.publisher.rmi; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import javax.jws.WebMethod; |
|
6 |
import javax.jws.WebParam; |
|
7 |
import javax.jws.WebService; |
|
8 |
import javax.xml.ws.wsaddressing.W3CEndpointReference; |
|
9 |
|
|
10 |
import eu.dnetlib.common.rmi.BaseService; |
|
11 |
|
|
12 |
/** |
|
13 |
* Publisher service. Provides access to metadata records and objects. |
|
14 |
* |
|
15 |
* @author marko |
|
16 |
* |
|
17 |
*/ |
|
18 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
19 |
public interface PublisherService extends BaseService { |
|
20 |
|
|
21 |
/** |
|
22 |
* Get a (metadata) resource by ID. |
|
23 |
* |
|
24 |
* @param id |
|
25 |
* @param format |
|
26 |
* @param layout |
|
27 |
* @param interpretation |
|
28 |
* @return |
|
29 |
*/ |
|
30 |
@WebMethod |
|
31 |
String getResourceById(@WebParam(name = "id") final String id, |
|
32 |
@WebParam(name = "format") final String format, |
|
33 |
@WebParam(name = "layout") final String layout, |
|
34 |
@WebParam(name = "interpretation") final String interpretation); |
|
35 |
|
|
36 |
/** |
|
37 |
* Get (metadata) resources by IDs. |
|
38 |
* |
|
39 |
* @param ids |
|
40 |
* @param format |
|
41 |
* @param layout |
|
42 |
* @param interpretation |
|
43 |
* @return |
|
44 |
*/ |
|
45 |
@WebMethod |
|
46 |
W3CEndpointReference getResourcesByIds(@WebParam(name = "ids") final List<String> ids, |
|
47 |
@WebParam(name = "format") final String format, |
|
48 |
@WebParam(name = "layout") final String layout, |
|
49 |
@WebParam(name = "interpretation") final String interpretation); |
|
50 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/mdstore/DocumentNotFoundException.java | ||
---|---|---|
1 |
package eu.dnetlib.data.mdstore; |
|
2 |
|
|
3 |
/** |
|
4 |
* Signals that a metadata record cannot be found in a given MDStore. |
|
5 |
*/ |
|
6 |
public class DocumentNotFoundException extends MDStoreServiceException { |
|
7 |
|
|
8 |
/** |
|
9 |
* |
|
10 |
*/ |
|
11 |
private static final long serialVersionUID = 5188036989114250548L; |
|
12 |
|
|
13 |
public DocumentNotFoundException(final String s, final Throwable e) { |
|
14 |
super(s, e); |
|
15 |
} |
|
16 |
|
|
17 |
public DocumentNotFoundException(final String s) { |
|
18 |
super(s); |
|
19 |
} |
|
20 |
|
|
21 |
public DocumentNotFoundException(final Throwable e) { |
|
22 |
super(e); |
|
23 |
} |
|
24 |
|
|
25 |
public DocumentNotFoundException() { |
|
26 |
super(); |
|
27 |
} |
|
28 |
|
|
29 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/mdstore/MDStoreServiceException.java | ||
---|---|---|
1 |
package eu.dnetlib.data.mdstore; |
|
2 |
|
|
3 |
/** |
|
4 |
* General mdstore service exception. |
|
5 |
* @author claudio atzori |
|
6 |
* @version 1.0.0 |
|
7 |
* |
|
8 |
*/ |
|
9 |
public class MDStoreServiceException extends Exception { |
|
10 |
|
|
11 |
/** |
|
12 |
* |
|
13 |
*/ |
|
14 |
private static final long serialVersionUID = -6772977735282310658L; |
|
15 |
|
|
16 |
public MDStoreServiceException(String s, Throwable e) { |
|
17 |
super(s, e); |
|
18 |
} |
|
19 |
|
|
20 |
public MDStoreServiceException(String s) { |
|
21 |
super(s); |
|
22 |
} |
|
23 |
|
|
24 |
public MDStoreServiceException(Throwable e) { |
|
25 |
super(e); |
|
26 |
} |
|
27 |
|
|
28 |
public MDStoreServiceException() { |
|
29 |
super(); |
|
30 |
} |
|
31 |
|
|
32 |
} |
modules/cnr-rmi-api/trunk/src/main/java/eu/dnetlib/data/mdstore/MDStoreService.java | ||
---|---|---|
1 |
package eu.dnetlib.data.mdstore; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import javax.jws.WebMethod; |
|
6 |
import javax.jws.WebParam; |
|
7 |
import javax.jws.WebService; |
|
8 |
import javax.xml.ws.wsaddressing.W3CEndpointReference; |
|
9 |
|
|
10 |
import eu.dnetlib.common.rmi.BaseService; |
|
11 |
|
|
12 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
13 |
public interface MDStoreService extends BaseService { |
|
14 |
|
|
15 |
/** |
|
16 |
* Identifies service and version. |
|
17 |
* |
|
18 |
* @return |
|
19 |
*/ |
|
20 |
@Override |
|
21 |
public String identify(); |
|
22 |
|
|
23 |
/** |
|
24 |
* Returns ResultSet EPR for delivered mdstore records. |
|
25 |
* |
|
26 |
* @param mdId |
|
27 |
* @param from |
|
28 |
* @param until |
|
29 |
* @param recordFilter |
|
30 |
* REGEX on the metadata record |
|
31 |
* @return ResultSet EPR |
|
32 |
* @throws MDStoreServiceException |
|
33 |
*/ |
|
34 |
public W3CEndpointReference deliverMDRecords(@WebParam(name = "mdId") final String mdId, |
|
35 |
@WebParam(name = "from") final String from, |
|
36 |
@WebParam(name = "until") final String until, |
|
37 |
@WebParam(name = "recordsFilter") final String recordFilter) throws MDStoreServiceException; |
|
38 |
|
|
39 |
/** |
|
40 |
* Deliver single record from selected mdstore. |
|
41 |
* |
|
42 |
* @param mdId |
|
43 |
* @param recordId |
|
44 |
* @return record |
|
45 |
* @throws MDStoreServiceException |
|
46 |
*/ |
|
47 |
public String deliverRecord(@WebParam(name = "mdId") final String mdId, @WebParam(name = "recordId") final String recordId) throws MDStoreServiceException, |
|
48 |
DocumentNotFoundException; |
|
49 |
|
|
50 |
/** |
|
51 |
* Returns list of all stored indices. |
|
52 |
* |
|
53 |
* @return list of all stored indices |
|
54 |
*/ |
|
55 |
public List<String> getListOfMDStores() throws MDStoreServiceException; |
|
56 |
|
|
57 |
public List<String> listMDStores(@WebParam(name = "format") final String format, |
|
58 |
@WebParam(name = "layout") final String layout, |
|
59 |
@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException; |
|
60 |
|
|
61 |
public W3CEndpointReference bulkDeliverMDRecords(@WebParam(name = "format") final String format, |
|
62 |
@WebParam(name = "layout") final String layout, |
|
63 |
@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException; |
|
64 |
|
|
65 |
/** |
|
66 |
* Store md records from a result set |
|
67 |
* |
|
68 |
* @param mdId |
|
69 |
* @param rsId |
|
70 |
* @param storingType |
|
71 |
* @return returns true immediately. |
|
72 |
* @throws MDStoreServiceException |
|
73 |
*/ |
|
74 |
@Deprecated |
|
75 |
public boolean storeMDRecordsFromRS(@WebParam(name = "mdId") final String mdId, |
|
76 |
@WebParam(name = "rsId") final String rsId, |
|
77 |
@WebParam(name = "storingType") final String storingType) throws MDStoreServiceException; |
|
78 |
|
|
79 |
/** |
|
80 |
* Gets the size of the mdstore with the given identifier. |
|
81 |
* |
|
82 |
* @param mdId |
|
83 |
* identifier of an mdstore |
|
84 |
* @return the number of records in the store |
|
85 |
*/ |
|
86 |
@WebMethod(operationName = "size") |
|
87 |
public int size(@WebParam(name = "mdId") final String mdId) throws MDStoreServiceException; |
|
88 |
|
|
89 |
/** |
|
90 |
* Gets the sum of records stored in all mdstore with the given format, layout , interpretation |
|
91 |
* |
|
92 |
* @param format |
|
93 |
* format |
|
94 |
* @param layout |
|
95 |
* layout |
|
96 |
* @param interpretation |
|
97 |
* interpretation |
|
98 |
* @return the total number of records in the mdstores of the given type |
|
99 |
*/ |
|
100 |
@WebMethod(operationName = "sizeByFormat") |
|
101 |
public int size(@WebParam(name = "format") final String format, |
|
102 |
@WebParam(name = "layout") final String layout, |
|
103 |
@WebParam(name = "interpretation") final String interpretation) throws MDStoreServiceException; |
|
104 |
|
|
105 |
} |
modules/cnr-rmi-api/trunk/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<parent> |
|
4 |
<groupId>eu.dnetlib</groupId> |
|
5 |
<artifactId>dnet-parent</artifactId> |
|
6 |
<version>1.0.0</version> |
|
7 |
<relativePath /> |
|
8 |
</parent> |
|
9 |
<modelVersion>4.0.0</modelVersion> |
|
10 |
<groupId>eu.dnetlib</groupId> |
|
11 |
<artifactId>cnr-rmi-api</artifactId> |
|
12 |
<packaging>jar</packaging> |
|
13 |
<version>2.6.1-SNAPSHOT</version> |
|
14 |
<scm> |
|
15 |
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/cnr-rmi-api/trunk</developerConnection> |
|
16 |
</scm> |
|
17 |
<dependencies> |
|
18 |
<dependency> |
|
19 |
<groupId>org.apache.cxf</groupId> |
|
20 |
<artifactId>cxf-api</artifactId> |
|
21 |
<version>${cxf.version}</version> |
|
22 |
</dependency> |
|
23 |
<dependency> |
|
24 |
<groupId>junit</groupId> |
|
25 |
<artifactId>junit</artifactId> |
|
26 |
<version>${junit.version}</version> |
|
27 |
<scope>test</scope> |
|
28 |
</dependency> |
|
29 |
</dependencies> |
|
30 |
</project> |
modules/cnr-rmi-api/branch/informationService/deploy.info | ||
---|---|---|
1 |
{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/cnr-rmi-api/trunk/", "deploy_repository": "dnet4-snapshots", "version": "4", "mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it", "deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet4-snapshots", "name": "cnr-rmi-api"} |
modules/cnr-rmi-api/branch/informationService/src/main/java/eu/dnetlib/enabling/hnm/rmi/HostingNodeManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.hnm.rmi; |
|
2 |
|
|
3 |
import javax.jws.WebParam; |
|
4 |
import javax.jws.WebService; |
|
5 |
|
|
6 |
import eu.dnetlib.common.rmi.BaseService; |
|
7 |
|
|
8 |
/** |
|
9 |
* The HostingNodeManager Service is used to ... |
|
10 |
* |
|
11 |
* |
|
12 |
*/ |
|
13 |
|
|
14 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
15 |
public interface HostingNodeManagerService extends BaseService { |
|
16 |
public String echo(@WebParam(name = "s") String s); |
|
17 |
} |
modules/cnr-rmi-api/branch/informationService/src/main/java/eu/dnetlib/enabling/hcm/rmi/HostingContextManagerService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.hcm.rmi; |
|
2 |
|
|
3 |
import javax.jws.WebService; |
|
4 |
|
|
5 |
import eu.dnetlib.common.rmi.BaseService; |
|
6 |
|
|
7 |
/** |
|
8 |
* Like a HostingNodeManager, but any webapp (web context) can have its own. |
|
9 |
* <p> |
|
10 |
* useful for dispatching notifications shared by all the services local to a single context. |
|
11 |
* </p> |
|
12 |
* |
|
13 |
* @author marko |
|
14 |
* @author antonis |
|
15 |
* |
|
16 |
*/ |
|
17 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
18 |
public interface HostingContextManagerService extends BaseService { |
|
19 |
|
|
20 |
} |
modules/cnr-rmi-api/branch/informationService/src/main/java/eu/dnetlib/enabling/resultset/rmi/ResultSetException.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.resultset.rmi; |
|
2 |
|
|
3 |
import eu.dnetlib.common.rmi.RMIException; |
|
4 |
|
|
5 |
public class ResultSetException extends RMIException { |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
*/ |
|
10 |
private static final long serialVersionUID = -7130554407601059627L; |
|
11 |
|
|
12 |
public ResultSetException(Throwable e) { |
|
13 |
super(e); |
|
14 |
// TODO Auto-generated constructor stub |
|
15 |
} |
|
16 |
|
|
17 |
public ResultSetException(String string) { |
|
18 |
super(string); |
|
19 |
} |
|
20 |
|
|
21 |
} |
modules/cnr-rmi-api/branch/informationService/src/main/java/eu/dnetlib/enabling/resultset/rmi/ResultSetService.java | ||
---|---|---|
1 |
package eu.dnetlib.enabling.resultset.rmi; |
|
2 |
|
|
3 |
import java.util.List; |
|
4 |
|
|
5 |
import javax.jws.WebMethod; |
|
6 |
import javax.jws.WebParam; |
|
7 |
import javax.jws.WebService; |
|
8 |
import javax.xml.ws.wsaddressing.W3CEndpointReference; |
|
9 |
|
|
10 |
import eu.dnetlib.common.rmi.BaseService; |
|
11 |
|
|
12 |
/** |
|
13 |
* ResultSet service interface. |
|
14 |
* |
|
15 |
* TODO: implement other compatibility methods as needed. |
|
16 |
* |
|
17 |
* @author marko |
|
18 |
* |
|
19 |
*/ |
|
20 |
@WebService(targetNamespace = "http://services.dnetlib.eu/") |
|
21 |
public interface ResultSetService extends BaseService { |
|
22 |
/** |
|
23 |
* create a new pull rs. |
|
24 |
* |
|
25 |
* @param bdId |
|
26 |
* bulk data identifier |
|
27 |
* @param initialPageSize |
|
28 |
* page size for the polling on the server side. |
|
29 |
* @param expiryTime |
|
30 |
* RS expiry time |
|
31 |
* @return |
|
32 |
*/ |
|
33 |
W3CEndpointReference createPullRSEPR( |
|
34 |
@WebParam(name = "dataProviderServiceAddress") W3CEndpointReference dataProviderEPR, |
|
35 |
@WebParam(name = "bdId") String bdId, |
|
36 |
@WebParam(name = "initialPageSize") int initialPageSize, |
|
37 |
@WebParam(name = "expiryTime") int expiryTime, |
|
38 |
@WebParam(name = "styleSheet") String styleSheet, |
Also available in: Unified diff
codebase used to migrate to java8 the production system