Import cnr-rmi-api project, rename it dnet-rmi-api and use jakarta and metro in place of javax for portability to java 17
This commit is contained in:
parent
56b05cde0b
commit
e0d5e1455e
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
<artifactId>dhp</artifactId>
|
||||
<version>1.2.5-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>dhp-rmi-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.2.5-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-core</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish.metro</groupId>
|
||||
<artifactId>webservices-rt</artifactId>
|
||||
<version>${metro.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
package eu.dnetlib.common.rmi;
|
||||
|
||||
public class APIDeprecatedException extends RuntimeException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5606373588445519515L;
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
package eu.dnetlib.common.rmi;
|
||||
|
||||
import jakarta.jws.WebMethod;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface BaseService {
|
||||
|
||||
/**
|
||||
* All DRIVER services must implement method notify() in order to communicate with the IS_SN
|
||||
*
|
||||
* @param subsrciptionId
|
||||
* @param topic
|
||||
* @param isId
|
||||
* @param message
|
||||
*/
|
||||
@WebMethod(operationName = "notify")
|
||||
void notify(@WebParam(name = "subscrId") String subscriptionId,
|
||||
@WebParam(name = "topic") String topic,
|
||||
@WebParam(name = "is_id") String isId,
|
||||
@WebParam(name = "message") String message);
|
||||
|
||||
/**
|
||||
* Identifies the service's version. Version syntax: ${NAME}-${MAJOR}.${MINOR}.${MICRO}[-${LABEL}]
|
||||
*
|
||||
* @return the service's version
|
||||
*/
|
||||
@WebMethod(operationName = "identify")
|
||||
String identify();
|
||||
|
||||
void start();
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
package eu.dnetlib.common.rmi;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Created by claudio on 30/11/2016.
|
||||
* to be used in REST controllers, and autodiscovered to build and publish their documentation
|
||||
*/
|
||||
@Target({
|
||||
ElementType.TYPE
|
||||
})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface DNetRestDocumentation {
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
package eu.dnetlib.common.rmi;
|
||||
|
||||
/**
|
||||
* All RMI exception thrown from the service remote method invocation interfaces inherit this class
|
||||
*
|
||||
* @author marko
|
||||
*/
|
||||
abstract public class RMIException extends Exception { // NOPMD
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 428841258652765265L;
|
||||
|
||||
public RMIException(final Throwable exception) {
|
||||
super(exception);
|
||||
}
|
||||
|
||||
public RMIException(final String string) {
|
||||
super(string);
|
||||
}
|
||||
|
||||
public RMIException(final String string, final Throwable exception) {
|
||||
super(string, exception);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
package eu.dnetlib.common.rmi;
|
||||
|
||||
public class UnimplementedException extends RuntimeException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6040968020696349497L;
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
package eu.dnetlib.data.information.collectionservice.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
/**
|
||||
* The Collection Service is used to ...
|
||||
*/
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface CollectionService extends BaseService {
|
||||
|
||||
String getCollection(@WebParam(name = "collId")
|
||||
final String collId) throws CollectionServiceException;
|
||||
|
||||
List<String> getCollections(@WebParam(name = "collIds")
|
||||
final List<String> collIds) throws CollectionServiceException;
|
||||
|
||||
void updateCollection(@WebParam(name = "coll")
|
||||
final String coll) throws CollectionServiceException;
|
||||
|
||||
void deleteCollection(@WebParam(name = "collId")
|
||||
final String collId) throws CollectionServiceException;
|
||||
|
||||
String createCollection(@WebParam(name = "coll")
|
||||
final String coll) throws CollectionServiceException;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
package eu.dnetlib.data.information.collectionservice.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.RMIException;
|
||||
import jakarta.xml.ws.WebFault;
|
||||
|
||||
@WebFault
|
||||
public class CollectionServiceException extends RMIException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8094008463553904905L;
|
||||
|
||||
public CollectionServiceException(Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public CollectionServiceException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
}
|
||||
|
||||
public CollectionServiceException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
|
||||
package eu.dnetlib.data.information.publisher.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebMethod;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
import jakarta.xml.ws.wsaddressing.W3CEndpointReference;
|
||||
|
||||
/**
|
||||
* Publisher service. Provides access to metadata records and objects.
|
||||
*
|
||||
* @author marko
|
||||
*/
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface PublisherService extends BaseService {
|
||||
|
||||
/**
|
||||
* Get a (metadata) resource by ID.
|
||||
*
|
||||
* @param id
|
||||
* @param format
|
||||
* @param layout
|
||||
* @param interpretation
|
||||
* @return
|
||||
*/
|
||||
@WebMethod
|
||||
String getResourceById(@WebParam(name = "id")
|
||||
final String id,
|
||||
@WebParam(name = "format")
|
||||
final String format,
|
||||
@WebParam(name = "layout")
|
||||
final String layout,
|
||||
@WebParam(name = "interpretation")
|
||||
final String interpretation);
|
||||
|
||||
/**
|
||||
* Get (metadata) resources by IDs.
|
||||
*
|
||||
* @param ids
|
||||
* @param format
|
||||
* @param layout
|
||||
* @param interpretation
|
||||
* @return
|
||||
*/
|
||||
@WebMethod
|
||||
W3CEndpointReference getResourcesByIds(@WebParam(name = "ids")
|
||||
final List<String> ids,
|
||||
@WebParam(name = "format")
|
||||
final String format,
|
||||
@WebParam(name = "layout")
|
||||
final String layout,
|
||||
@WebParam(name = "interpretation")
|
||||
final String interpretation);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
package eu.dnetlib.data.mdstore;
|
||||
|
||||
/**
|
||||
* Signals that a metadata record cannot be found in a given MDStore.
|
||||
*/
|
||||
public class DocumentNotFoundException extends MDStoreServiceException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 5188036989114250548L;
|
||||
|
||||
public DocumentNotFoundException(final String s, final Throwable e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
public DocumentNotFoundException(final String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public DocumentNotFoundException(final Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public DocumentNotFoundException() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
|
||||
package eu.dnetlib.data.mdstore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebMethod;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
import jakarta.xml.ws.wsaddressing.W3CEndpointReference;
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface MDStoreService extends BaseService {
|
||||
|
||||
/**
|
||||
* Identifies service and version.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
String identify();
|
||||
|
||||
/**
|
||||
* Returns ResultSet EPR for delivered mdstore records.
|
||||
*
|
||||
* @param mdId
|
||||
* @param from
|
||||
* @param until
|
||||
* @param recordFilter REGEX on the metadata record
|
||||
* @return ResultSet EPR
|
||||
* @throws MDStoreServiceException
|
||||
*/
|
||||
W3CEndpointReference deliverMDRecords(@WebParam(name = "mdId")
|
||||
final String mdId,
|
||||
@WebParam(name = "from")
|
||||
final String from,
|
||||
@WebParam(name = "until")
|
||||
final String until,
|
||||
@WebParam(name = "recordsFilter")
|
||||
final String recordFilter) throws MDStoreServiceException;
|
||||
|
||||
/**
|
||||
* Deliver single record from selected mdstore.
|
||||
*
|
||||
* @param mdId
|
||||
* @param recordId
|
||||
* @return record
|
||||
* @throws MDStoreServiceException
|
||||
*/
|
||||
String deliverRecord(@WebParam(name = "mdId")
|
||||
final String mdId, @WebParam(name = "recordId")
|
||||
final String recordId) throws MDStoreServiceException;
|
||||
|
||||
/**
|
||||
* Returns list of all stored indices.
|
||||
*
|
||||
* @return list of all stored indices
|
||||
*/
|
||||
List<String> getListOfMDStores() throws MDStoreServiceException;
|
||||
|
||||
List<String> listMDStores(@WebParam(name = "format")
|
||||
final String format,
|
||||
@WebParam(name = "layout")
|
||||
final String layout,
|
||||
@WebParam(name = "interpretation")
|
||||
final String interpretation) throws MDStoreServiceException;
|
||||
|
||||
W3CEndpointReference bulkDeliverMDRecords(@WebParam(name = "format")
|
||||
final String format,
|
||||
@WebParam(name = "layout")
|
||||
final String layout,
|
||||
@WebParam(name = "interpretation")
|
||||
final String interpretation) throws MDStoreServiceException;
|
||||
|
||||
/**
|
||||
* Store md records from a result set
|
||||
*
|
||||
* @param mdId
|
||||
* @param rsId
|
||||
* @param storingType
|
||||
* @return returns true immediately.
|
||||
* @throws MDStoreServiceException
|
||||
*/
|
||||
@Deprecated
|
||||
boolean storeMDRecordsFromRS(@WebParam(name = "mdId")
|
||||
final String mdId,
|
||||
@WebParam(name = "rsId")
|
||||
final String rsId,
|
||||
@WebParam(name = "storingType")
|
||||
final String storingType) throws MDStoreServiceException;
|
||||
|
||||
/**
|
||||
* Gets the size of the mdstore with the given identifier.
|
||||
*
|
||||
* @param mdId identifier of an mdstore
|
||||
* @return the number of records in the store
|
||||
*/
|
||||
@WebMethod(operationName = "size")
|
||||
int size(@WebParam(name = "mdId")
|
||||
final String mdId) throws MDStoreServiceException;
|
||||
|
||||
/**
|
||||
* Gets the sum of records stored in all mdstore with the given format, layout , interpretation
|
||||
*
|
||||
* @param format format
|
||||
* @param layout layout
|
||||
* @param interpretation interpretation
|
||||
* @return the total number of records in the mdstores of the given type
|
||||
*/
|
||||
@WebMethod(operationName = "sizeByFormat")
|
||||
int size(@WebParam(name = "format")
|
||||
final String format,
|
||||
@WebParam(name = "layout")
|
||||
final String layout,
|
||||
@WebParam(name = "interpretation")
|
||||
final String interpretation) throws MDStoreServiceException;
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
package eu.dnetlib.data.mdstore;
|
||||
|
||||
/**
|
||||
* General mdstore service exception.
|
||||
*
|
||||
* @author claudio atzori
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class MDStoreServiceException extends Exception {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -6772977735282310658L;
|
||||
|
||||
public MDStoreServiceException(String s, Throwable e) {
|
||||
super(s, e);
|
||||
}
|
||||
|
||||
public MDStoreServiceException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public MDStoreServiceException(Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public MDStoreServiceException() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
package eu.dnetlib.data.utility.objectpackaging.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.RMIException;
|
||||
import jakarta.xml.ws.WebFault;
|
||||
|
||||
@WebFault
|
||||
public class ObjectPackagingException extends RMIException {
|
||||
|
||||
private static final long serialVersionUID = 3468254939586031822L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
public ObjectPackagingException(Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public ObjectPackagingException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
}
|
||||
|
||||
public ObjectPackagingException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
package eu.dnetlib.data.utility.objectpackaging.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
import jakarta.xml.ws.wsaddressing.W3CEndpointReference;
|
||||
|
||||
/**
|
||||
* The Object Packaging Service is used to combine the records spread
|
||||
* into one information package, namely an Object Record.
|
||||
*/
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface ObjectPackagingService extends BaseService {
|
||||
/**
|
||||
* Return the EPR of the resultSet containing the generated packages
|
||||
*
|
||||
* @param eprs A list of EPRs used to access the input resultSets. ResultSets MUST be ordered using an order key identified by xpath_ID
|
||||
* @param xpath_ID A valid xpath, used to access the ordered ID of the elements of the input resultSets.
|
||||
* @return EPR of the generated resultset
|
||||
*/
|
||||
W3CEndpointReference generatePackages(@WebParam(name = "eprs") List<W3CEndpointReference> eprs,
|
||||
@WebParam(name = "xpath_ID") String xpath_ID) throws ObjectPackagingException;
|
||||
|
||||
/**
|
||||
* Return the EPR of the resultSet containing the unpackaged element
|
||||
*
|
||||
* @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>
|
||||
* @return EPR of the generated resultset
|
||||
*/
|
||||
W3CEndpointReference splitPackages(@WebParam(name = "epr") W3CEndpointReference epr)
|
||||
throws ObjectPackagingException;
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
package eu.dnetlib.enabling.dlm.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
/**
|
||||
* Distributed lock manager. Currently is used mostly to start the underlying lock manager (e.g. zookeeper) and let
|
||||
* client interface directly with it.
|
||||
*
|
||||
* <p>The DLM service profile contains the entry point of the underlying locking service.</p>
|
||||
*
|
||||
* @author marko
|
||||
*/
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface DlmService extends BaseService {
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
package eu.dnetlib.enabling.hcm.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
/**
|
||||
* Like a HostingNodeManager, but any webapp (web context) can have its own.
|
||||
* <p>
|
||||
* useful for dispatching notifications shared by all the services local to a single context.
|
||||
* </p>
|
||||
*
|
||||
* @author marko
|
||||
* @author antonis
|
||||
*/
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface HostingContextManagerService extends BaseService {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
package eu.dnetlib.enabling.hnm.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
/**
|
||||
* The HostingNodeManager Service is used to ...
|
||||
*/
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface HostingNodeManagerService extends BaseService {
|
||||
String echo(@WebParam(name = "s") String s);
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.lookup.rmi;
|
||||
|
||||
import jakarta.xml.ws.WebFault;
|
||||
|
||||
/**
|
||||
* Thrown when a given document is not found.
|
||||
*
|
||||
* @author marko
|
||||
*/
|
||||
@WebFault
|
||||
public class ISLookUpDocumentNotFoundException extends ISLookUpException {
|
||||
|
||||
/**
|
||||
* exception chain + message.
|
||||
*
|
||||
* @param message message
|
||||
* @param e
|
||||
*/
|
||||
public ISLookUpDocumentNotFoundException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
}
|
||||
|
||||
/**
|
||||
* exception chain constructor.
|
||||
*
|
||||
* @param e
|
||||
*/
|
||||
public ISLookUpDocumentNotFoundException(Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* exception message.
|
||||
*
|
||||
* @param message
|
||||
*/
|
||||
public ISLookUpDocumentNotFoundException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2295995755165801937L;
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.lookup.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.RMIException;
|
||||
import jakarta.xml.ws.WebFault;
|
||||
|
||||
@WebFault
|
||||
public class ISLookUpException extends RMIException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5626136963653382533L;
|
||||
|
||||
public ISLookUpException(Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public ISLookUpException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
}
|
||||
|
||||
public ISLookUpException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.lookup.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface ISLookUpService extends BaseService {
|
||||
|
||||
Boolean flushCachedResultSets();
|
||||
|
||||
@Deprecated
|
||||
String getCollection(@WebParam(name = "profId") String profId, @WebParam(name = "format") String format)
|
||||
throws ISLookUpException;
|
||||
|
||||
String retrieveCollection(@WebParam(name = "profId") String profId) throws ISLookUpException;
|
||||
|
||||
String getResourceProfile(@WebParam(name = "profId") String profId)
|
||||
throws ISLookUpException;
|
||||
|
||||
String getResourceProfileByQuery(@WebParam(name = "XQuery") String XQuery)
|
||||
throws ISLookUpException;
|
||||
|
||||
String getResourceQoSParams(@WebParam(name = "id") String id) throws ISLookUpException;
|
||||
|
||||
String getResourceTypeSchema(@WebParam(name = "resourceType") String resourceType)
|
||||
throws ISLookUpException;
|
||||
|
||||
List<String> listCollections(
|
||||
@WebParam(name = "format") String format,
|
||||
@WebParam(name = "idfather") String idfather,
|
||||
@WebParam(name = "owner") String owner) throws ISLookUpException;
|
||||
|
||||
@Deprecated
|
||||
List<String> listDHNIDs() throws ISLookUpException;
|
||||
|
||||
List<String> listResourceTypes() throws ISLookUpException;
|
||||
|
||||
@Deprecated
|
||||
List<String> listServiceIDs(@WebParam(name = "serviceType") String serviceType) throws ISLookUpException;
|
||||
|
||||
@Deprecated
|
||||
List<String> listServiceTypes() throws ISLookUpException;
|
||||
|
||||
/**
|
||||
* Like searchProfile(), but bypassing the resultset. Useful for short xquery results.
|
||||
*
|
||||
* @param xquery xquery to be executed
|
||||
* @return list of strings (never null)
|
||||
* @throws ISLookUpException could happen
|
||||
*/
|
||||
List<String> quickSearchProfile(@WebParam(name = "XQuery") String xquery) throws ISLookUpException;
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.registry;
|
||||
|
||||
import eu.dnetlib.enabling.is.registry.rmi.ISRegistryException;
|
||||
|
||||
public class ISRegistryDocumentNotFoundException extends ISRegistryException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1304948213334188538L;
|
||||
|
||||
public ISRegistryDocumentNotFoundException(String string, Throwable e) {
|
||||
super(string, e);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public ISRegistryDocumentNotFoundException(String string) {
|
||||
super(string);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public ISRegistryDocumentNotFoundException(Throwable e) {
|
||||
super(e);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.registry.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.RMIException;
|
||||
|
||||
public class ISRegistryException extends RMIException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3347405941287624771L;
|
||||
|
||||
public ISRegistryException(Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public ISRegistryException(String string) {
|
||||
super(string);
|
||||
}
|
||||
|
||||
public ISRegistryException(String string, Throwable e) {
|
||||
super(string, e);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.registry.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface ISRegistryService extends BaseService {
|
||||
|
||||
boolean addOrUpdateResourceType(String resourceType, String resourceSchema) throws ISRegistryException;
|
||||
|
||||
boolean addResourceType(String resourceType, String resourceSchema) throws ISRegistryException;
|
||||
|
||||
boolean deleteProfile(String profId) throws ISRegistryException;
|
||||
|
||||
@Deprecated
|
||||
boolean deleteProfiles(List<String> arrayprofId) throws ISRegistryException;
|
||||
|
||||
/**
|
||||
* @param resourceType
|
||||
* @param hierarchical remove subscription topics
|
||||
* @return
|
||||
* @throws ISRegistryException
|
||||
*/
|
||||
boolean deleteResourceType(String resourceType, Boolean hierarchical) throws ISRegistryException;
|
||||
|
||||
boolean executeXUpdate(String XQuery) throws ISRegistryException;
|
||||
|
||||
String insertProfileForValidation(String resourceType, String resourceProfile) throws ISRegistryException;
|
||||
|
||||
String invalidateProfile(String profId) throws ISRegistryException;
|
||||
|
||||
boolean refreshProfile(String profId, String resourceType) throws ISRegistryException;
|
||||
|
||||
/**
|
||||
* register a XML Profile.
|
||||
*
|
||||
* @param resourceProfile xml profile
|
||||
* @return profile id
|
||||
* @throws ISRegistryException
|
||||
*/
|
||||
String registerProfile(String resourceProfile) throws ISRegistryException;
|
||||
|
||||
String registerSecureProfile(String resourceProfId, String secureProfId) throws ISRegistryException;
|
||||
|
||||
boolean updateProfile(String profId, String resourceProfile, String resourceType) throws ISRegistryException;
|
||||
|
||||
@Deprecated
|
||||
String updateProfileDHN(String resourceProfile) throws ISRegistryException;
|
||||
|
||||
boolean addProfileNode(String profId, String xpath, String node) throws ISRegistryException;
|
||||
|
||||
boolean updateProfileNode(String profId, String xpath, String node) throws ISRegistryException;
|
||||
|
||||
boolean removeProfileNode(String profId, String nodeId) throws ISRegistryException;
|
||||
|
||||
@Deprecated
|
||||
boolean updateRegionDescription(String profId, String resourceProfile) throws ISRegistryException;
|
||||
|
||||
String validateProfile(String profId) throws ISRegistryException;
|
||||
|
||||
@Deprecated
|
||||
List<String> validateProfiles(List<String> profIds) throws ISRegistryException;
|
||||
|
||||
void addBlackBoardMessage(String profId, String messageId, String message) throws ISRegistryException;
|
||||
|
||||
void replyBlackBoardMessage(String profId, String message) throws ISRegistryException;
|
||||
|
||||
void deleteBlackBoardMessage(String profId, String messageId) throws ISRegistryException;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.sn.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.RMIException;
|
||||
|
||||
public class ISSNException extends RMIException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7384073901457430004L;
|
||||
|
||||
public ISSNException(final Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public ISSNException(final String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public ISSNException(final String message, final Throwable e) {
|
||||
super(message, e);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.sn.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
import jakarta.xml.ws.wsaddressing.W3CEndpointReference;
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface ISSNService extends BaseService {
|
||||
|
||||
/**
|
||||
* fossil.
|
||||
*
|
||||
* @param topic
|
||||
* @return
|
||||
* @throws ISSNException
|
||||
*/
|
||||
String getCurrentMessage(@WebParam(name = "topic") String topic) throws ISSNException;
|
||||
|
||||
/**
|
||||
* puts a subcription in a paused state. paused subscription are not notified even when triggered.
|
||||
*
|
||||
* @param subscrId subscription identifier
|
||||
* @return returns false if the subscription is already paused.
|
||||
* @throws ISSNException may happen
|
||||
*/
|
||||
boolean pauseSubscription(@WebParam(name = "subscrId") String subscrId) throws ISSNException;
|
||||
|
||||
/**
|
||||
* Used to renew the subscription before it expires.
|
||||
*
|
||||
* <p>
|
||||
* In practice it resets the ttl to another value, so it can be used to reset a infinte ttl subscription to a finite
|
||||
* value.
|
||||
* </p>
|
||||
*
|
||||
* @param subscrId subscription id
|
||||
* @param terminationTime new ttl (from now), or 0 (infinite)
|
||||
* @return true if successful
|
||||
* @throws ISSNException may happen
|
||||
*/
|
||||
boolean renew(@WebParam(name = "subscrId") String subscrId, @WebParam(name = "terminationTime") int terminationTime)
|
||||
throws ISSNException;
|
||||
|
||||
/**
|
||||
* resumes a paused subscription.
|
||||
*
|
||||
* @param subscrId subscription id
|
||||
* @return true if resumed. false if it was not paused.
|
||||
* @throws ISSNException may happen
|
||||
*/
|
||||
boolean resumeSubscription(@WebParam(name = "subscrId") String subscrId) throws ISSNException;
|
||||
|
||||
/**
|
||||
* @param consumerReference epr to be called when the notification is triggered
|
||||
* @param topicExpression topic expression to register
|
||||
* @param initialTerminationTime ttl in seconds (0 = infinite)
|
||||
* @return subscription id
|
||||
* @throws ISSNException may happen
|
||||
*/
|
||||
String subscribe(
|
||||
@WebParam(name = "consumerReference") W3CEndpointReference consumerReference,
|
||||
@WebParam(name = "topicExpression") String topicExpression,
|
||||
@WebParam(name = "initialTerminationTime") int initialTerminationTime)
|
||||
throws ISSNException;
|
||||
|
||||
boolean unsubscribe(@WebParam(name = "subscrId") String subscrId) throws ISSNException;
|
||||
|
||||
/**
|
||||
* fossil.
|
||||
*
|
||||
* @param resourceType
|
||||
* @param profileId
|
||||
* @param profile
|
||||
* @return
|
||||
* @throws ISSNException
|
||||
*/
|
||||
boolean actionCreatePerformed(
|
||||
@WebParam(name = "resourceType") String resourceType,
|
||||
@WebParam(name = "profileId") String profileId,
|
||||
@WebParam(name = "profile") String profile) throws ISSNException;
|
||||
|
||||
/**
|
||||
* fossil.
|
||||
*
|
||||
* @param resourceType
|
||||
* @param profileId
|
||||
* @param profileBefore
|
||||
* @param profileAfter
|
||||
* @return
|
||||
* @throws ISSNException
|
||||
*/
|
||||
boolean actionUpdatePerformed(
|
||||
@WebParam(name = "resourceType") String resourceType,
|
||||
@WebParam(name = "profileId") String profileId,
|
||||
@WebParam(name = "profileBefore") String profileBefore,
|
||||
@WebParam(name = "profileAfter") String profileAfter) throws ISSNException;
|
||||
|
||||
/**
|
||||
* fossil.
|
||||
*
|
||||
* @param resourceType
|
||||
* @param profileId
|
||||
* @return
|
||||
* @throws ISSNException
|
||||
*/
|
||||
boolean actionDeletePerformed(@WebParam(name = "resourceType") String resourceType,
|
||||
@WebParam(name = "profileId") String profileId)
|
||||
throws ISSNException;
|
||||
|
||||
/**
|
||||
* list all subscriptions. Mostly for debug reasons.
|
||||
*
|
||||
* @return list of subscription ids.
|
||||
*/
|
||||
List<String> listSubscriptions();
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.sn.rmi;
|
||||
|
||||
/**
|
||||
* Thrown when a subscription request is rejected.
|
||||
*
|
||||
* @author claudio
|
||||
*/
|
||||
public class SubscriptionRequestRejectedException extends ISSNException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 263095606953662098L;
|
||||
|
||||
public SubscriptionRequestRejectedException(String message) {
|
||||
super(message);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.store.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.RMIException;
|
||||
|
||||
public class ISStoreException extends RMIException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8683126829156096420L;
|
||||
|
||||
public ISStoreException(Throwable e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
public ISStoreException(String message, Throwable e) {
|
||||
super(message, e);
|
||||
}
|
||||
|
||||
public ISStoreException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
package eu.dnetlib.enabling.is.store.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface ISStoreService extends BaseService {
|
||||
|
||||
boolean createFileColl(@WebParam(name = "fileColl") String fileColl) throws ISStoreException;
|
||||
|
||||
boolean deleteFileColl(@WebParam(name = "fileColl") String fileColl) throws ISStoreException;
|
||||
|
||||
boolean deleteXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl)
|
||||
throws ISStoreException;
|
||||
|
||||
boolean executeXUpdate(@WebParam(name = "query") String query) throws ISStoreException;
|
||||
|
||||
List<String> getFileColls() throws ISStoreException;
|
||||
|
||||
List<String> getFileNames(@WebParam(name = "fileColl") String fileColl) throws ISStoreException;
|
||||
|
||||
String getXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl)
|
||||
throws ISStoreException;
|
||||
|
||||
String getXMLbyQuery(@WebParam(name = "query") String query) throws ISStoreException;
|
||||
|
||||
boolean insertXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl,
|
||||
@WebParam(name = "file") String file)
|
||||
throws ISStoreException;
|
||||
|
||||
boolean reindex();
|
||||
|
||||
List<String> quickSearchXML(@WebParam(name = "query") String query) throws ISStoreException;
|
||||
|
||||
boolean sync();
|
||||
|
||||
boolean updateXML(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileColl") String fileColl,
|
||||
@WebParam(name = "file") String file)
|
||||
throws ISStoreException;
|
||||
|
||||
String backup() throws ISStoreException;
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
package eu.dnetlib.enabling.resultset.rmi;
|
||||
|
||||
import eu.dnetlib.common.rmi.RMIException;
|
||||
|
||||
public class ResultSetException extends RMIException {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7130554407601059627L;
|
||||
|
||||
public ResultSetException(Throwable e) {
|
||||
super(e);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public ResultSetException(String string) {
|
||||
super(string);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
|
||||
package eu.dnetlib.enabling.resultset.rmi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.dnetlib.common.rmi.BaseService;
|
||||
import jakarta.jws.WebMethod;
|
||||
import jakarta.jws.WebParam;
|
||||
import jakarta.jws.WebService;
|
||||
import jakarta.xml.ws.wsaddressing.W3CEndpointReference;
|
||||
|
||||
/**
|
||||
* ResultSet service interface.
|
||||
* <p>
|
||||
* TODO: implement other compatibility methods as needed.
|
||||
*
|
||||
* @author marko
|
||||
*/
|
||||
@WebService(targetNamespace = "http://services.dnetlib.eu/")
|
||||
public interface ResultSetService extends BaseService {
|
||||
/**
|
||||
* create a new pull rs.
|
||||
*
|
||||
* @param bdId bulk data identifier
|
||||
* @param initialPageSize page size for the polling on the server side.
|
||||
* @param expiryTime RS expiry time
|
||||
* @return
|
||||
*/
|
||||
W3CEndpointReference createPullRSEPR(
|
||||
@WebParam(name = "dataProviderServiceAddress") W3CEndpointReference dataProviderEPR,
|
||||
@WebParam(name = "bdId") String bdId,
|
||||
@WebParam(name = "initialPageSize") int initialPageSize,
|
||||
@WebParam(name = "expiryTime") int expiryTime,
|
||||
@WebParam(name = "styleSheet") String styleSheet,
|
||||
@WebParam(name = "keepAliveTime") Integer keepAliveTime,
|
||||
@WebParam(name = "total") Integer total);
|
||||
|
||||
/**
|
||||
* create a new pull rs.
|
||||
* <p>
|
||||
* compatibility version
|
||||
*
|
||||
* @param bdId bulk data identifier
|
||||
* @param initialPageSize page size for the polling on the server side.
|
||||
* @param expiryTime RS expiry time
|
||||
* @return
|
||||
*/
|
||||
W3CEndpointReference createPullRS(
|
||||
@WebParam(name = "dataProviderServiceAddress") String dataProviderServiceAddress,
|
||||
@WebParam(name = "bdId") String bdId,
|
||||
@WebParam(name = "initialPageSize") int initialPageSize,
|
||||
@WebParam(name = "expiryTime") int expiryTime,
|
||||
@WebParam(name = "styleSheet") String styleSheet,
|
||||
@WebParam(name = "keepAliveTime") Integer keepAliveTime,
|
||||
@WebParam(name = "total") Integer total);
|
||||
|
||||
/**
|
||||
* close a result set. A closed resultset is guaranteed not to grow.
|
||||
*
|
||||
* @param rsId
|
||||
*/
|
||||
void closeRS(@WebParam(name = "rsId") String rsId);
|
||||
|
||||
/**
|
||||
* get one 'page' of results.
|
||||
* <p>
|
||||
* TODO: define how results are returned when the range is not present in the result set.
|
||||
*
|
||||
* @param fromPosition counting from 1
|
||||
* @param toPosition included
|
||||
* @param requestMode
|
||||
* @return a page of data
|
||||
*/
|
||||
List<String> getResult(
|
||||
@WebParam(name = "rsId") String rsId,
|
||||
@WebParam(name = "fromPosition") int fromPosition,
|
||||
@WebParam(name = "toPosition") int toPosition,
|
||||
@WebParam(name = "requestMode") String requestMode) throws ResultSetException;
|
||||
|
||||
/**
|
||||
* get the number of result elements present in the resultset.
|
||||
*
|
||||
* @param rsId result set identifier
|
||||
* @return number of results available in the resultset
|
||||
* @throws ResultSetException
|
||||
*/
|
||||
int getNumberOfElements(@WebParam(name = "rsId") String rsId) throws ResultSetException;
|
||||
|
||||
/**
|
||||
* create a new push resultset.
|
||||
*
|
||||
* @param expiryTime RS expiry time
|
||||
* @param keepAliveTime keep alive time
|
||||
* @return epr of new resultset
|
||||
* @throws ResultSetException
|
||||
*/
|
||||
W3CEndpointReference createPushRS(@WebParam(name = "expiryTime") int expiryTime,
|
||||
@WebParam(name = "keepAliveTime") int keepAliveTime)
|
||||
throws ResultSetException;
|
||||
|
||||
/**
|
||||
* add new data to a push resultset.
|
||||
*
|
||||
* @param rsId resultset id
|
||||
* @param elements list of elements to be addded
|
||||
* @return dummy value
|
||||
* @throws ResultSetException
|
||||
*/
|
||||
String populateRS(@WebParam(name = "rsId") String rsId, @WebParam(name = "elements") List<String> elements)
|
||||
throws ResultSetException;
|
||||
|
||||
/**
|
||||
* return current status of a resultset.
|
||||
*
|
||||
* @param rsId resultset id
|
||||
* @return status
|
||||
* @throws ResultSetException
|
||||
*/
|
||||
String getRSStatus(@WebParam(name = "rsId") String rsId) throws ResultSetException;
|
||||
|
||||
/**
|
||||
* read a resultset property.
|
||||
*
|
||||
* @param rsId resultset id
|
||||
* @param name property value
|
||||
* @return property value
|
||||
* @throws ResultSetException
|
||||
*/
|
||||
String getProperty(@WebParam(name = "rsId") String rsId, @WebParam(name = "name") String name)
|
||||
throws ResultSetException;
|
||||
|
||||
@WebMethod(operationName = "identify")
|
||||
String identify();
|
||||
|
||||
}
|
Loading…
Reference in New Issue