Updated to DataMiner service

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@133853 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-11-03 11:31:43 +00:00
parent a00fc87c91
commit f2757b816d
17 changed files with 1119 additions and 1128 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/databases-manager-portlet-1.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/databases-manager-portlet-1.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -25,5 +25,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/databases-manager-portlet-1.5.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/databases-manager-portlet-1.6.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -4,6 +4,9 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="data-miner-manager-cl-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/data-miner-manager-cl/data-miner-manager-cl">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/> <property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="databases-manager-portlet"/> <property name="context-root" value="databases-manager-portlet"/>
</wb-module> </wb-module>

View File

@ -1,4 +1,8 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset component="org.gcube.portlets.user.databases-manager-portlet.1-6-0"
date="2016-12-01">
<Change>Porting to DataMiner service</Change>
</Changeset>
<Changeset component="org.gcube.portlets.user.databases-manager-portlet.1-5-0" <Changeset component="org.gcube.portlets.user.databases-manager-portlet.1-5-0"
date="2016-10-01"> date="2016-10-01">
<Change>Updated dependencies</Change> <Change>Updated dependencies</Change>

71
pom.xml
View File

@ -15,14 +15,14 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>databases-manager-portlet</artifactId> <artifactId>databases-manager-portlet</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>1.5.0-SNAPSHOT</version> <version>1.6.0-SNAPSHOT</version>
<name>DatabasesResourceManagerPortlet</name> <name>DatabasesResourceManagerPortlet</name>
<description>Databases Resource Manager Portlet</description> <description>Databases Resource Manager Portlet</description>
<scm> <scm>
<url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet</url> <url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet</url>
</scm> </scm>
<developers> <developers>
<developer> <developer>
<name>Giancarlo Panichi</name> <name>Giancarlo Panichi</name>
@ -45,7 +45,7 @@
<gwtLogVersion>3.3.2</gwtLogVersion> <gwtLogVersion>3.3.2</gwtLogVersion>
<gxtVersion>3.1.1</gxtVersion> <gxtVersion>3.1.1</gxtVersion>
<gxt2Version>2.6.1</gxt2Version> <gxt2Version>2.6.1</gxt2Version>
<KEYS>${env.KEYS}</KEYS> <KEYS>${env.KEYS}</KEYS>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -66,36 +66,23 @@
<artifactId>gwt-servlet</artifactId> <artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version> <version>${gwtVersion}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sencha.gxt</groupId> <groupId>com.sencha.gxt</groupId>
<artifactId>gxt2.2.5-gwt2.X</artifactId> <artifactId>gxt2.2.5-gwt2.X</artifactId>
<version>${gxt2Version}</version> <version>${gxt2Version}</version>
</dependency> </dependency>
<!-- <!-- <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId>
<dependency> <version>1.0.0.GA</version> <scope>test</scope> </dependency> <dependency>
<groupId>javax.validation</groupId> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId>
<artifactId>validation-api</artifactId> <version>1.0.0.GA</version> <classifier>sources</classifier> <scope>test</scope>
<version>1.0.0.GA</version> </dependency> -->
<scope>test</scope>
</dependency> <!-- <dependency> <groupId>org.gcube.core</groupId> <artifactId>common-scope</artifactId>
<dependency> </dependency> -->
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency> -->
<!--
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope</artifactId>
</dependency>
-->
<!-- Portlet --> <!-- Portlet -->
<dependency> <dependency>
<groupId>javax.portlet</groupId> <groupId>javax.portlet</groupId>
@ -147,7 +134,7 @@
<artifactId>gcube-widgets</artifactId> <artifactId>gcube-widgets</artifactId>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- Session Checker --> <!-- Session Checker -->
<dependency> <dependency>
<groupId>org.gcube.portlets.widgets</groupId> <groupId>org.gcube.portlets.widgets</groupId>
@ -169,18 +156,19 @@
</dependency> </dependency>
<!-- Statistical --> <!-- Statistical <dependency> <groupId>org.gcube.data.analysis</groupId>
<artifactId>statistical-manager-cl</artifactId> <version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
</dependency> <dependency> <groupId>org.gcube.core</groupId> <artifactId>common-fw-clients</artifactId>
</dependency> -->
<!-- data-miner-manager-cl -->
<dependency> <dependency>
<groupId>org.gcube.data.analysis</groupId> <groupId>data-miner-manager-cl</groupId>
<artifactId>statistical-manager-cl</artifactId> <artifactId>data-miner-manager-cl</artifactId>
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-fw-clients</artifactId>
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
</dependency>
<!-- Jakarta RegExp --> <!-- Jakarta RegExp -->
<dependency> <dependency>
@ -190,6 +178,8 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId>
<version>2.8.0</version> <scope>provided</scope> </dependency> -->
<dependency> <dependency>
<groupId>net.sf.ehcache</groupId> <groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId> <artifactId>ehcache</artifactId>
@ -197,6 +187,7 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Uri Resolver Manager --> <!-- Uri Resolver Manager -->
<dependency> <dependency>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
@ -226,7 +217,7 @@
<version>4.8.1</version> <version>4.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
@ -248,7 +239,7 @@
</repository> </repository>
</repositories> </repositories>
<build> <build>
<!-- Generate compiled stuff in the folder used for developing mode --> <!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory> <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

View File

@ -11,7 +11,7 @@ import com.google.gwt.user.client.ui.RootPanel;
import org.gcube.portlets.user.databasesmanager.client.panels.GxtBorderLayoutPanel; import org.gcube.portlets.user.databasesmanager.client.panels.GxtBorderLayoutPanel;
import org.gcube.portlets.user.databasesmanager.client.resources.Resources; import org.gcube.portlets.user.databasesmanager.client.resources.Resources;
import org.gcube.portlets.user.databasesmanager.shared.ConstantsPortlet; import org.gcube.portlets.user.databasesmanager.shared.Constants;
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession; import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
/** /**
@ -49,7 +49,7 @@ public class DatabasesManager implements EntryPoint {
try { try {
borderLayout = new GxtBorderLayoutPanel(eventBus, service); borderLayout = new GxtBorderLayoutPanel(eventBus, service);
RootPanel.get(ConstantsPortlet.CONTENTDIV).add(borderLayout); RootPanel.get(Constants.CONTENTDIV).add(borderLayout);
Window.addResizeHandler(new ResizeHandler() { Window.addResizeHandler(new ResizeHandler() {
@Override @Override
@ -76,7 +76,7 @@ public class DatabasesManager implements EntryPoint {
*/ */
public void updateSize() { public void updateSize() {
RootPanel rootPanel = RootPanel.get(ConstantsPortlet.CONTENTDIV); RootPanel rootPanel = RootPanel.get(Constants.CONTENTDIV);
int topBorder = rootPanel.getAbsoluteTop(); int topBorder = rootPanel.getAbsoluteTop();

View File

@ -11,15 +11,17 @@ public class Parameter implements Serializable {
private String objectType; private String objectType;
private String defaultValue; private String defaultValue;
public Parameter(String paramName, String paramDescription, public Parameter(String name, String paramDescription,
String objectType, String defaultValue) { String objectType, String defaultValue) {
this.setName(paramName); super();
this.setParamDescription(paramDescription); this.name=name;
this.setObjectType(objectType); this.paramDescription=paramDescription;
this.setDefaultValue(defaultValue); this.objectType=objectType;
this.defaultValue=defaultValue;
} }
public Parameter() { public Parameter() {
super();
} }
public String getValue() { public String getValue() {
@ -61,4 +63,14 @@ public class Parameter implements Serializable {
public String getDefaultValue() { public String getDefaultValue() {
return defaultValue; return defaultValue;
} }
@Override
public String toString() {
return "Parameter [value=" + value + ", name=" + name
+ ", paramDescription=" + paramDescription + ", objectType="
+ objectType + ", defaultValue=" + defaultValue + "]";
}
} }

View File

@ -3,7 +3,7 @@ package org.gcube.portlets.user.databasesmanager.client.datamodel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.gcube.portlets.user.databasesmanager.shared.ConstantsPortlet; import org.gcube.portlets.user.databasesmanager.shared.Constants;
import com.extjs.gxt.ui.client.data.BaseModelData; import com.extjs.gxt.ui.client.data.BaseModelData;
@ -31,9 +31,9 @@ public class SQLDialect extends BaseModelData {
public static List<SQLDialect> loadData() { public static List<SQLDialect> loadData() {
List<SQLDialect> dialects = new ArrayList<SQLDialect>(); List<SQLDialect> dialects = new ArrayList<SQLDialect>();
SQLDialect element1 = new SQLDialect(ConstantsPortlet.NONE); SQLDialect element1 = new SQLDialect(Constants.NONE);
SQLDialect element2 = new SQLDialect(ConstantsPortlet.POSTGRES); SQLDialect element2 = new SQLDialect(Constants.POSTGRES);
SQLDialect element3 = new SQLDialect(ConstantsPortlet.MYSQL); SQLDialect element3 = new SQLDialect(Constants.MYSQL);
dialects.add(element1); dialects.add(element1);
dialects.add(element2); dialects.add(element2);

View File

@ -31,7 +31,7 @@ import org.gcube.portlets.user.databasesmanager.client.events.interfaces.SmartSa
import org.gcube.portlets.user.databasesmanager.client.events.interfaces.SubmitQueryEventHandler; import org.gcube.portlets.user.databasesmanager.client.events.interfaces.SubmitQueryEventHandler;
import org.gcube.portlets.user.databasesmanager.client.resources.Images; import org.gcube.portlets.user.databasesmanager.client.resources.Images;
import org.gcube.portlets.user.databasesmanager.client.toolbar.GxtToolbarFunctionality; import org.gcube.portlets.user.databasesmanager.client.toolbar.GxtToolbarFunctionality;
import org.gcube.portlets.user.databasesmanager.shared.ConstantsPortlet; import org.gcube.portlets.user.databasesmanager.shared.Constants;
import org.gcube.portlets.user.databasesmanager.shared.SessionExpiredException; import org.gcube.portlets.user.databasesmanager.shared.SessionExpiredException;
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession; import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
@ -363,7 +363,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
dataInput.put("ResourceName", resource); dataInput.put("ResourceName", resource);
dataInput.put("DatabaseName", database); dataInput.put("DatabaseName", database);
dataInput.put("SchemaName", ""); dataInput.put("SchemaName", "");
elementType = ConstantsPortlet.DATABASE; elementType = Constants.DATABASE;
} else { // the selected item is a schema } else { // the selected item is a schema
rootLogger.log(Level.INFO, "selected element is a schema "); rootLogger.log(Level.INFO, "selected element is a schema ");
FileModel db = treePanel.getTreeStore().getParent(element); FileModel db = treePanel.getTreeStore().getParent(element);
@ -374,7 +374,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
dataInput.put("ResourceName", resource); dataInput.put("ResourceName", resource);
dataInput.put("DatabaseName", database); dataInput.put("DatabaseName", database);
dataInput.put("SchemaName", schema); dataInput.put("SchemaName", schema);
elementType = ConstantsPortlet.SCHEMA; elementType = Constants.SCHEMA;
} }
// print check // print check
@ -837,13 +837,13 @@ public class GxtBorderLayoutPanel extends ContentPanel {
"determined Dialect for smart correction: " + dialect); "determined Dialect for smart correction: " + dialect);
} }
} }
String language = ConstantsPortlet.NONE; String language = Constants.NONE;
if (dialect.toUpperCase().contains(ConstantsPortlet.POSTGRES)) { if (dialect.toUpperCase().contains(Constants.POSTGRES)) {
language = ConstantsPortlet.POSTGRES; language = Constants.POSTGRES;
} }
if (dialect.toUpperCase().contains(ConstantsPortlet.MYSQL)) { if (dialect.toUpperCase().contains(Constants.MYSQL)) {
language = ConstantsPortlet.MYSQL; language = Constants.MYSQL;
} }
rootLogger.log(Level.INFO, "Dialect used for smart correction: " rootLogger.log(Level.INFO, "Dialect used for smart correction: "
+ language); + language);
@ -1329,7 +1329,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
rootLogger.log(Level.INFO, "SchemaName: " + ""); rootLogger.log(Level.INFO, "SchemaName: " + "");
rootLogger.log(Level.INFO, "TableName: " + currentselectedTable); rootLogger.log(Level.INFO, "TableName: " + currentselectedTable);
elementType = ConstantsPortlet.DATABASE; elementType = Constants.DATABASE;
} else { } else {
// the table has a schema because the selected item is a schema // the table has a schema because the selected item is a schema
schema = selectedItem; schema = selectedItem;
@ -1346,7 +1346,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
rootLogger.log(Level.INFO, "SchemaName: " + schema.getName()); rootLogger.log(Level.INFO, "SchemaName: " + schema.getName());
rootLogger.log(Level.INFO, "TableName: " + currentselectedTable); rootLogger.log(Level.INFO, "TableName: " + currentselectedTable);
elementType = ConstantsPortlet.SCHEMA; elementType = Constants.SCHEMA;
} }
// to mask the entire content panel // to mask the entire content panel
@ -1453,7 +1453,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
rootLogger.log(Level.INFO, "DatabaseName: " + database.getName()); rootLogger.log(Level.INFO, "DatabaseName: " + database.getName());
rootLogger.log(Level.INFO, "SchemaName: " + ""); rootLogger.log(Level.INFO, "SchemaName: " + "");
rootLogger.log(Level.INFO, "TableName: " + currentselectedTable); rootLogger.log(Level.INFO, "TableName: " + currentselectedTable);
elementType = ConstantsPortlet.DATABASE; elementType = Constants.DATABASE;
} else { } else {
// the table has a schema // the table has a schema
schema = selectedItem; schema = selectedItem;
@ -1469,7 +1469,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
rootLogger.log(Level.INFO, "DatabaseName: " + database.getName()); rootLogger.log(Level.INFO, "DatabaseName: " + database.getName());
rootLogger.log(Level.INFO, "SchemaName: " + schema.getName()); rootLogger.log(Level.INFO, "SchemaName: " + schema.getName());
rootLogger.log(Level.INFO, "TableName: " + currentselectedTable); rootLogger.log(Level.INFO, "TableName: " + currentselectedTable);
elementType = ConstantsPortlet.SCHEMA; elementType = Constants.SCHEMA;
} }
// to mask the entire content panel // to mask the entire content panel
obj.mask("Sampling the table", "x-mask-loading"); obj.mask("Sampling the table", "x-mask-loading");
@ -1571,7 +1571,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
rootLogger.log(Level.INFO, "DatabaseName: " + database.getName()); rootLogger.log(Level.INFO, "DatabaseName: " + database.getName());
rootLogger.log(Level.INFO, "SchemaName: " + ""); rootLogger.log(Level.INFO, "SchemaName: " + "");
rootLogger.log(Level.INFO, "TableName: " + currentselectedTable); rootLogger.log(Level.INFO, "TableName: " + currentselectedTable);
elementType = ConstantsPortlet.DATABASE; elementType = Constants.DATABASE;
} else { } else {
// the table has a schema // the table has a schema
schema = selectedItem; schema = selectedItem;
@ -1587,7 +1587,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
rootLogger.log(Level.INFO, "DatabaseName: " + database.getName()); rootLogger.log(Level.INFO, "DatabaseName: " + database.getName());
rootLogger.log(Level.INFO, "SchemaName: " + schema.getName()); rootLogger.log(Level.INFO, "SchemaName: " + schema.getName());
rootLogger.log(Level.INFO, "TableName: " + currentselectedTable); rootLogger.log(Level.INFO, "TableName: " + currentselectedTable);
elementType = ConstantsPortlet.SCHEMA; elementType = Constants.SCHEMA;
} }
// to mask the entire content panel // to mask the entire content panel

View File

@ -32,7 +32,7 @@ import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.AbstractImagePrototype;
import org.gcube.portlets.user.databasesmanager.client.datamodel.GeneralOutputFromServlet; import org.gcube.portlets.user.databasesmanager.client.datamodel.GeneralOutputFromServlet;
import org.gcube.portlets.user.databasesmanager.shared.ConstantsPortlet; import org.gcube.portlets.user.databasesmanager.shared.Constants;
import org.gcube.portlets.user.databasesmanager.shared.SessionExpiredException; import org.gcube.portlets.user.databasesmanager.shared.SessionExpiredException;
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession; import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
@ -291,7 +291,7 @@ public class GxtTreePanel extends LayoutContainer {
case 3: // the selected item is a database case 3: // the selected item is a database
if (selectedItem.getDatabaseType().equals( if (selectedItem.getDatabaseType().equals(
ConstantsPortlet.POSTGRES)) { Constants.POSTGRES)) {
// to mask the tree panel // to mask the tree panel
treePanel.mask("Loading", "x-mask-loading"); treePanel.mask("Loading", "x-mask-loading");
// load schema // load schema
@ -468,13 +468,13 @@ public class GxtTreePanel extends LayoutContainer {
DBInfo.add(row); DBInfo.add(row);
if (driver.toUpperCase().contains( if (driver.toUpperCase().contains(
ConstantsPortlet.POSTGRES)) { Constants.POSTGRES)) {
DatabaseType = ConstantsPortlet.POSTGRES; DatabaseType = Constants.POSTGRES;
} }
if (driver.toUpperCase().contains( if (driver.toUpperCase().contains(
ConstantsPortlet.MYSQL)) { Constants.MYSQL)) {
DatabaseType = ConstantsPortlet.MYSQL; DatabaseType = Constants.MYSQL;
} }
} }
@ -512,14 +512,14 @@ public class GxtTreePanel extends LayoutContainer {
child.setDatabaseType(DatabaseType); child.setDatabaseType(DatabaseType);
if (DatabaseType if (DatabaseType
.equals(ConstantsPortlet.MYSQL)) { .equals(Constants.MYSQL)) {
child.setDatabaseType(ConstantsPortlet.MYSQL); child.setDatabaseType(Constants.MYSQL);
child.setIsExpanded(false); child.setIsExpanded(false);
treePanel.setExpanded(child, false); treePanel.setExpanded(child, false);
} }
if (DatabaseType if (DatabaseType
.equals(ConstantsPortlet.POSTGRES)) { .equals(Constants.POSTGRES)) {
child.setDatabaseType(ConstantsPortlet.POSTGRES); child.setDatabaseType(Constants.POSTGRES);
} }
children.add(child); children.add(child);
} }
@ -722,16 +722,16 @@ public class GxtTreePanel extends LayoutContainer {
String value; String value;
if (Depth == 1) { // root tree if (Depth == 1) { // root tree
elementType = ConstantsPortlet.RESOURCESLIST; elementType = Constants.RESOURCESLIST;
value = ConstantsPortlet.RESOURCESLIST; value = Constants.RESOURCESLIST;
inputData.put(value, value); inputData.put(value, value);
} else if (Depth == 2) { // resource } else if (Depth == 2) { // resource
elementType = ConstantsPortlet.RESOURCE; elementType = Constants.RESOURCE;
value = selectedItem.getName(); value = selectedItem.getName();
inputData.put("ResourceName", value); inputData.put("ResourceName", value);
} else if (Depth == 3) { // database } else if (Depth == 3) { // database
elementType = ConstantsPortlet.DATABASE; elementType = Constants.DATABASE;
String database = selectedItem.getName(); String database = selectedItem.getName();
// get the database type // get the database type
// String dbType = selectedItem.getDatabaseType(); // String dbType = selectedItem.getDatabaseType();
@ -740,7 +740,7 @@ public class GxtTreePanel extends LayoutContainer {
if (selectedItem.getDatabaseType() != null if (selectedItem.getDatabaseType() != null
&& (selectedItem.getDatabaseType() && (selectedItem.getDatabaseType()
.equals(ConstantsPortlet.POSTGRES))) { // refresh .equals(Constants.POSTGRES))) { // refresh
// schema // schema
// list and // list and
// query // query
@ -750,7 +750,7 @@ public class GxtTreePanel extends LayoutContainer {
} }
if (selectedItem.getDatabaseType() != null if (selectedItem.getDatabaseType() != null
&& (selectedItem.getDatabaseType() && (selectedItem.getDatabaseType()
.equals(ConstantsPortlet.MYSQL))) { // refresh .equals(Constants.MYSQL))) { // refresh
// tables list, // tables list,
// query // query
// executed and // executed and
@ -762,7 +762,7 @@ public class GxtTreePanel extends LayoutContainer {
} else if (Depth == 4) { // Schema. Refresh tables list, query executed } else if (Depth == 4) { // Schema. Refresh tables list, query executed
// and samplings // and samplings
elementType = ConstantsPortlet.SCHEMA; elementType = Constants.SCHEMA;
String schema = selectedItem.getName(); String schema = selectedItem.getName();
FileModel db = store.getParent(selectedItem); FileModel db = store.getParent(selectedItem);
String database = db.getName(); String database = db.getName();
@ -812,7 +812,7 @@ public class GxtTreePanel extends LayoutContainer {
removeChildren(selectedItem); removeChildren(selectedItem);
tree.layout(true); tree.layout(true);
if (elemType.equals(ConstantsPortlet.RESOURCESLIST)) { if (elemType.equals(Constants.RESOURCESLIST)) {
List<FileModel> output = new ArrayList<FileModel>(); List<FileModel> output = new ArrayList<FileModel>();
output = result.getListOutput(); output = result.getListOutput();
@ -828,7 +828,7 @@ public class GxtTreePanel extends LayoutContainer {
selectedItem.setIsLoaded(true); selectedItem.setIsLoaded(true);
} else if (elemType.equals(ConstantsPortlet.RESOURCE)) { } else if (elemType.equals(Constants.RESOURCE)) {
LinkedHashMap<String, FileModel> output = new LinkedHashMap<String, FileModel>(); LinkedHashMap<String, FileModel> output = new LinkedHashMap<String, FileModel>();
output = result.getMapOutput(); output = result.getMapOutput();
@ -898,15 +898,15 @@ public class GxtTreePanel extends LayoutContainer {
if (driver if (driver
.toUpperCase() .toUpperCase()
.contains( .contains(
ConstantsPortlet.POSTGRES)) { Constants.POSTGRES)) {
DatabaseType = ConstantsPortlet.POSTGRES; DatabaseType = Constants.POSTGRES;
} }
if (driver if (driver
.toUpperCase() .toUpperCase()
.contains( .contains(
ConstantsPortlet.MYSQL)) { Constants.MYSQL)) {
DatabaseType = ConstantsPortlet.MYSQL; DatabaseType = Constants.MYSQL;
} }
} }
@ -949,7 +949,7 @@ public class GxtTreePanel extends LayoutContainer {
child.setDatabaseType(DatabaseType); child.setDatabaseType(DatabaseType);
if (DatabaseType if (DatabaseType
.equals(ConstantsPortlet.MYSQL)) { .equals(Constants.MYSQL)) {
child.setIsExpanded(false); child.setIsExpanded(false);
treePanel.setExpanded(child, treePanel.setExpanded(child,
false); false);
@ -971,7 +971,7 @@ public class GxtTreePanel extends LayoutContainer {
selectedItem.setIsLoaded(true); selectedItem.setIsLoaded(true);
} else if (elemType.equals(ConstantsPortlet.DATABASE)) { } else if (elemType.equals(Constants.DATABASE)) {
List<FileModel> output = new ArrayList<FileModel>(); List<FileModel> output = new ArrayList<FileModel>();
output = result.getListOutput(); output = result.getListOutput();

View File

@ -20,7 +20,7 @@ import org.gcube.portlets.user.databasesmanager.client.events.interfaces.Selecte
import org.gcube.portlets.user.databasesmanager.client.events.interfaces.SelectedTableEventHandler; import org.gcube.portlets.user.databasesmanager.client.events.interfaces.SelectedTableEventHandler;
import org.gcube.portlets.user.databasesmanager.client.form.GxtFormSubmitQuery; import org.gcube.portlets.user.databasesmanager.client.form.GxtFormSubmitQuery;
import org.gcube.portlets.user.databasesmanager.client.utils.UIDGenerator; import org.gcube.portlets.user.databasesmanager.client.utils.UIDGenerator;
import org.gcube.portlets.user.databasesmanager.shared.ConstantsPortlet; import org.gcube.portlets.user.databasesmanager.shared.Constants;
import org.gcube.portlets.user.databasesmanager.shared.SessionExpiredException; import org.gcube.portlets.user.databasesmanager.shared.SessionExpiredException;
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession; import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
@ -101,7 +101,7 @@ public class GxtToolbarFunctionality {
// setLayout(new FlowLayout(10)); // setLayout(new FlowLayout(10));
// Button for tables list // Button for tables list
btnTablesList = new Button(ConstantsPortlet.TABLESLIST); btnTablesList = new Button(Constants.TABLESLIST);
// btnSubmitQuery.setIcon(Resources.ICONS.text()); // btnSubmitQuery.setIcon(Resources.ICONS.text());
btnTablesList.setScale(ButtonScale.SMALL); btnTablesList.setScale(ButtonScale.SMALL);
btnTablesList.setArrowAlign(ButtonArrowAlign.BOTTOM); btnTablesList.setArrowAlign(ButtonArrowAlign.BOTTOM);
@ -110,7 +110,7 @@ public class GxtToolbarFunctionality {
toolBar.add(btnTablesList); toolBar.add(btnTablesList);
// Button for Submit Query // Button for Submit Query
btnSubmitQuery = new Button(ConstantsPortlet.SUBMITQUERY); btnSubmitQuery = new Button(Constants.SUBMITQUERY);
// btnSubmitQuery.setIcon(Resources.ICONS.text()); // btnSubmitQuery.setIcon(Resources.ICONS.text());
btnSubmitQuery.setScale(ButtonScale.SMALL); btnSubmitQuery.setScale(ButtonScale.SMALL);
btnSubmitQuery.setArrowAlign(ButtonArrowAlign.BOTTOM); btnSubmitQuery.setArrowAlign(ButtonArrowAlign.BOTTOM);
@ -119,7 +119,7 @@ public class GxtToolbarFunctionality {
toolBar.add(btnSubmitQuery); toolBar.add(btnSubmitQuery);
// Button to get the "show create table" // Button to get the "show create table"
btnShowCreateTable = new Button(ConstantsPortlet.TABLEDETAILS); btnShowCreateTable = new Button(Constants.TABLEDETAILS);
btnShowCreateTable.setScale(ButtonScale.SMALL); btnShowCreateTable.setScale(ButtonScale.SMALL);
btnShowCreateTable.setArrowAlign(ButtonArrowAlign.BOTTOM); btnShowCreateTable.setArrowAlign(ButtonArrowAlign.BOTTOM);
btnShowCreateTable btnShowCreateTable
@ -128,14 +128,14 @@ public class GxtToolbarFunctionality {
toolBar.add(new SeparatorToolItem()); toolBar.add(new SeparatorToolItem());
// Button for Simple Sample // Button for Simple Sample
btnSimpleSample = new Button(ConstantsPortlet.SAMPLING); btnSimpleSample = new Button(Constants.SAMPLING);
btnSimpleSample.setScale(ButtonScale.SMALL); btnSimpleSample.setScale(ButtonScale.SMALL);
btnSimpleSample.setArrowAlign(ButtonArrowAlign.BOTTOM); btnSimpleSample.setArrowAlign(ButtonArrowAlign.BOTTOM);
btnSimpleSample.setToolTip("retrieves the first 100 rows of the table"); btnSimpleSample.setToolTip("retrieves the first 100 rows of the table");
toolBar.add(btnSimpleSample); toolBar.add(btnSimpleSample);
// Button for Smart Sample // Button for Smart Sample
btnSmartSample = new Button(ConstantsPortlet.SMARTSAMPLING); btnSmartSample = new Button(Constants.SMARTSAMPLING);
btnSmartSample.setScale(ButtonScale.SMALL); btnSmartSample.setScale(ButtonScale.SMALL);
btnSmartSample.setArrowAlign(ButtonArrowAlign.BOTTOM); btnSmartSample.setArrowAlign(ButtonArrowAlign.BOTTOM);
btnSmartSample btnSmartSample
@ -143,7 +143,7 @@ public class GxtToolbarFunctionality {
toolBar.add(btnSmartSample); toolBar.add(btnSmartSample);
// button for Random Sample // button for Random Sample
btnRandomSample = new Button(ConstantsPortlet.RANDOMSAMPLING); btnRandomSample = new Button(Constants.RANDOMSAMPLING);
btnRandomSample.setScale(ButtonScale.SMALL); btnRandomSample.setScale(ButtonScale.SMALL);
btnRandomSample.setArrowAlign(ButtonArrowAlign.BOTTOM); btnRandomSample.setArrowAlign(ButtonArrowAlign.BOTTOM);
btnRandomSample btnRandomSample
@ -152,7 +152,7 @@ public class GxtToolbarFunctionality {
toolBar.add(new SeparatorToolItem()); toolBar.add(new SeparatorToolItem());
// button for Random Sample // button for Random Sample
btnRefresCachedData = new Button(ConstantsPortlet.REFRESHCACHEDDATA); btnRefresCachedData = new Button(Constants.REFRESHCACHEDDATA);
btnRefresCachedData.setScale(ButtonScale.SMALL); btnRefresCachedData.setScale(ButtonScale.SMALL);
btnRefresCachedData.setArrowAlign(ButtonArrowAlign.BOTTOM); btnRefresCachedData.setArrowAlign(ButtonArrowAlign.BOTTOM);
btnRefresCachedData.setToolTip("refreshes data"); btnRefresCachedData.setToolTip("refreshes data");
@ -494,7 +494,7 @@ public class GxtToolbarFunctionality {
case 3: case 3:
if ((databaseType != null) if ((databaseType != null)
&& (databaseType.equals(ConstantsPortlet.MYSQL))) { && (databaseType.equals(Constants.MYSQL))) {
btnTablesList.enable(); btnTablesList.enable();
btnSubmitQuery.enable(); btnSubmitQuery.enable();
btnRefresCachedData.enable(); btnRefresCachedData.enable();
@ -506,7 +506,7 @@ public class GxtToolbarFunctionality {
} }
if ((databaseType != null) if ((databaseType != null)
&& (databaseType.equals(ConstantsPortlet.POSTGRES))) { && (databaseType.equals(Constants.POSTGRES))) {
btnTablesList.disable(); btnTablesList.disable();
btnSubmitQuery.enable(); btnSubmitQuery.enable();
btnRefresCachedData.enable(); btnRefresCachedData.enable();
@ -632,7 +632,7 @@ public class GxtToolbarFunctionality {
String query = ""; String query = "";
if (tableInfo.isDatabase()) { if (tableInfo.isDatabase()) {
if (tableInfo.getDatabaseType().equals(ConstantsPortlet.MYSQL)) { if (tableInfo.getDatabaseType().equals(Constants.MYSQL)) {
String dbName = tableInfo.getDatabaseName(); String dbName = tableInfo.getDatabaseName();
// the full name equal to "dbname.tablename" // the full name equal to "dbname.tablename"

View File

@ -1,124 +1,72 @@
package org.gcube.portlets.user.databasesmanager.server.util; package org.gcube.portlets.user.databasesmanager.server.util;
import java.util.concurrent.TimeUnit; import java.util.HashMap;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.gcube.application.framework.core.session.ASLSession; import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager; import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.data.analysis.dataminermanagercl.server.DataMinerService;
import org.gcube.data.analysis.statisticalmanager.proxies.StatisticalManagerDSL; import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
import org.gcube.data.analysis.statisticalmanager.proxies.StatisticalManagerDataSpace;
import org.gcube.data.analysis.statisticalmanager.proxies.StatisticalManagerFactory;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.user.databasesmanager.shared.Constants;
import org.gcube.portlets.user.databasesmanager.shared.SessionExpiredException;
public class SessionUtil { public class SessionUtil {
protected static Logger logger = Logger.getLogger(SessionUtil.class); private static Logger logger = Logger.getLogger(SessionUtil.class);
public static final String TEST_USER = "test.user"; //public static final String TEST_USER = "test.user";
public static final String USER = "database.manager"; //public static final String USER = "database.manager";
public static ASLSession getAslSession(HttpSession httpSession) {
String sessionID = httpSession.getId();
String user = (String) httpSession
.getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
if (user == null) {
// user = "loredana.liccardo";
user = USER;
httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, user);
ScopeProvider.instance.set("/gcube/devsec/devVRE");
ASLSession session = SessionManager.getInstance().getASLSession(
sessionID, user);
session.setScope("/gcube/devsec/devVRE");
return session;
// return null;
} else {
logger.trace("user found in session " + user);
}
ASLSession session = SessionManager.getInstance().getASLSession(
sessionID, user);
return session;
}
public static boolean isSessionExpired(HttpSession httpSession) throws Exception {
logger.info("session validating..."); public static ASLSession getASLSession(HttpSession httpSession)
//reading username from asl session throws Exception {
String userUsername = getAslSession(httpSession).getUsername(); String username = (String) httpSession
.getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
/*COMMENT THIS IN DEVELOP ENVIROMENT (UNCOMMENT IN PRODUCTION)*/ ASLSession aslSession;
if (username == null) {
if(userUsername.compareToIgnoreCase(USER)==0){ if (Constants.DEBUG_MODE) {
logger.error("session is expired! username is: "+SessionUtil.USER); logger.info("no user found in session, use test user");
return true; //is USER, session is expired
} // Remove comment for Test
username = Constants.DEFAULT_USER;
if(userUsername.compareToIgnoreCase(TEST_USER)==0){ String scope = Constants.DEFAULT_SCOPE;
logger.error("session is expired! username is: "+SessionUtil.TEST_USER);
return true; //is TEST_USER, session is expired httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE,
username);
aslSession = SessionManager.getInstance().getASLSession(
httpSession.getId(), username);
aslSession.setScope(scope);
} else {
logger.info("No user found in session");
throw new SessionExpiredException();
}
} else {
aslSession = SessionManager.getInstance().getASLSession(
httpSession.getId(), username);
} }
logger.info("session is valid! current username is: "+userUsername); logger.info("SessionUtil: aslSession " + aslSession.getUsername() + " "
+ aslSession.getScope());
return false;
return aslSession;
} }
public static StatisticalManagerFactory getFactory(HttpSession httpSession) { public static String getToken(ASLSession aslSession) throws Exception {
ASLSession session = getAslSession(httpSession); String token = null;
return getFactory(session); if (Constants.DEBUG_MODE) {
} token = Constants.DEFAULT_TOKEN;
} else {
token = aslSession.getSecurityToken();
}
logger.info("received token: " + token);
return token;
public static StatisticalManagerFactory getFactory(ASLSession session) { }
ScopeProvider.instance.set(session.getScope());
return getFactory(session.getScope());
}
public static StatisticalManagerFactory getFactory(String scope) {
ScopeProvider.instance.set(scope.toString());
return StatisticalManagerDSL.createStateful()
.withTimeout(5, TimeUnit.MINUTES).build(); // IS
}
public static StatisticalManagerDataSpace getDataSpaceService(
HttpSession httpSession) {
ASLSession session = getAslSession(httpSession);
return getDataSpaceService(session);
}
public static StatisticalManagerDataSpace getDataSpaceService(
ASLSession session) {
ScopeProvider.instance.set(getScope(session));
return StatisticalManagerDSL.dataSpace()
.withTimeout(5, TimeUnit.MINUTES).build();
}
public static String getUsername(HttpSession httpSession) {
ASLSession session = getAslSession(httpSession);
return getUsername(session);
}
private static String getUsername(ASLSession session) {
return session.getUsername();
}
public static String getScope(HttpSession httpSession) {
ASLSession session = getAslSession(httpSession);
return getScope(session);
}
private static String getScope(ASLSession session) {
return session.getScope().toString();
}
} }

View File

@ -0,0 +1,67 @@
package org.gcube.portlets.user.databasesmanager.shared;
import java.util.Arrays;
import java.util.List;
/**
*
*
*/
public enum AlgorithmsName {
LISTDBNAMES("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBNAMES"),
LISTDBINFO("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBINFO"),
LISTDBSCHEMA("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBSCHEMA"),
LISTTABLES("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTTABLES"),
GETTABLEDETAILS("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.GETTABLEDETAILS"),
SUBMITQUERY("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.SUBMITQUERY"),
SAMPLEONTABLE("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.SAMPLEONTABLE"),
SMARTSAMPLEONTABLE("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.SMARTSAMPLEONTABLE"),
RANDOMSAMPLEONTABLE("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.RANDOMSAMPLEONTABLE");
/**
* @param text
*/
private AlgorithmsName(final String fullPackageName) {
this.fullPackageName = fullPackageName;
}
private final String fullPackageName;
@Override
public String toString() {
return fullPackageName;
}
public String getFullPackageName() {
return fullPackageName;
}
public String getId() {
return name();
}
/**
*
* @param fullPackageName
* @return
*/
public static AlgorithmsName getFromFullPackageName(String fullPackageName) {
if (fullPackageName == null || fullPackageName.isEmpty())
return null;
for (AlgorithmsName type : values()) {
if (type.fullPackageName.compareToIgnoreCase(fullPackageName) == 0) {
return type;
}
}
return null;
}
public static List<AlgorithmsName> asList() {
List<AlgorithmsName> list = Arrays.asList(values());
return list;
}
}

View File

@ -0,0 +1,54 @@
package org.gcube.portlets.user.databasesmanager.shared;
public class Constants {
public static final boolean DEBUG_MODE = false;
public static final boolean TEST_ENABLE = false;
public static final String DEFAULT_USER = "giancarlo.panichi";
public final static String DEFAULT_SCOPE = "/gcube/devNext";
public final static String DEFAULT_TOKEN = "16e65d4f-11e0-4e4a-84b9-351688fccc12-98187548";
// SClientMap
public static final String SClientMap = "DataMinerClientMap";
// Div Gwt
public static final String CONTENTDIV = "contentDiv";
// Toolbar button
public static final String TABLESLIST = "Tables List";
public static final String SUBMITQUERY = "Submit Query";
public static final String GETINFO = "Get Info";
public static final String TABLEDETAILS = "Table Details";
public static final String SAMPLING = "Sampling";
public static final String SMARTSAMPLING = "Smart Sampling";
public static final String RANDOMSAMPLING = "Random Sampling";
public static final String REFRESHCACHEDDATA = "Refresh Data";
// sql Dialects
public static final String POSTGRES = "POSTGRES";
public static final String MYSQL = "MYSQL";
public static final String NONE = "NONE";
// element types
// public static final String DATABASE="Database";
// public static final String SCHEMA="Schema";
// elements type
public static final String RESOURCESLIST = "ResourcesList";
public static final String RESOURCE = "resource";
public static final String DATABASE = "database";
public static final String SCHEMA = "schema";
// algorithmID
/*
public static final String ALGID_GETRESOURCE = "LISTDBNAMES";
public static final String ALGID_GETDBINFO = "LISTDBINFO";
public static final String ALGID_GETDBSCHEMA = "LISTDBSCHEMA";
public static final String ALGID_GETTABLES = "LISTTABLES";
public static final String ALGID_GETTABLEDETAILS = "GETTABLEDETAILS";
public static final String ALGID_SUBMITQUERY = "SUBMITQUERY";
public static final String ALGID_SAMPLEONTABLE = "SAMPLEONTABLE";
public static final String ALGID_SMARTSAMPLEONTABLE = "SMARTSAMPLEONTABLE";
public static final String ALGID_RANDOMSAMPLEONTABLE = "RANDOMSAMPLEONTABLE";
*/
}

View File

@ -1,43 +0,0 @@
package org.gcube.portlets.user.databasesmanager.shared;
public class ConstantsPortlet {
// Div Gwt
public static final String CONTENTDIV = "contentDiv";
//Toolbar button
public static final String TABLESLIST = "Tables List";
public static final String SUBMITQUERY = "Submit Query";
public static final String GETINFO = "Get Info";
public static final String TABLEDETAILS = "Table Details";
public static final String SAMPLING = "Sampling";
public static final String SMARTSAMPLING = "Smart Sampling";
public static final String RANDOMSAMPLING = "Random Sampling";
public static final String REFRESHCACHEDDATA = "Refresh Data";
//sql Dialects
public static final String POSTGRES = "POSTGRES";
public static final String MYSQL = "MYSQL";
public static final String NONE = "NONE";
//element types
// public static final String DATABASE="Database";
// public static final String SCHEMA="Schema";
//algorithmID
public static final String ALGID_GETRESOURCE="LISTDBNAMES";
public static final String ALGID_GETDBINFO="LISTDBINFO";
public static final String ALGID_GETDBSCHEMA="LISTDBSCHEMA";
public static final String ALGID_GETTABLES="LISTTABLES";
public static final String ALGID_GETTABLEDETAILS="GETTABLEDETAILS";
public static final String ALGID_SUBMITQUERY="SUBMITQUERY";
public static final String ALGID_SAMPLEONTABLE="SAMPLEONTABLE";
public static final String ALGID_SMARTSAMPLEONTABLE="SMARTSAMPLEONTABLE";
public static final String ALGID_RANDOMSAMPLEONTABLE="RANDOMSAMPLEONTABLE";
//elements type
public static final String RESOURCESLIST="ResourcesList";
public static final String RESOURCE="resource";
public static final String DATABASE="database";
public static final String SCHEMA="schema";
}

View File

@ -1,9 +1,11 @@
package org.gcube.portlets.user.databasesmanager.client.datamodel; package org.gcube.portlets.user.databasesmanager.shared.computation;
import java.io.Serializable;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
public class ComputationOutput { public class ComputationOutput implements Serializable {
private static final long serialVersionUID = -5508917907248426765L;
private LinkedHashMap<String, String> mapValues; private LinkedHashMap<String, String> mapValues;
private LinkedHashMap<String, String> mapKeys; private LinkedHashMap<String, String> mapKeys;
private String urlFile; private String urlFile;
@ -12,7 +14,7 @@ public class ComputationOutput {
public ComputationOutput() { public ComputationOutput() {
mapKeys = new LinkedHashMap<String, String>(); mapKeys = new LinkedHashMap<String, String>();
mapValues = new LinkedHashMap<String, String>(); mapValues = new LinkedHashMap<String, String>();
urlFile=""; urlFile = "";
} }
public void setMapValues(LinkedHashMap<String, String> mapValues) { public void setMapValues(LinkedHashMap<String, String> mapValues) {
@ -30,20 +32,28 @@ public class ComputationOutput {
public LinkedHashMap<String, String> getmapKeys() { public LinkedHashMap<String, String> getmapKeys() {
return mapKeys; return mapKeys;
} }
public void setUrlFile(String url){ public void setUrlFile(String url) {
this.urlFile=url; this.urlFile = url;
} }
public String getUrlFile(){ public String getUrlFile() {
return this.urlFile; return this.urlFile;
} }
public void setSubmitQueryTotalRows(int val){ public void setSubmitQueryTotalRows(int val) {
this.submitQueryTotalRows = val; this.submitQueryTotalRows = val;
} }
public int getSubmitQueryTotalRows(){ public int getSubmitQueryTotalRows() {
return this.submitQueryTotalRows; return this.submitQueryTotalRows;
} }
@Override
public String toString() {
return "ComputationOutput [mapValues=" + mapValues + ", mapKeys="
+ mapKeys + ", urlFile=" + urlFile + ", submitQueryTotalRows="
+ submitQueryTotalRows + "]";
}
} }

View File

@ -0,0 +1,10 @@
./addAlgorithm.sh LISTDBINFO DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.ListDBInfo /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh LISTDBNAMES DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.ListNames /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh LISTDBSCHEMA DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.ListSchemas /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh LISTTABLES DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.ListTables /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh GETTABLEDETAILS DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.GetTableDetails /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh SUBMITQUERY DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.SubmitQuery /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh RANDOMSAMPLEONTABLE DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.RandomSampleOnTable /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh SAMPLEONTABLE DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.SampleOnTable /gcube/devNext/NextNext transducerers N k "legacy algorithm"
./addAlgorithm.sh SMARTSAMPLEONTABLE DATABASES org.gcube.dataaccess.algorithms.drmalgorithms.SmartSampleOnTable /gcube/devNext/NextNext transducerers N k "legacy algorithm"