refs 2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Updated to Liferay 6.2 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@129212 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
032a574d84
commit
a2691a1552
51
pom.xml
51
pom.xml
|
@ -73,6 +73,11 @@
|
|||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xerces</artifactId>
|
||||
<version>2.4.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Storage -->
|
||||
<dependency>
|
||||
|
@ -135,9 +140,6 @@
|
|||
<version>${gwtVersion}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- GXT 2 <dependency> <groupId>com.sencha.gxt</groupId> <artifactId>gxt2.2.5-gwt2.X</artifactId>
|
||||
<version>${gxt2Version}</version> </dependency> -->
|
||||
|
||||
|
||||
<!-- GXT 3 -->
|
||||
<dependency>
|
||||
|
@ -146,20 +148,19 @@
|
|||
<version>${gxtVersion}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency> <groupId>com.ibm.icu</groupId> <artifactId>icu4j</artifactId>
|
||||
<version>51.2</version> <scope>compile</scope> </dependency> <dependency>
|
||||
<groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.7.1</version>
|
||||
<scope>provided</scope> </dependency> <dependency> <groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-generic-clients</artifactId> <version>[1.0.0-SNAPSHOT,4.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope> </dependency> -->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.portlet</groupId>
|
||||
<artifactId>portlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- PORTAL -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>accesslogger</artifactId>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-scope-maps</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -167,12 +168,6 @@
|
|||
<artifactId>custom-portal-handler</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-scope-maps</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslcore</artifactId>
|
||||
|
@ -185,6 +180,11 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.dvos</groupId>
|
||||
<artifactId>usermanagement-core</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Authorization -->
|
||||
|
@ -200,7 +200,7 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- GCube Widget -->
|
||||
<!-- GCube Widgets -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>gcube-widgets</artifactId>
|
||||
|
@ -215,19 +215,6 @@
|
|||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslsocial</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- <dependency> <groupId>org.gcube.core</groupId> <artifactId>common-fw-clients</artifactId>
|
||||
<scope>provided</scope> </dependency> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Storage -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.contentmanagement</groupId>
|
||||
|
@ -365,7 +352,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>2.6.0-SNAPSHOT</version>
|
||||
<version>LATEST</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
|
|
@ -36,8 +36,8 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author Giancarlo Panichi
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author Giancarlo Panichi email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
|
@ -68,12 +68,14 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token = SessionUtil.getToken(aslSession);
|
||||
UserInfo userInfo = new UserInfo(aslSession.getUsername(),
|
||||
aslSession.getGroupId(), aslSession.getGroupName(),
|
||||
aslSession.getScope(), aslSession.getScopeName(),
|
||||
aslSession.getUserEmailAddress(),
|
||||
aslSession.getUserFullName());
|
||||
logger.debug("UserInfo: " + userInfo);
|
||||
logger.debug("UserToken: " + token);
|
||||
return userInfo;
|
||||
} catch (ServiceException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -94,8 +96,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
SClient smClient = SessionUtil.getSClient(aslSession);
|
||||
List<OperatorsClassification> list= smClient.getOperatorsClassifications();
|
||||
//SessionUtil.putSClient(session, smClient);
|
||||
List<OperatorsClassification> list = smClient
|
||||
.getOperatorsClassifications();
|
||||
return list;
|
||||
} catch (ServiceException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
|
@ -105,7 +107,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
"An error occurred getting the OperatorsClassifications list: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
e.printStackTrace();
|
||||
// return null;
|
||||
throw new ServiceException(e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +120,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
SClient smClient = SessionUtil.getSClient(aslSession);
|
||||
List<Parameter> list = smClient.getInputParameters(operator);
|
||||
//SessionUtil.putSClient(session, smClient);
|
||||
return list;
|
||||
} catch (ServiceException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
|
@ -141,7 +141,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
logger.debug("StartComputation(): [ operator=" + operator + "]");
|
||||
SClient smClient = SessionUtil.getSClient(aslSession);
|
||||
ComputationId computationId = smClient.startComputation(operator);
|
||||
//SessionUtil.putSClient(session, smClient);
|
||||
return computationId;
|
||||
} catch (ServiceException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
|
@ -160,13 +159,12 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
logger.debug("Resubmit(): " + itemDescription);
|
||||
Map<String, String> properties = StorageUtil.getProperties(
|
||||
aslSession.getUsername(), itemDescription.getId());
|
||||
logger.debug("Properties: " + properties);
|
||||
SClient smClient = SessionUtil.getSClient(aslSession);
|
||||
ComputationId computationId= smClient.resubmitComputation(properties);
|
||||
//SessionUtil.putSClient(session, smClient);
|
||||
ComputationId computationId = smClient
|
||||
.resubmitComputation(properties);
|
||||
return computationId;
|
||||
} catch (ServiceException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
|
@ -185,10 +183,9 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
|
||||
SClient smClient = SessionUtil.getSClient(aslSession);
|
||||
ComputationStatus computationStatus= smClient.getComputationStatus(computationId);
|
||||
//SessionUtil.putSClient(session, smClient);
|
||||
ComputationStatus computationStatus = smClient
|
||||
.getComputationStatus(computationId);
|
||||
return computationStatus;
|
||||
|
||||
} catch (ServiceException e) {
|
||||
|
@ -202,14 +199,14 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteItem(ItemDescription itemDescription)
|
||||
throws ServiceException {
|
||||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token = SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: " + token);
|
||||
logger.debug("DeleteItem(): " + itemDescription);
|
||||
StorageUtil.deleteItem(aslSession.getUsername(),
|
||||
itemDescription.getId());
|
||||
|
@ -231,6 +228,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token = SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: " + token);
|
||||
logger.debug("retrieveTableInformation(): " + item);
|
||||
TableReader tableReader = new TableReader(aslSession, item);
|
||||
TableItemSimple tableItemSimple = tableReader.getTableItemSimple();
|
||||
|
@ -250,6 +249,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token = SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: " + token);
|
||||
logger.debug("getDataMinerWorkArea()");
|
||||
DataMinerWorkAreaManager dataMinerWorkAreaManager = new DataMinerWorkAreaManager(
|
||||
aslSession);
|
||||
|
@ -271,6 +272,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
String token = SessionUtil.getToken(aslSession);
|
||||
logger.debug("UserToken: " + token);
|
||||
logger.debug("GetPublicLink(): " + itemDescription);
|
||||
String link = StorageUtil.getPublicLink(aslSession.getUsername(),
|
||||
itemDescription.getId());
|
||||
|
@ -314,11 +317,9 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
Log.debug("getOutputDataByComputationId: " + computationId);
|
||||
HttpSession session = this.getThreadLocalRequest().getSession();
|
||||
ASLSession aslSession = SessionUtil.getASLSession(session);
|
||||
|
||||
SClient smClient = SessionUtil.getSClient(aslSession);
|
||||
OutputData outputData = smClient
|
||||
.getOutputDataByComputationId(computationId);
|
||||
//SessionUtil.putSClient(session, smClient);
|
||||
Log.debug("OutputData: " + outputData);
|
||||
return outputData;
|
||||
} catch (ServiceException e) {
|
||||
|
@ -333,7 +334,6 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ComputationData getComputationData(ItemDescription itemDescription)
|
||||
throws ServiceException {
|
||||
|
@ -345,11 +345,10 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
aslSession.getUsername(), itemDescription.getId());
|
||||
logger.debug("Properties: " + properties);
|
||||
SClient smClient = SessionUtil.getSClient(aslSession);
|
||||
ComputationData computationData= smClient.getComputationDataByComputationProperties(properties);
|
||||
//SessionUtil.putSClient(session, smClient);
|
||||
ComputationData computationData = smClient
|
||||
.getComputationDataByComputationProperties(properties);
|
||||
return computationData;
|
||||
|
||||
|
||||
} catch (ServiceException e) {
|
||||
logger.error(e.getLocalizedMessage());
|
||||
throw e;
|
||||
|
@ -374,7 +373,8 @@ public class DataMinerManagerServiceImpl extends RemoteServiceServlet implements
|
|||
} else {
|
||||
int lastIndexUnd = compId.lastIndexOf("_");
|
||||
if (lastIndexUnd == -1) {
|
||||
throw new ServiceException("Invalid Computation Id: "+compId);
|
||||
throw new ServiceException("Invalid Computation Id: "
|
||||
+ compId);
|
||||
} else {
|
||||
compId = compId.substring(lastIndexUnd + 1);
|
||||
}
|
||||
|
|
|
@ -16,10 +16,8 @@ public class Constants {
|
|||
public static final String DATA_MINER_LANG = "DataMinerLang";
|
||||
|
||||
public static final String DEFAULT_USER = "giancarlo.panichi";
|
||||
//public static final String DEFAULT_USER = "statistical.manager@gmail.com";
|
||||
public static final String DEFAULT_ROLE = "OrganizationMember";
|
||||
public static final String DEFAULT_SCOPE = "/gcube/devsec/devVRE";
|
||||
// public final static String DEFAULT_USER = "test.user";
|
||||
// public final static String DEFAULT_SCOPE = "/gcube/devNext";
|
||||
// public final static String DEFAULT_SCOPE = "/gcube/devNext/NextNext";
|
||||
|
||||
|
@ -46,15 +44,9 @@ public class Constants {
|
|||
public static final String WPSCancelComputationServlet = "CancelComputationServlet";
|
||||
public static final String WPSToken = "f0666597-4302-49ce-bea2-555b94e569cb";
|
||||
public static final String WPSUser = "giancarlo.panichi";
|
||||
|
||||
|
||||
|
||||
|
||||
/*public static final String WPSToken = "4ccc2c35-60c9-4c9b-9800-616538d5d48b";
|
||||
public static final String WPSUser = "gianpaolo.coro";*/
|
||||
|
||||
//public static final String WPSToken = "45943442-74ef-408b-be64-d26b42cf4c08 ";
|
||||
//public static final String WPSUser = "statistical.manager@gmail.com";
|
||||
|
||||
//DownloadFolderServlet
|
||||
public static final String DOWNLOAD_FOLDER_SERVLET= "DownloadFolderServlet";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 5.2.0//EN" "http://www.liferay.com/dtd/liferay-display_5_2_0.dtd">
|
||||
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.2.0//EN"
|
||||
"http://www.liferay.com/dtd/liferay-display_6_2_0.dtd">
|
||||
|
||||
<display>
|
||||
<category name="gCube Applications">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 5.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_5_2_0.dtd">
|
||||
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN"
|
||||
"http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd">
|
||||
|
||||
<liferay-portlet-app>
|
||||
<portlet>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
|
||||
<servlet>
|
||||
<servlet-name>DataMinerManagerServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.dataminermanager.server.DataMinerManagerServiceImpl</servlet-class>
|
||||
|
|
Loading…
Reference in New Issue