Remove unused dir
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-unionwizard-widget@112272 82a268e6-3cf1-43bd-a215-b396298e98cf
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="UnionWizardTD.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/tabular-data-unionwizard-widget"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.GWTShell"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -port 8888 UnionWizardTD.html"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="tabular-data-unionwizard-widget"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m -Dgwt.nowarn.legacy.tools"/>
|
||||
</launchConfiguration>
|
312
1.2/pom.xml
|
@ -1,312 +0,0 @@
|
|||
<?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>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<!-- POM file generated with GWT webAppCreator -->
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-unionwizard-widget</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
|
||||
<name>tabular-data-unionwizard-widget</name>
|
||||
<description>tabular-data-unionwizard-widget allows the union of tabular resources</description>
|
||||
|
||||
<scm>
|
||||
<url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-unionwizard-widget</url>
|
||||
</scm>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Giancarlo Panichi</name>
|
||||
<email>g.panichi@isti.cnr.it</email>
|
||||
<organization>CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"</organization>
|
||||
<roles>
|
||||
<role>architect</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||
<release.date>2015-02-16</release.date>
|
||||
<wikiurl>https://gcube.wiki.gcube-system.org/gcube/index.php</wikiurl>
|
||||
<templatesDirectory>templates</templatesDirectory>
|
||||
<distroDirectory>distro</distroDirectory>
|
||||
<configDirectory>config</configDirectory>
|
||||
|
||||
<gwtVersion>2.6.1</gwtVersion>
|
||||
<gwtLogVersion>3.3.2</gwtLogVersion>
|
||||
<gxtVersion>3.1.1</gxtVersion>
|
||||
|
||||
<KEYS>${env.KEYS}</KEYS>
|
||||
<!-- GWT needs at least java 1.5 -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>localRun</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-user</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>1.0.0.GA</version>
|
||||
<scope>test</scope>
|
||||
</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>com.sencha.gxt</groupId>
|
||||
<artifactId>gxt</artifactId>
|
||||
<version>${gxtVersion}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- tabular-data-gwt-service -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-gwt-service</artifactId>
|
||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- tabular-data-widget-common-event -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-widget-common-event</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- tabular-data-monitor-widget -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-monitor-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- tabular-data-wizard-widget -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-wizard-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- LOGGING -->
|
||||
<dependency>
|
||||
<groupId>com.allen-sauer.gwt.log</groupId>
|
||||
<artifactId>gwt-log</artifactId>
|
||||
<version>${gwtLogVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
<!-- Generate compiled stuff in the folder used for developing mode -->
|
||||
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.16</version>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
<!-- TODO check if needed -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit47</artifactId>
|
||||
<version>2.16</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<!-- GWT Maven Plugin -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>resources</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<runTarget>UnionWizardTD.html</runTarget>
|
||||
<hostedWebapp>${webappDirectory}</hostedWebapp>
|
||||
<module>org.gcube.portlets.user.td.unionwizardwidget.UnionWizardTD</module>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Maven -->
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-profile</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${configDirectory}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${templatesDirectory}</directory>
|
||||
<includes>
|
||||
<include>profile.xml</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-distro-resources</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${distroDirectory}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${templatesDirectory}</directory>
|
||||
<excludes>
|
||||
<exclude>profile.xml</exclude>
|
||||
<exclude>descriptor.xml</exclude>
|
||||
</excludes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${distroDirectory}</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<followSymlinks>false</followSymlinks>
|
||||
</fileset>
|
||||
<fileset>
|
||||
<directory>${configDirectory}</directory>
|
||||
<includes>
|
||||
<include>**</include>
|
||||
</includes>
|
||||
<followSymlinks>false</followSymlinks>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>${templatesDirectory}/descriptor.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>servicearchive</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>LATEST</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module rename-to='UnionWizardTD'>
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<!-- We need the JUnit module in the main module, -->
|
||||
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
||||
<inherits name='com.google.gwt.junit.JUnit' />
|
||||
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
<inherits name='com.google.gwt.user.theme.standard.Standard' />
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
|
||||
<!-- Other module inherits -->
|
||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
|
||||
<inherits name='org.gcube.portlets.user.td.wizardwidget.Wizard' />
|
||||
<inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
|
||||
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.SDMXImportWizardTD.client.SDMXImportWizardTDEntry' /> -->
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
<!-- <source path='org.gcube.data.analysis.tabulardata.operation.worker'/> -->
|
||||
|
||||
</module>
|
|
@ -1,100 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionColumnsMapping;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.Command;
|
||||
|
||||
public class ColumnMappingCard extends WizardCard {
|
||||
protected UnionSession unionSession;
|
||||
protected ColumnMappingCard thisCard;
|
||||
protected ColumnMappingPanel columnMappingPanel;
|
||||
|
||||
public ColumnMappingCard(final UnionSession unionSession) {
|
||||
super("Mapping beetween Tabular Resources", "");
|
||||
Log.debug("ColumnMappingCard");
|
||||
this.unionSession = unionSession;
|
||||
thisCard = this;
|
||||
|
||||
columnMappingPanel = new ColumnMappingPanel(thisCard,res);
|
||||
|
||||
setContent(columnMappingPanel);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
Log.debug("ColumnMappingCard Call Setup ");
|
||||
Command sayNextCard = new Command() {
|
||||
|
||||
public void execute() {
|
||||
Log.debug("ColumnMappingCard Call sayNextCard");
|
||||
setMapping();
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
getWizardWindow().setNextButtonCommand(sayNextCard);
|
||||
|
||||
Command sayPreviousCard = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
getWizardWindow().previousCard();
|
||||
getWizardWindow().removeCard(thisCard);
|
||||
Log.debug("Remove ColumnMappingCard");
|
||||
} catch (Exception e) {
|
||||
Log.error("sayPreviousCard :" + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
getWizardWindow().setEnableBackButton(true);
|
||||
|
||||
}
|
||||
|
||||
protected void setMapping() {
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
|
||||
ArrayList<UnionColumnsMapping> columnsMatch=columnMappingPanel.getSelectedMap();
|
||||
if(columnsMatch==null){
|
||||
Log.debug("No columns match created: "
|
||||
+columnsMatch);
|
||||
UtilsGXT3
|
||||
.info("Attentions",
|
||||
"Creates a valid column map");
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
getWizardWindow().setEnableBackButton(true);
|
||||
|
||||
} else {
|
||||
Log.debug("ColumnsMatch created: "+columnsMatch);
|
||||
unionSession.setColumnsMatch(columnsMatch);
|
||||
goNext();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void goNext() {
|
||||
try {
|
||||
Log.info("NextCard ColumnSelectionCard");
|
||||
UnionOperationInProgressCard progressCard = new UnionOperationInProgressCard(
|
||||
unionSession);
|
||||
getWizardWindow().addCard(
|
||||
progressCard);
|
||||
getWizardWindow().nextCard();
|
||||
} catch (Throwable e) {
|
||||
Log.error("goNext: " + e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,587 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionColumnsMapping;
|
||||
import org.gcube.portlets.user.td.unionwizardwidget.client.custom.IconButton;
|
||||
import org.gcube.portlets.user.td.unionwizardwidget.client.properties.ColumnDataProperties;
|
||||
import org.gcube.portlets.user.td.unionwizardwidget.client.resources.UnionResourceBundle;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.RelationshipData;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundle;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
|
||||
import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.data.shared.ListStore;
|
||||
import com.sencha.gxt.widget.core.client.ContentPanel;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer.HBoxLayoutAlign;
|
||||
import com.sencha.gxt.widget.core.client.container.ResizeContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ColumnMappingPanel extends ContentPanel {
|
||||
|
||||
private static final String COMBOWIDTH = "200px";
|
||||
// private static final String COLUMNLABELWIDTH = "120px";
|
||||
protected ResourceBundle res;
|
||||
protected ColumnMappingCard parent;
|
||||
protected VerticalLayoutContainer vert;
|
||||
protected ArrayList<ColumnData> sourceColumns;
|
||||
protected ArrayList<ColumnData> unionColumns;
|
||||
protected ResizeContainer thisPanel;
|
||||
|
||||
protected HashMap<ColumnData, ColumnData> columnMap;
|
||||
protected ArrayList<UnionColumnsMapping> listUnionColumnsMapping;
|
||||
|
||||
protected String itemIdSourceColumn = "itemIdSourceColumn";
|
||||
protected String itemIdUnionColumn = "itemIdUnionColumn";
|
||||
protected String itemIdLabelColumn = "itemIdLabelColumn";
|
||||
protected String itemIdBtnAdd = "itemIdBtnAdd";
|
||||
protected String itemIdBtnDel = "itemIdBtnDel";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param res
|
||||
*/
|
||||
public ColumnMappingPanel(ColumnMappingCard parent, ResourceBundle res) {
|
||||
super();
|
||||
this.res = res;
|
||||
this.parent = parent;
|
||||
thisPanel = this;
|
||||
|
||||
Log.debug("ColumnMappingPanel");
|
||||
init();
|
||||
retrieveSourceColumns();
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
setHeaderVisible(false);
|
||||
// setBodyBorder(false);
|
||||
setBodyStyle("backgroundColor:#DFE8F6;");
|
||||
// new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
||||
// Important: fixed rendering of widgets
|
||||
forceLayoutOnResize = true;
|
||||
}
|
||||
|
||||
protected void create() {
|
||||
|
||||
SimpleContainer container = new SimpleContainer();
|
||||
|
||||
vert = new VerticalLayoutContainer();
|
||||
vert.setScrollMode(ScrollMode.AUTO);
|
||||
vert.setAdjustForScroll(true);
|
||||
container.add(vert);
|
||||
|
||||
setColumnMap();
|
||||
|
||||
/*
|
||||
* FieldLabel columnLabel = new FieldLabel(null, "Column Label");
|
||||
* columnLabel.getElement().applyStyles("font-weight:bold");
|
||||
* columnLabel.setWidth(COLUMNLABELWIDTH);
|
||||
* columnLabel.setLabelSeparator("");
|
||||
*/
|
||||
|
||||
String currentTRLabel = parent.unionSession.getCurrentTabularResource()
|
||||
.getName();
|
||||
FieldLabel sourceColumnLabel = new FieldLabel(null, currentTRLabel);
|
||||
sourceColumnLabel.getElement().applyStyles("font-weight:bold");
|
||||
sourceColumnLabel.setWidth(COMBOWIDTH);
|
||||
sourceColumnLabel.setLabelSeparator("");
|
||||
|
||||
String unionTRLabel = parent.unionSession.getUnionTabularResource()
|
||||
.getName();
|
||||
FieldLabel unionColumnLabel = new FieldLabel(null, unionTRLabel);
|
||||
unionColumnLabel.getElement().applyStyles("font-weight:bold");
|
||||
unionColumnLabel.setWidth(COMBOWIDTH);
|
||||
unionColumnLabel.setLabelSeparator("");
|
||||
|
||||
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||
horiz.setPack(BoxLayoutPack.START);
|
||||
|
||||
// horiz.add(columnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(sourceColumnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(unionColumnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
|
||||
VerticalLayoutContainer vPanel = new VerticalLayoutContainer();
|
||||
vPanel.setScrollMode(ScrollMode.AUTO);
|
||||
vPanel.setAdjustForScroll(true);
|
||||
|
||||
vPanel.add(horiz, new VerticalLayoutData(1, -1,
|
||||
new Margins(1, 1, 1, 10)));
|
||||
vPanel.add(container, new VerticalLayoutData(1, -1, new Margins(1, 1,
|
||||
1, 10)));
|
||||
|
||||
add(vPanel);
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
||||
private void retrieveSourceColumns() {
|
||||
TRId trId = parent.unionSession.getTrId();
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
parent.getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
|
||||
} else {
|
||||
Log.debug("Error retrieving source columns: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error retrieving source columns",
|
||||
"Error retrieving source columns on server!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
sourceColumns = result;
|
||||
retrieveUnionColumns();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void retrieveUnionColumns() {
|
||||
TRId trId = parent.unionSession.getUnionTabularResource().getTrId();
|
||||
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
parent.getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
|
||||
} else {
|
||||
Log.debug("Error retrieving union columns: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error retrieving union columns",
|
||||
"Error retrieving union columns on server!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(ArrayList<ColumnData> result) {
|
||||
unionColumns = result;
|
||||
create();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void setColumnMap() {
|
||||
|
||||
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||
|
||||
// Column Label
|
||||
/*
|
||||
* TextField columnLabel = new TextField();
|
||||
* columnLabel.setItemId(itemIdLabelColumn);
|
||||
* columnLabel.setAllowBlank(false);
|
||||
* columnLabel.setWidth(COLUMNLABELWIDTH);
|
||||
*/
|
||||
|
||||
// Source Combo
|
||||
ColumnDataProperties propsSourceColumn = GWT
|
||||
.create(ColumnDataProperties.class);
|
||||
ListStore<ColumnData> storeComboSourceColumn = new ListStore<ColumnData>(
|
||||
propsSourceColumn.id());
|
||||
storeComboSourceColumn.addAll(sourceColumns);
|
||||
|
||||
final ComboBox<ColumnData> comboSourceColumn = new ComboBox<ColumnData>(
|
||||
storeComboSourceColumn, propsSourceColumn.label());
|
||||
comboSourceColumn.setItemId(itemIdSourceColumn);
|
||||
|
||||
Log.debug("ComboSourceColumn created");
|
||||
|
||||
comboSourceColumn.setEmptyText("Select a column...");
|
||||
comboSourceColumn.setWidth(COMBOWIDTH);
|
||||
comboSourceColumn.setEditable(false);
|
||||
comboSourceColumn.setTriggerAction(TriggerAction.ALL);
|
||||
|
||||
// Union Combo
|
||||
ColumnDataProperties propsUnionColumn = GWT
|
||||
.create(ColumnDataProperties.class);
|
||||
final ListStore<ColumnData> storeComboUnionColumn = new ListStore<ColumnData>(
|
||||
propsUnionColumn.id());
|
||||
|
||||
final ComboBox<ColumnData> comboUnionColumn = new ComboBox<ColumnData>(
|
||||
storeComboUnionColumn, propsUnionColumn.label());
|
||||
comboUnionColumn.setItemId(itemIdUnionColumn);
|
||||
|
||||
Log.debug("ComboUnionColumn created");
|
||||
|
||||
comboUnionColumn.disable();
|
||||
comboUnionColumn.setEmptyText("Select a column...");
|
||||
comboUnionColumn.setWidth(COMBOWIDTH);
|
||||
comboUnionColumn.setEditable(false);
|
||||
comboUnionColumn.setTriggerAction(TriggerAction.ALL);
|
||||
|
||||
final IconButton btnAdd = new IconButton();
|
||||
btnAdd.setItemId(itemIdBtnAdd);
|
||||
btnAdd.setIcon(UnionResourceBundle.INSTANCE.add());
|
||||
btnAdd.addClickHandler(new ClickHandler() {
|
||||
|
||||
public void onClick(ClickEvent event) {
|
||||
Log.debug("Clicked btnAdd");
|
||||
addColumnMap();
|
||||
thisPanel.forceLayout();
|
||||
vert.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
btnAdd.setVisible(true);
|
||||
|
||||
final IconButton btnDel = new IconButton();
|
||||
btnDel.setItemId(itemIdBtnDel);
|
||||
btnDel.setIcon(UnionResourceBundle.INSTANCE.delete());
|
||||
btnDel.addClickHandler(new ClickHandler() {
|
||||
|
||||
public void onClick(ClickEvent event) {
|
||||
Log.debug("Clicked btnDel");
|
||||
vert.remove(horiz);
|
||||
if (vert.getWidgetCount() == 0) {
|
||||
setColumnMap();
|
||||
} else {
|
||||
|
||||
}
|
||||
thisPanel.forceLayout();
|
||||
vert.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
btnDel.setVisible(false);
|
||||
|
||||
comboSourceColumn
|
||||
.addSelectionHandler(new SelectionHandler<ColumnData>() {
|
||||
|
||||
@Override
|
||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||
comboUnionColumn.reset();
|
||||
comboUnionColumn.clear();
|
||||
storeComboUnionColumn.clear();
|
||||
storeComboUnionColumn.commitChanges();
|
||||
ColumnData selectedSourceColumn = event
|
||||
.getSelectedItem();
|
||||
|
||||
updateStoreComboUnionColumn(selectedSourceColumn,
|
||||
storeComboUnionColumn);
|
||||
|
||||
storeComboUnionColumn.commitChanges();
|
||||
comboUnionColumn.redraw();
|
||||
comboUnionColumn.enable();
|
||||
forceLayout();
|
||||
}
|
||||
});
|
||||
|
||||
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||
horiz.setPack(BoxLayoutPack.START);
|
||||
|
||||
// horiz.add(columnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(comboSourceColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(comboUnionColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(btnDel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
|
||||
vert.add(horiz);
|
||||
}
|
||||
|
||||
protected void addColumnMap() {
|
||||
|
||||
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||
|
||||
// Column Label
|
||||
/*
|
||||
* TextField columnLabel = new TextField();
|
||||
* columnLabel.setItemId(itemIdLabelColumn);
|
||||
* columnLabel.setAllowBlank(false);
|
||||
* columnLabel.setWidth(COLUMNLABELWIDTH);
|
||||
*/
|
||||
|
||||
// Source Combo
|
||||
ColumnDataProperties propsSourceColumn = GWT
|
||||
.create(ColumnDataProperties.class);
|
||||
ListStore<ColumnData> storeComboSourceColumn = new ListStore<ColumnData>(
|
||||
propsSourceColumn.id());
|
||||
storeComboSourceColumn.addAll(sourceColumns);
|
||||
|
||||
final ComboBox<ColumnData> comboSourceColumn = new ComboBox<ColumnData>(
|
||||
storeComboSourceColumn, propsSourceColumn.label());
|
||||
comboSourceColumn.setItemId(itemIdSourceColumn);
|
||||
|
||||
Log.debug("ComboSourceColumn created");
|
||||
|
||||
comboSourceColumn.setEmptyText("Select a column...");
|
||||
comboSourceColumn.setWidth(COMBOWIDTH);
|
||||
comboSourceColumn.setEditable(false);
|
||||
comboSourceColumn.setTriggerAction(TriggerAction.ALL);
|
||||
|
||||
// Union Combo
|
||||
ColumnDataProperties propsUnionColumn = GWT
|
||||
.create(ColumnDataProperties.class);
|
||||
final ListStore<ColumnData> storeComboUnionColumn = new ListStore<ColumnData>(
|
||||
propsUnionColumn.id());
|
||||
|
||||
final ComboBox<ColumnData> comboUnionColumn = new ComboBox<ColumnData>(
|
||||
storeComboUnionColumn, propsUnionColumn.label());
|
||||
comboUnionColumn.setItemId(itemIdUnionColumn);
|
||||
|
||||
Log.debug("ComboUnionColumn created");
|
||||
|
||||
comboUnionColumn.disable();
|
||||
comboUnionColumn.setEmptyText("Select a column...");
|
||||
comboUnionColumn.setWidth(COMBOWIDTH);
|
||||
comboUnionColumn.setEditable(false);
|
||||
comboUnionColumn.setTriggerAction(TriggerAction.ALL);
|
||||
|
||||
final IconButton btnAdd = new IconButton();
|
||||
btnAdd.setItemId(itemIdBtnAdd);
|
||||
btnAdd.setIcon(UnionResourceBundle.INSTANCE.add());
|
||||
btnAdd.addClickHandler(new ClickHandler() {
|
||||
|
||||
public void onClick(ClickEvent event) {
|
||||
Log.debug("Clicked btnAdd");
|
||||
addColumnMap();
|
||||
thisPanel.forceLayout();
|
||||
vert.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
btnAdd.setVisible(true);
|
||||
|
||||
final IconButton btnDel = new IconButton();
|
||||
btnDel.setItemId(itemIdBtnDel);
|
||||
btnDel.setIcon(UnionResourceBundle.INSTANCE.delete());
|
||||
btnDel.addClickHandler(new ClickHandler() {
|
||||
|
||||
public void onClick(ClickEvent event) {
|
||||
Log.debug("Clicked btnDel");
|
||||
vert.remove(horiz);
|
||||
if (vert.getWidgetCount() == 0) {
|
||||
setColumnMap();
|
||||
} else {
|
||||
|
||||
}
|
||||
thisPanel.forceLayout();
|
||||
vert.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
btnDel.setVisible(true);
|
||||
|
||||
comboSourceColumn
|
||||
.addSelectionHandler(new SelectionHandler<ColumnData>() {
|
||||
|
||||
@Override
|
||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||
comboUnionColumn.reset();
|
||||
comboUnionColumn.clear();
|
||||
storeComboUnionColumn.clear();
|
||||
storeComboUnionColumn.commitChanges();
|
||||
|
||||
ColumnData selectedSourceColumn = event
|
||||
.getSelectedItem();
|
||||
|
||||
updateStoreComboUnionColumn(selectedSourceColumn,
|
||||
storeComboUnionColumn);
|
||||
|
||||
storeComboUnionColumn.commitChanges();
|
||||
comboUnionColumn.redraw();
|
||||
comboUnionColumn.enable();
|
||||
}
|
||||
});
|
||||
|
||||
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||
horiz.setPack(BoxLayoutPack.START);
|
||||
|
||||
// horiz.add(columnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(comboSourceColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(comboUnionColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
horiz.add(btnDel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||
|
||||
vert.add(horiz);
|
||||
}
|
||||
|
||||
protected void updateStoreComboUnionColumn(ColumnData selectedSourceColumn,
|
||||
ListStore<ColumnData> storeComboUnionColumn) {
|
||||
for (ColumnData col : unionColumns) {
|
||||
if (selectedSourceColumn.getTypeCode().compareTo(
|
||||
ColumnTypeCode.DIMENSION.toString()) == 0) {
|
||||
if (col.getTypeCode().compareTo(
|
||||
ColumnTypeCode.DIMENSION.toString()) == 0) {
|
||||
RelationshipData sourceRelData = selectedSourceColumn
|
||||
.getRelationship();
|
||||
RelationshipData colRelData = col.getRelationship();
|
||||
if (sourceRelData != null
|
||||
&& colRelData != null
|
||||
&& sourceRelData.getTargetTableId() != null
|
||||
&& colRelData.getTargetTableId() != null
|
||||
&& sourceRelData.getTargetTableId().compareTo(
|
||||
colRelData.getTargetTableId()) == 0) {
|
||||
storeComboUnionColumn.add(col);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
if (selectedSourceColumn.getTypeCode().compareTo(
|
||||
ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
if (col.getTypeCode().compareTo(
|
||||
ColumnTypeCode.TIMEDIMENSION.toString()) == 0) {
|
||||
RelationshipData sourceRelData = selectedSourceColumn
|
||||
.getRelationship();
|
||||
RelationshipData colRelData = col.getRelationship();
|
||||
|
||||
if (sourceRelData != null
|
||||
&& colRelData != null
|
||||
&& sourceRelData.getTargetTableId() != null
|
||||
&& colRelData.getTargetTableId() != null
|
||||
&& sourceRelData.getTargetTableId().compareTo(
|
||||
colRelData.getTargetTableId()) == 0
|
||||
&& selectedSourceColumn.getPeriodDataType()
|
||||
.compareTo(col.getPeriodDataType()) == 0) {
|
||||
storeComboUnionColumn.add(col);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
if (selectedSourceColumn.getDataTypeName().compareTo(
|
||||
ColumnDataType.Text.toString()) == 0
|
||||
|| col.getDataTypeName().compareTo(
|
||||
ColumnDataType.Text.toString()) == 0) {
|
||||
storeComboUnionColumn.add(col);
|
||||
} else {
|
||||
if ((col.getDataTypeName().compareTo(
|
||||
ColumnDataType.Integer.toString()) == 0 && selectedSourceColumn
|
||||
.getDataTypeName().compareTo(
|
||||
ColumnDataType.Numeric.toString()) == 0)
|
||||
|| (col.getDataTypeName().compareTo(
|
||||
ColumnDataType.Numeric.toString()) == 0 && selectedSourceColumn
|
||||
.getDataTypeName().compareTo(
|
||||
ColumnDataType.Integer
|
||||
.toString()) == 0)) {
|
||||
storeComboUnionColumn.add(col);
|
||||
} else {
|
||||
if (col.getDataTypeName().compareTo(
|
||||
selectedSourceColumn.getDataTypeName()) == 0) {
|
||||
storeComboUnionColumn.add(col);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected ArrayList<UnionColumnsMapping> getSelectedMap() {
|
||||
listUnionColumnsMapping = new ArrayList<UnionColumnsMapping>();
|
||||
|
||||
int lenght = vert.getWidgetCount();
|
||||
int i = 0;
|
||||
for (; i < lenght; i++) {
|
||||
HBoxLayoutContainer h = (HBoxLayoutContainer) vert.getWidget(i);
|
||||
if (h != null) {
|
||||
/*
|
||||
* TextField columnLabelField = (TextField) h
|
||||
* .getItemByItemId(itemIdLabelColumn); if (columnLabelField !=
|
||||
* null) { String columnLabel =
|
||||
* columnLabelField.getCurrentValue(); if (columnLabel != null
|
||||
* && !columnLabel.isEmpty()) {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
ComboBox<ColumnData> comboSourceColumn = (ComboBox<ColumnData>) h
|
||||
.getItemByItemId(itemIdSourceColumn);
|
||||
ColumnData sourceColumn = comboSourceColumn.getCurrentValue();
|
||||
if (sourceColumn != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
ComboBox<ColumnData> comboUnionColumn = (ComboBox<ColumnData>) h
|
||||
.getItemByItemId(itemIdUnionColumn);
|
||||
ColumnData unionColumn = comboUnionColumn.getCurrentValue();
|
||||
if (unionColumn != null) {
|
||||
UnionColumnsMapping colMatch = new UnionColumnsMapping(
|
||||
"default", sourceColumn, unionColumn);
|
||||
listUnionColumnsMapping.add(colMatch);
|
||||
} else {
|
||||
Log.debug("Union Column is null");
|
||||
}
|
||||
} else {
|
||||
Log.debug("Source Column is null");
|
||||
}
|
||||
/*
|
||||
* } else { Log.debug("Column Label is null"); } } else {
|
||||
* Log.debug("Column Label Field is null"); }
|
||||
*/
|
||||
} else {
|
||||
Log.debug("HorizontalContainer is null");
|
||||
}
|
||||
}
|
||||
|
||||
return listUnionColumnsMapping;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
|
||||
import com.google.gwt.editor.client.Editor.Path;
|
||||
import com.sencha.gxt.core.client.ValueProvider;
|
||||
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
||||
import com.sencha.gxt.data.shared.PropertyAccess;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public interface TabResourcesProperties extends PropertyAccess<TabResource> {
|
||||
|
||||
@Path("id")
|
||||
ModelKeyProvider<TabResource> id();
|
||||
|
||||
ValueProvider<TabResource, String> name();
|
||||
ValueProvider<TabResource, String> tabResourceType();
|
||||
ValueProvider<TabResource, String> agency();
|
||||
ValueProvider<TabResource, String> date();
|
||||
ValueProvider<TabResource, String> tableTypeName();
|
||||
ValueProvider<TabResource, String> ownerLogin();
|
||||
|
||||
}
|
|
@ -1,284 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
||||
import com.sencha.gxt.widget.core.client.box.ConfirmMessageBox;
|
||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
||||
|
||||
public class TabResourcesSelectionCard extends WizardCard {
|
||||
protected UnionSession unionSession;
|
||||
protected TabResourcesSelectionCard thisCard;
|
||||
protected TabResourcesSelectionPanel tabResourcesSelectionPanel;
|
||||
protected TabResource selectedTabResource = null;
|
||||
|
||||
public TabResourcesSelectionCard(final UnionSession unionSession) {
|
||||
super("Select Tabular Resource for Union", "");
|
||||
Log.debug("TabResourcesSelectionCard");
|
||||
this.unionSession = unionSession;
|
||||
thisCard = this;
|
||||
|
||||
tabResourcesSelectionPanel = new TabResourcesSelectionPanel(thisCard,
|
||||
res);
|
||||
|
||||
tabResourcesSelectionPanel
|
||||
.addSelectionHandler(new SelectionHandler<TabResource>() {
|
||||
|
||||
public void onSelection(SelectionEvent<TabResource> event) {
|
||||
unionSession
|
||||
.setUnionTabularResource(tabResourcesSelectionPanel
|
||||
.getSelectedItem());
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
setContent(tabResourcesSelectionPanel);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
Log.debug("TabResourcesSelectionCard Call Setup ");
|
||||
Command sayNextCard = new Command() {
|
||||
|
||||
public void execute() {
|
||||
Log.debug("TabResourcesSelectionCard Call sayNextCard");
|
||||
retrieveLastTable();
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
getWizardWindow().setNextButtonCommand(sayNextCard);
|
||||
|
||||
Command sayPreviousCard = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
getWizardWindow().previousCard();
|
||||
getWizardWindow().removeCard(thisCard);
|
||||
Log.debug("Remove TabResourcesSelectionCard");
|
||||
} catch (Exception e) {
|
||||
Log.error("sayPreviousCard :" + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
|
||||
}
|
||||
|
||||
protected void retrieveLastTable() {
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
|
||||
TDGWTServiceAsync.INSTANCE.getLastTable(unionSession
|
||||
.getUnionTabularResource().getTrId(),
|
||||
new AsyncCallback<TableData>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.debug("Attention",
|
||||
"This tabular resource does not have a valid table");
|
||||
AlertMessageBox d = new AlertMessageBox("Attention",
|
||||
"This tabular resource does not have a valid table");
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
public void onHide(HideEvent event) {
|
||||
deleteTRWithLastTableNull();
|
||||
|
||||
}
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(TableData result) {
|
||||
Log.debug("Retrieve last table: " + result);
|
||||
updateConnectedTRInfo(result);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void deleteTRWithLastTableNull() {
|
||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
||||
"Would you like to delete this tabular resource without table?");
|
||||
/*Next in GXT 3.1.1 */
|
||||
|
||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||
|
||||
@Override
|
||||
public void onDialogHide(DialogHideEvent event) {
|
||||
switch (event.getHideButton()) {
|
||||
case NO:
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
break;
|
||||
case YES:
|
||||
callDeleteLastTable();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
/* GXT 3.0.1
|
||||
mb.addHideHandler(new HideHandler() {
|
||||
public void onHide(HideEvent event) {
|
||||
|
||||
if (mb.getHideButton() == mb.getButtonById(PredefinedButton.YES
|
||||
|
||||
.name())) {
|
||||
callDeleteLastTable();
|
||||
|
||||
} else if (mb.getHideButton() == mb
|
||||
.getButtonById(PredefinedButton.NO.name())) {
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});*/
|
||||
mb.setWidth(300);
|
||||
mb.show();
|
||||
|
||||
}
|
||||
|
||||
protected void callDeleteLastTable() {
|
||||
Log.debug("Delete TR:"
|
||||
+ unionSession.getUnionTabularResource().getTrId());
|
||||
TDGWTServiceAsync.INSTANCE.removeTabularResource(unionSession
|
||||
.getUnionTabularResource().getTrId(),
|
||||
new AsyncCallback<Void>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
} else {
|
||||
|
||||
AlertMessageBox d = new AlertMessageBox(
|
||||
"Error",
|
||||
"Error on delete TabResource: "
|
||||
+ caught.getLocalizedMessage());
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
public void onHide(HideEvent event) {
|
||||
getWizardWindow().setEnableNextButton(
|
||||
true);
|
||||
getWizardWindow().setEnableBackButton(
|
||||
true);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onSuccess(Void result) {
|
||||
tabResourcesSelectionPanel.gridReload();
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
protected void updateConnectedTRInfo(TableData table) {
|
||||
TabResource tabResource = unionSession.getUnionTabularResource();
|
||||
tabResource.setTrId(table.getTrId());
|
||||
unionSession.setUnionTabularResource(tabResource);
|
||||
Log.debug("UnionSession: " + unionSession);
|
||||
retriveCurrentTabularResourceInfo();
|
||||
}
|
||||
|
||||
protected void retriveCurrentTabularResourceInfo() {
|
||||
TDGWTServiceAsync.INSTANCE.getTabResourceInformation(
|
||||
unionSession.getTrId(), new AsyncCallback<TabResource>() {
|
||||
|
||||
public void onSuccess(TabResource result) {
|
||||
Log.info("Retrived TR: " + result.getTrId());
|
||||
unionSession.setCurrentTabularResource(result);
|
||||
goNext();
|
||||
}
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
} else {
|
||||
UtilsGXT3
|
||||
.alert("Error",
|
||||
"Error retrienving information on current tabular resource: ");
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
protected void goNext() {
|
||||
try {
|
||||
Log.info("NextCard ColumnMappingCard");
|
||||
ColumnMappingCard columnSelectionCard = new ColumnMappingCard(
|
||||
unionSession);
|
||||
getWizardWindow().addCard(columnSelectionCard);
|
||||
getWizardWindow().nextCard();
|
||||
} catch (Throwable e) {
|
||||
Log.error("goNext: " + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,396 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundle;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||
import com.google.gwt.event.dom.client.KeyUpEvent;
|
||||
import com.google.gwt.event.dom.client.KeyUpHandler;
|
||||
import com.google.gwt.event.logical.shared.HasSelectionHandlers;
|
||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sencha.gxt.core.client.IdentityValueProvider;
|
||||
import com.sencha.gxt.core.client.Style.SelectionMode;
|
||||
import com.sencha.gxt.data.client.loader.RpcProxy;
|
||||
import com.sencha.gxt.data.shared.ListStore;
|
||||
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
||||
import com.sencha.gxt.data.shared.Store;
|
||||
import com.sencha.gxt.data.shared.Store.StoreFilter;
|
||||
import com.sencha.gxt.data.shared.loader.ListLoadConfig;
|
||||
import com.sencha.gxt.data.shared.loader.ListLoadResult;
|
||||
import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
|
||||
import com.sencha.gxt.data.shared.loader.ListLoader;
|
||||
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
||||
import com.sencha.gxt.widget.core.client.ContentPanel;
|
||||
import com.sencha.gxt.widget.core.client.box.ConfirmMessageBox;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.DialogHideEvent.DialogHideHandler;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||
import com.sencha.gxt.widget.core.client.form.TextField;
|
||||
import com.sencha.gxt.widget.core.client.grid.CheckBoxSelectionModel;
|
||||
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
||||
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||
import com.sencha.gxt.widget.core.client.menu.Item;
|
||||
import com.sencha.gxt.widget.core.client.menu.Menu;
|
||||
import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
||||
import com.sencha.gxt.widget.core.client.toolbar.LabelToolItem;
|
||||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||
|
||||
public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||
HasSelectionHandlers<TabResource> {
|
||||
|
||||
private static final TabResourcesProperties properties = GWT
|
||||
.create(TabResourcesProperties.class);
|
||||
|
||||
protected static final ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.name(), 90, "Name");
|
||||
protected static final ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.tabResourceType(), 30, "Type");
|
||||
protected static final ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.tableTypeName(), 30, "Table Type");
|
||||
protected static final ColumnConfig<TabResource, String> agencyColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.agency(), 60, "Agency");
|
||||
protected static final ColumnConfig<TabResource, String> ownerColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.ownerLogin(), 70, "Owner");
|
||||
protected static final ColumnConfig<TabResource, String> dateColumn = new ColumnConfig<TabResource, String>(
|
||||
properties.date(), 50, "Creation Date");
|
||||
|
||||
protected Grid<TabResource> grid;
|
||||
protected ResourceBundle res;
|
||||
protected Menu contextMenu;
|
||||
|
||||
private TabResource removableTR;
|
||||
|
||||
private WizardCard parent;
|
||||
|
||||
public TabResourcesSelectionPanel(WizardCard parent, ResourceBundle res) {
|
||||
this.res = res;
|
||||
this.parent = parent;
|
||||
Log.debug("TabResourcesSelectionPanel");
|
||||
init();
|
||||
try {
|
||||
createContextMenu();
|
||||
} catch (Throwable e) {
|
||||
Log.debug("Error In CreateContextMenu:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
buildPanel(properties.id(),
|
||||
Arrays.<ColumnConfig<TabResource, ?>> asList(nameColumn,typeColumn,
|
||||
tableTypeNameColumn, ownerColumn, agencyColumn, dateColumn),
|
||||
nameColumn);
|
||||
|
||||
} catch (Throwable e) {
|
||||
Log.debug("Error building panel:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
setHeaderVisible(false);
|
||||
// new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
||||
|
||||
}
|
||||
|
||||
protected void buildPanel(ModelKeyProvider<TabResource> keyProvider,
|
||||
List<ColumnConfig<TabResource, ?>> columns,
|
||||
ColumnConfig<TabResource, ?> autoexpandColumn) {
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(new LabelToolItem("Search: "));
|
||||
final TextField searchField = new TextField();
|
||||
toolBar.add(searchField);
|
||||
|
||||
TextButton btnReload = new TextButton();
|
||||
// btnReload.setText("Reload");
|
||||
btnReload.setIcon(res.refresh16());
|
||||
btnReload.setToolTip("Reload");
|
||||
toolBar.add(btnReload);
|
||||
|
||||
IdentityValueProvider<TabResource> identity = new IdentityValueProvider<TabResource>();
|
||||
final CheckBoxSelectionModel<TabResource> sm = new CheckBoxSelectionModel<TabResource>(
|
||||
identity);
|
||||
|
||||
ColumnModel<TabResource> cm = new ColumnModel<TabResource>(columns);
|
||||
|
||||
final ExtendedListStore<TabResource> store = new ExtendedListStore<TabResource>(
|
||||
keyProvider);
|
||||
|
||||
searchField.addKeyUpHandler(new KeyUpHandler() {
|
||||
|
||||
public void onKeyUp(KeyUpEvent event) {
|
||||
Log.trace("searchTerm: " + searchField.getCurrentValue());
|
||||
store.applyFilters();
|
||||
}
|
||||
});
|
||||
|
||||
store.addFilter(new StoreFilter<TabResource>() {
|
||||
|
||||
public boolean select(Store<TabResource> store, TabResource parent,
|
||||
TabResource item) {
|
||||
String searchTerm = searchField.getCurrentValue();
|
||||
if (searchTerm == null)
|
||||
return true;
|
||||
return TabResourcesSelectionPanel.this.select(item, searchTerm);
|
||||
}
|
||||
});
|
||||
|
||||
store.setEnableFilters(true);
|
||||
|
||||
RpcProxy<ListLoadConfig, ListLoadResult<TabResource>> proxy = new RpcProxy<ListLoadConfig, ListLoadResult<TabResource>>() {
|
||||
|
||||
public void load(ListLoadConfig loadConfig,
|
||||
final AsyncCallback<ListLoadResult<TabResource>> callback) {
|
||||
loadData(loadConfig, callback);
|
||||
}
|
||||
};
|
||||
final ListLoader<ListLoadConfig, ListLoadResult<TabResource>> loader = new ListLoader<ListLoadConfig, ListLoadResult<TabResource>>(
|
||||
proxy);
|
||||
|
||||
loader.setRemoteSort(false);
|
||||
loader.addLoadHandler(new LoadResultListStoreBinding<ListLoadConfig, TabResource, ListLoadResult<TabResource>>(
|
||||
store));
|
||||
|
||||
grid = new Grid<TabResource>(store, cm) {
|
||||
@Override
|
||||
protected void onAfterFirstAttach() {
|
||||
super.onAfterFirstAttach();
|
||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||
public void execute() {
|
||||
loader.load();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
sm.setSelectionMode(SelectionMode.SINGLE);
|
||||
grid.setLoader(loader);
|
||||
grid.setSelectionModel(sm);
|
||||
grid.getView().setAutoExpandColumn(autoexpandColumn);
|
||||
grid.getView().setStripeRows(true);
|
||||
grid.getView().setColumnLines(true);
|
||||
grid.getView().setAutoFill(true);
|
||||
grid.setBorders(false);
|
||||
grid.setLoadMask(true);
|
||||
grid.setColumnReordering(true);
|
||||
|
||||
SelectHandler sh = new SelectHandler() {
|
||||
public void onSelect(SelectEvent event) {
|
||||
loader.load();
|
||||
}
|
||||
};
|
||||
|
||||
btnReload.addSelectHandler(sh);
|
||||
|
||||
if (contextMenu != null) {
|
||||
grid.setContextMenu(contextMenu);
|
||||
} else
|
||||
grid.setContextMenu(null);
|
||||
|
||||
VerticalLayoutContainer con = new VerticalLayoutContainer();
|
||||
con.add(toolBar, new VerticalLayoutData(1, -1));
|
||||
con.add(grid, new VerticalLayoutData(1, 1));
|
||||
setWidget(con);
|
||||
}
|
||||
|
||||
protected void createContextMenu() {
|
||||
contextMenu = new Menu();
|
||||
MenuItem deleteTRItem = new MenuItem("Delete");
|
||||
deleteTRItem.setId("DeleteTR");
|
||||
deleteTRItem
|
||||
.setIcon(org.gcube.portlets.user.td.unionwizardwidget.client.resources.UnionResourceBundle.INSTANCE
|
||||
.delete());
|
||||
deleteTRItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||
|
||||
@Override
|
||||
public void onSelection(SelectionEvent<Item> event) {
|
||||
if (grid != null) {
|
||||
TabResource tabResource = getSelectedItem();
|
||||
deleteTR(tabResource);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
contextMenu.add(deleteTRItem);
|
||||
|
||||
}
|
||||
|
||||
protected boolean select(TabResource item, String searchTerm) {
|
||||
if (item.getName() != null
|
||||
&& item.getName().toLowerCase()
|
||||
.contains(searchTerm.toLowerCase()))
|
||||
return true;
|
||||
if (item.getTableTypeName() != null
|
||||
&& item.getTableTypeName().toLowerCase()
|
||||
.contains(searchTerm.toLowerCase()))
|
||||
return true;
|
||||
if (item.getAgency() != null
|
||||
&& item.getAgency().toLowerCase()
|
||||
.contains(searchTerm.toLowerCase()))
|
||||
return true;
|
||||
if (item.getDate() != null
|
||||
&& item.getDate().toLowerCase()
|
||||
.contains(searchTerm.toLowerCase()))
|
||||
return true;
|
||||
if (item.getOwnerLogin() != null
|
||||
&& item.getOwnerLogin().toLowerCase()
|
||||
.contains(searchTerm.toLowerCase()))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void loadData(ListLoadConfig loadConfig,
|
||||
final AsyncCallback<ListLoadResult<TabResource>> callback) {
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getTabularResources(new AsyncCallback<ArrayList<TabResource>>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
parent.getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.debug("Error retrieving tabular resource: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error!",
|
||||
"Error retrieving tabular resources on server!");
|
||||
}
|
||||
callback.onFailure(caught);
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<TabResource> result) {
|
||||
Log.debug("loaded " + result.size()
|
||||
+ " TabularResources");
|
||||
callback.onSuccess(new ListLoadResultBean<TabResource>(
|
||||
result));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public HandlerRegistration addSelectionHandler(
|
||||
SelectionHandler<TabResource> handler) {
|
||||
return grid.getSelectionModel().addSelectionHandler(handler);
|
||||
}
|
||||
|
||||
public TabResource getSelectedItem() {
|
||||
return grid.getSelectionModel().getSelectedItem();
|
||||
}
|
||||
|
||||
protected class ExtendedListStore<M> extends ListStore<M> {
|
||||
|
||||
public ExtendedListStore(ModelKeyProvider<? super M> keyProvider) {
|
||||
super(keyProvider);
|
||||
}
|
||||
|
||||
public void applyFilters() {
|
||||
super.applyFilters();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void gridReload() {
|
||||
grid.getLoader().load();
|
||||
}
|
||||
|
||||
protected void deleteTR(TabResource tabResource) {
|
||||
removableTR = tabResource;
|
||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
||||
"Would you like to delete this tabular resource?");
|
||||
|
||||
/*Next in GXT 3.1.1 */
|
||||
|
||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||
|
||||
@Override
|
||||
public void onDialogHide(DialogHideEvent event) {
|
||||
switch (event.getHideButton()) {
|
||||
case NO:
|
||||
break;
|
||||
case YES:
|
||||
callDeleteTabularResource();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/* GXT 3.0.1
|
||||
mb.addHideHandler(new HideHandler() {
|
||||
public void onHide(HideEvent event) {
|
||||
|
||||
|
||||
if (mb.getHideButton() == mb.getButtonById(PredefinedButton.YES
|
||||
.name())) {
|
||||
callDeleteTabularResource();
|
||||
} else if (mb.getHideButton() == mb
|
||||
.getButtonById(PredefinedButton.NO.name())) {
|
||||
// perform NO action
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
mb.setWidth(300);
|
||||
mb.show();
|
||||
|
||||
}
|
||||
|
||||
protected void callDeleteTabularResource() {
|
||||
Log.debug("Delete TR:" + removableTR);
|
||||
TDGWTServiceAsync.INSTANCE.removeTabularResource(removableTR.getTrId(),
|
||||
new AsyncCallback<Void>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
parent.getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error on delete TabResource: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error on delete TabResource: "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onSuccess(Void result) {
|
||||
gridReload();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,292 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayoutAlign;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class UnionOperationInProgressCard extends WizardCard implements
|
||||
MonitorDialogListener {
|
||||
|
||||
protected UnionOperationInProgressCard thisCard;
|
||||
protected UnionSession unionSession;
|
||||
protected TRId newTrId;
|
||||
protected HtmlLayoutContainer resultField;
|
||||
|
||||
public UnionOperationInProgressCard(final UnionSession unionSession) {
|
||||
super("Operation In Progress", "");
|
||||
|
||||
this.unionSession = unionSession;
|
||||
thisCard = this;
|
||||
|
||||
VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
|
||||
operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
|
||||
|
||||
final FlexTable description = new FlexTable();
|
||||
description.setCellSpacing(10);
|
||||
description.setCellPadding(4);
|
||||
description.setBorderWidth(0);
|
||||
|
||||
description.setHTML(0, 0,
|
||||
"<span style=\"font-weight:bold;\";>Union with: </span>");
|
||||
description.setText(0, 1, unionSession.getUnionTabularResource()
|
||||
.getName());
|
||||
description.setHTML(1, 0,
|
||||
"<span style=\"font-weight:bold;\";>Type: </span>");
|
||||
description.setText(1, 1, unionSession.getUnionTabularResource()
|
||||
.getTableTypeName());
|
||||
|
||||
description.setHTML(2, 0,
|
||||
"<span style=\"font-weight:bold;\";>Owner: </span>");
|
||||
description.setText(2, 1, unionSession.getUnionTabularResource()
|
||||
.getOwnerLogin());
|
||||
|
||||
FramedPanel summary = new FramedPanel();
|
||||
summary.setHeadingText("Union Summary");
|
||||
summary.setWidth(400);
|
||||
summary.add(description);
|
||||
operationInProgressPanel.add(summary, new BoxLayoutData(new Margins(20,
|
||||
5, 10, 5)));
|
||||
|
||||
resultField = new HtmlLayoutContainer("<div></div>");
|
||||
|
||||
operationInProgressPanel.add(resultField, new BoxLayoutData(
|
||||
new Margins(10, 5, 10, 5)));
|
||||
|
||||
setCenterWidget(operationInProgressPanel, new MarginData(0));
|
||||
resultField.setVisible(false);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void startUnion() {
|
||||
TDGWTServiceAsync.INSTANCE.startUnion(unionSession,
|
||||
new AsyncCallback<String>() {
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
openMonitorDialog(taskId);
|
||||
|
||||
}
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
showErrorAndHide("Error Locked",
|
||||
caught.getLocalizedMessage(), "",
|
||||
caught);
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
showErrorAndHide("Error Final",
|
||||
caught.getLocalizedMessage(), "",
|
||||
caught);
|
||||
} else {
|
||||
showErrorAndHide("Error in Union",
|
||||
"An error occured in union.",
|
||||
caught.getLocalizedMessage(),
|
||||
caught);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
getWizardWindow().setEnableBackButton(false);
|
||||
setBackButtonVisible(false);
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setNextButtonToFinish();
|
||||
startUnion();
|
||||
}
|
||||
|
||||
//
|
||||
protected void openMonitorDialog(String taskId) {
|
||||
MonitorDialog monitorDialog = new MonitorDialog(taskId, getEventBus());
|
||||
monitorDialog.addProgressDialogListener(this);
|
||||
monitorDialog.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationComplete(OperationResult operationResult) {
|
||||
newTrId = operationResult.getTrId();
|
||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||
safeHtmlBuilder
|
||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold; color:#009900;'>Operation Completed</div>");
|
||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||
resultField.setVisible(true);
|
||||
Command sayComplete = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
getWizardWindow().close(false);
|
||||
Log.info("fire Complete: " + newTrId);
|
||||
|
||||
getWizardWindow().fireCompleted(newTrId);
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.error("fire Complete :" + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getWizardWindow().setNextButtonCommand(sayComplete);
|
||||
|
||||
setNextButtonVisible(true);
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationFailed(Throwable caught, String reason, String details) {
|
||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||
safeHtmlBuilder
|
||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color:red;'>Operation Failed</div>");
|
||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||
resultField.setVisible(true);
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
getEventBus()
|
||||
.fireEvent(
|
||||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
showErrorAndHide("Error in Union", reason, details, caught);
|
||||
|
||||
}
|
||||
forceLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationStopped(OperationResult operationResult, String reason, String details) {
|
||||
newTrId = operationResult.getTrId();
|
||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||
safeHtmlBuilder
|
||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #FF9900;'>Problems in the Operation</div>");
|
||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||
resultField.setVisible(true);
|
||||
|
||||
Command sayComplete = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
getWizardWindow().close(false);
|
||||
Log.info("fire Complete: tabular resource "
|
||||
+ newTrId.getId());
|
||||
Log.info("fire Complete: tableId " + newTrId.getTableId());
|
||||
|
||||
getWizardWindow().fireCompleted(newTrId);
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.error("fire Complete :" + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getWizardWindow().setNextButtonCommand(sayComplete);
|
||||
|
||||
setNextButtonVisible(true);
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
forceLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationAborted() {
|
||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||
safeHtmlBuilder
|
||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #AA00AA;'>Operation Aborted</div>");
|
||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||
resultField.setVisible(true);
|
||||
|
||||
Command sayComplete = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
getWizardWindow().close(false);
|
||||
Log.info("fire Aborted");
|
||||
|
||||
getWizardWindow().fireAborted();
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.error("fire Aborted :" + e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getWizardWindow().setNextButtonCommand(sayComplete);
|
||||
|
||||
setNextButtonVisible(true);
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operationPutInBackground() {
|
||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||
safeHtmlBuilder
|
||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #00AAAA;'>Operation in Background</div>");
|
||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||
resultField.setVisible(true);
|
||||
|
||||
Command sayComplete = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
getWizardWindow().close(false);
|
||||
Log.info("fire Operation In Background");
|
||||
|
||||
getWizardWindow().firePutInBackground();
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.error("fire Operation In Background :"
|
||||
+ e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getWizardWindow().setNextButtonCommand(sayComplete);
|
||||
|
||||
setNextButtonVisible(true);
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
forceLayout();
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class UnionWizardTD extends WizardWindow {
|
||||
protected static final int WITHWIZARD = 800;
|
||||
protected static final int HEIGHTWIZARD = 520;
|
||||
|
||||
protected UnionSession unionSession;
|
||||
protected TRId trId;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param trId
|
||||
* @param title
|
||||
* @param eventBus
|
||||
*/
|
||||
public UnionWizardTD(TRId trId, String title, EventBus eventBus) {
|
||||
super(title, eventBus);
|
||||
Log.debug("UnionWizardTD: " + trId);
|
||||
setWidth(WITHWIZARD);
|
||||
setHeight(HEIGHTWIZARD);
|
||||
|
||||
this.trId = trId;
|
||||
unionSession = new UnionSession();
|
||||
unionSession.setTrId(trId);
|
||||
|
||||
TabResourcesSelectionCard tabResourcesSelection = new TabResourcesSelectionCard(
|
||||
unionSession);
|
||||
addCard(tabResourcesSelection);
|
||||
tabResourcesSelection.setup();
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class UnionWizardTDEntry implements EntryPoint {
|
||||
|
||||
public void onModuleLoad() {
|
||||
TRId trId=new TRId();
|
||||
SimpleEventBus eventBus=new SimpleEventBus();
|
||||
UnionWizardTD unionWizard= new UnionWizardTD(trId, "Union",eventBus);
|
||||
Log.info(unionWizard.getId());
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<!-- file: ./IconButton.html -->
|
||||
<div class="{style.iconButton}">
|
||||
<div class="{style.iconButtonImage}"></div>
|
||||
</div>
|
|
@ -1,51 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client.custom;
|
||||
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.dom.client.HasClickHandlers;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.sencha.gxt.core.client.dom.XDOM;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
import com.sencha.gxt.widget.core.client.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class IconButton extends Component implements HasClickHandlers {
|
||||
|
||||
private IconButtonAppearance appearance;
|
||||
|
||||
public IconButton() {
|
||||
this((IconButtonAppearance) GWT.create(IconButtonAppearanceDefault.class));
|
||||
}
|
||||
|
||||
public IconButton(IconButtonAppearance appearance) {
|
||||
this.appearance = appearance;
|
||||
|
||||
SafeHtmlBuilder sb = new SafeHtmlBuilder();
|
||||
this.appearance.render(sb);
|
||||
|
||||
XElement element=XDOM.create(sb.toSafeHtml());
|
||||
setElement((Element)element);
|
||||
|
||||
sinkEvents(Event.ONCLICK);
|
||||
}
|
||||
|
||||
public HandlerRegistration addClickHandler(ClickHandler handler) {
|
||||
return addDomHandler(handler, ClickEvent.getType());
|
||||
}
|
||||
|
||||
|
||||
public void setIcon(ImageResource icon) {
|
||||
appearance.onUpdateIcon(getElement(), icon);
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client.custom;
|
||||
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public interface IconButtonAppearance {
|
||||
void render(SafeHtmlBuilder sb);
|
||||
void onUpdateIcon(XElement parent, ImageResource icon);
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client.custom;
|
||||
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.safehtml.shared.SafeHtml;
|
||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.sencha.gxt.core.client.XTemplates;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class IconButtonAppearanceDefault implements IconButtonAppearance {
|
||||
|
||||
public interface Template extends XTemplates {
|
||||
@XTemplate(source = "IconButton.html")
|
||||
SafeHtml template(IconButtonStyle style);
|
||||
}
|
||||
|
||||
public interface IconButtonStyle extends CssResource {
|
||||
@ClassName("iconButton")
|
||||
public String getIconButton();
|
||||
|
||||
@ClassName("iconButtonImage")
|
||||
public String getIconButtonImage();
|
||||
|
||||
@ClassName("iconButtonRef")
|
||||
public String getIconButtonRef();
|
||||
|
||||
}
|
||||
|
||||
private final IconButtonStyle style;
|
||||
private final Template template;
|
||||
|
||||
public interface IconButtonResources extends ClientBundle {
|
||||
public static final IconButtonResources INSTANCE = GWT.create(IconButtonResources.class);
|
||||
|
||||
@Source("IconButtonStyle.css")
|
||||
IconButtonStyle style();
|
||||
}
|
||||
|
||||
public IconButtonAppearanceDefault() {
|
||||
this(IconButtonResources.INSTANCE);
|
||||
}
|
||||
|
||||
public IconButtonAppearanceDefault(IconButtonResources resources) {
|
||||
this.style = resources.style();
|
||||
this.style.ensureInjected();
|
||||
|
||||
this.template = GWT.create(Template.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void onUpdateIcon(XElement parent, ImageResource icon) {
|
||||
XElement element = parent.selectNode("." + style.getIconButtonImage());
|
||||
Image image=new Image(icon);
|
||||
Element img=image.getElement();
|
||||
img.setClassName(style.getIconButtonRef());
|
||||
element.appendChild(img);
|
||||
|
||||
}
|
||||
|
||||
public void render(SafeHtmlBuilder sb) {
|
||||
sb.append(template.template(style));
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
.iconButton {
|
||||
border: none;
|
||||
font-size: 12px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.iconButton .iconButtonImage {
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
.iconButtonRef {
|
||||
vertical-align: center;
|
||||
cursor: pointer;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client.properties;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
|
||||
import com.google.gwt.editor.client.Editor.Path;
|
||||
import com.sencha.gxt.data.shared.LabelProvider;
|
||||
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
||||
import com.sencha.gxt.data.shared.PropertyAccess;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public interface ColumnDataProperties extends
|
||||
PropertyAccess<ColumnData> {
|
||||
|
||||
@Path("id")
|
||||
ModelKeyProvider<ColumnData> id();
|
||||
|
||||
LabelProvider<ColumnData> label();
|
||||
|
||||
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.unionwizardwidget.client.resources;
|
||||
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public interface UnionCSS extends CssResource {
|
||||
|
||||
@ClassName("wizard-title")
|
||||
public String getWizardTitle();
|
||||
|
||||
@ClassName("wizard-footer")
|
||||
public String getWizardFooter();
|
||||
|
||||
@ClassName("source-selection-hover")
|
||||
public String getSourceSelectionHover();
|
||||
|
||||
@ClassName("column-excluded")
|
||||
public String getColumnExcluded();
|
||||
|
||||
@ClassName("importSelection-sources")
|
||||
public String getImportSelectionSources();
|
||||
|
||||
@ClassName("importSelection-source")
|
||||
public String getImportSelectionSource();
|
||||
|
||||
@ClassName("sdmxRegistryUrlStyle")
|
||||
public String getSDMXRegistryUrlStyle();
|
||||
|
||||
@ClassName("sdmxRegistryUrlInputStyle")
|
||||
public String getSDMXRegistryUrlInputStyle();
|
||||
|
||||
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client.resources;
|
||||
|
||||
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
|
||||
public interface UnionResourceBundle extends ClientBundle {
|
||||
|
||||
public static final UnionResourceBundle INSTANCE=GWT.create(UnionResourceBundle.class);
|
||||
|
||||
@Source("UnionWizardTD.css")
|
||||
UnionCSS unionCss();
|
||||
|
||||
@Source("arrow-refresh.png")
|
||||
ImageResource refresh();
|
||||
|
||||
@Source("arrow-refresh_16.png")
|
||||
ImageResource refresh_16();
|
||||
|
||||
@Source("arrow-refresh_32.png")
|
||||
ImageResource refresh32();
|
||||
|
||||
@Source("accept.png")
|
||||
ImageResource csvCheckSuccess();
|
||||
|
||||
@Source("error.png")
|
||||
ImageResource csvCheckFailure();
|
||||
|
||||
@Source("loading.gif")
|
||||
ImageResource loading();
|
||||
|
||||
@Source("information.png")
|
||||
ImageResource information();
|
||||
|
||||
@Source("add.png")
|
||||
ImageResource add();
|
||||
|
||||
@Source("add_32.png")
|
||||
ImageResource add32();
|
||||
|
||||
@Source("delete.png")
|
||||
ImageResource delete();
|
||||
|
||||
@Source("delete_32.png")
|
||||
ImageResource delete32();
|
||||
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
|
||||
.wizard-title {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
font-size: small;
|
||||
background-color: #C3D9FF;
|
||||
}
|
||||
|
||||
.wizard-footer {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
font-size: small;
|
||||
text-align: right;
|
||||
background-color: #CDEB8B
|
||||
}
|
||||
|
||||
.source-selection-hover:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.column-excluded {
|
||||
background-color: #e6e0da !important;
|
||||
color: #bfa698;
|
||||
}
|
||||
|
||||
.importSelection-sources {
|
||||
padding: 30px;
|
||||
display: block;
|
||||
margin-top: 20px;
|
||||
|
||||
}
|
||||
|
||||
.importSelection-source {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.sdmxRegistryUrlStyle {
|
||||
padding-top:5px;
|
||||
}
|
||||
|
||||
.sdmxRegistryUrlInputStyle {
|
||||
width:300px!important;
|
||||
}
|
||||
|
||||
|
||||
input#sdmxRegistryUrlInputFieldId-input {
|
||||
width:300px!important;
|
||||
}
|
Before Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 984 B |
Before Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 962 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 771 B |
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module rename-to='UnionWizardTD'>
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<!-- We need the JUnit module in the main module, -->
|
||||
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
||||
<inherits name='com.google.gwt.junit.JUnit' />
|
||||
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
<inherits name='com.google.gwt.user.theme.standard.Standard' />
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
|
||||
<!-- Other module inherits -->
|
||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
|
||||
<inherits name='org.gcube.portlets.user.td.wizardwidget.Wizard' />
|
||||
<inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
|
||||
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<!-- <entry-point class='org.gcube.portlets.user.SDMXImportWizardTD.client.SDMXImportWizardTDEntry' /> -->
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
<!-- <source path='org.gcube.data.analysis.tabulardata.operation.worker'/> -->
|
||||
|
||||
</module>
|
|
@ -1,2 +0,0 @@
|
|||
sendButton = Send
|
||||
nameField = Enter your name
|
|
@ -1,2 +0,0 @@
|
|||
sendButton = Envoyer
|
||||
nameField = Entrez votre nom
|
|
@ -1,4 +0,0 @@
|
|||
<!-- file: ./IconButton.html -->
|
||||
<div class="{style.iconButton}">
|
||||
<div class="{style.iconButtonImage}"></div>
|
||||
</div>
|
|
@ -1,17 +0,0 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
.iconButton {
|
||||
border: none;
|
||||
font-size: 12px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.iconButton .iconButtonImage {
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
.iconButtonRef {
|
||||
vertical-align: center;
|
||||
cursor: pointer;
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
|
||||
.wizard-title {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
font-size: small;
|
||||
background-color: #C3D9FF;
|
||||
}
|
||||
|
||||
.wizard-footer {
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
font-size: small;
|
||||
text-align: right;
|
||||
background-color: #CDEB8B
|
||||
}
|
||||
|
||||
.source-selection-hover:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.column-excluded {
|
||||
background-color: #e6e0da !important;
|
||||
color: #bfa698;
|
||||
}
|
||||
|
||||
.importSelection-sources {
|
||||
padding: 30px;
|
||||
display: block;
|
||||
margin-top: 20px;
|
||||
|
||||
}
|
||||
|
||||
.importSelection-source {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.sdmxRegistryUrlStyle {
|
||||
padding-top:5px;
|
||||
}
|
||||
|
||||
.sdmxRegistryUrlInputStyle {
|
||||
width:300px!important;
|
||||
}
|
||||
|
||||
|
||||
input#sdmxRegistryUrlInputFieldId-input {
|
||||
width:300px!important;
|
||||
}
|
Before Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 984 B |
Before Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 962 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 771 B |
|
@ -1,34 +0,0 @@
|
|||
/** Add css rules here for your application. */
|
||||
|
||||
|
||||
/** Example rules used by the template application (remove for your app) */
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #777777;
|
||||
margin: 40px 0px 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sendButton {
|
||||
display: block;
|
||||
font-size: 16pt;
|
||||
}
|
||||
|
||||
/** Most GWT widgets already have a style name defined */
|
||||
.gwt-DialogBox {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.dialogVPanel {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.serverResponseLabelError {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/** Set ids using widget.getElement().setId("idOfElement") */
|
||||
#closeButton {
|
||||
margin: 15px 6px 6px;
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
<!doctype html>
|
||||
<!-- The DOCTYPE declaration above will set the -->
|
||||
<!-- browser's rendering engine into -->
|
||||
<!-- "Standards Mode". Replacing this declaration -->
|
||||
<!-- with a "Quirks Mode" doctype may lead to some -->
|
||||
<!-- differences in layout. -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<!-- -->
|
||||
<!-- Consider inlining CSS to reduce the number of requested files -->
|
||||
<!-- -->
|
||||
<link type="text/css" rel="stylesheet" href="UnionWizardTD.css">
|
||||
|
||||
<!-- -->
|
||||
<!-- Any title is fine -->
|
||||
<!-- -->
|
||||
<title>Web Application Starter Project</title>
|
||||
|
||||
<!-- -->
|
||||
<!-- This script loads your compiled module. -->
|
||||
<!-- If you add any GWT meta tags, they must -->
|
||||
<!-- be added before this line. -->
|
||||
<!-- -->
|
||||
<script type="text/javascript" language="javascript" src="UnionWizardTD/UnionWizardTD.nocache.js"></script>
|
||||
</head>
|
||||
|
||||
<!-- -->
|
||||
<!-- The body can have arbitrary html, or -->
|
||||
<!-- you can leave the body empty if you want -->
|
||||
<!-- to create a completely dynamic UI. -->
|
||||
<!-- -->
|
||||
<body>
|
||||
|
||||
<!-- OPTIONAL: include this if you want history support -->
|
||||
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
|
||||
|
||||
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
|
||||
<noscript>
|
||||
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
|
||||
Your web browser must have JavaScript enabled
|
||||
in order for this application to display correctly.
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<h1>Web Application Starter Project</h1>
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td colspan="2" style="font-weight:bold;">Please enter your name:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="nameFieldContainer"></td>
|
||||
<td id="sendButtonContainer"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="color:red;" id="errorLabelContainer"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE web-app
|
||||
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
|
||||
<!-- Servlets -->
|
||||
<servlet>
|
||||
<servlet-name>TDGWTService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>jUnitHostImpl</servlet-name>
|
||||
<servlet-class>com.google.gwt.junit.server.JUnitHostImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Servlets Mapping -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>TDGWTService</servlet-name>
|
||||
<url-pattern>tdgwtservice/TDGWTService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>jUnitHostImpl</servlet-name>
|
||||
<url-pattern>UnionWizardWidgets/junithost/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Default page to serve -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>UnionWizardTD.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
|
@ -1,82 +0,0 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTService;
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.junit.client.GWTTestCase;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.rpc.ServiceDefTarget;
|
||||
|
||||
/**
|
||||
* GWT JUnit <b>integration</b> tests must extend GWTTestCase.
|
||||
* Using <code>"GwtTest*"</code> naming pattern exclude them from running with
|
||||
* surefire during the test phase.
|
||||
*
|
||||
* If you run the tests using the Maven command line, you will have to
|
||||
* navigate with your browser to a specific url given by Maven.
|
||||
* See http://mojo.codehaus.org/gwt-maven-plugin/user-guide/testing.html
|
||||
* for details.
|
||||
*/
|
||||
public class GwtTestUnionWizardTD extends GWTTestCase {
|
||||
|
||||
/**
|
||||
* Must refer to a valid module that sources this class.
|
||||
*/
|
||||
public String getModuleName() {
|
||||
return "org.gcube.portlets.user.unionwizardwidget.UnionWizardTDJUnit";
|
||||
}
|
||||
|
||||
/**
|
||||
* This test will send a request to the server
|
||||
*/
|
||||
public void testResource() {
|
||||
// Create the service that we will test.
|
||||
TDGWTServiceAsync tdGWTService = GWT.create(TDGWTService.class);
|
||||
ServiceDefTarget target = (ServiceDefTarget) tdGWTService;
|
||||
System.out.println(GWT.getModuleBaseURL() + "TDGWTService");
|
||||
target.setServiceEntryPoint(GWT.getModuleBaseURL() + "TDGWTService");
|
||||
|
||||
// Since RPC calls are asynchronous, we will need to wait for a response
|
||||
// after this test method returns. This line tells the test runner to wait
|
||||
// up to 7 seconds before timing out.
|
||||
delayTestFinish(7000);
|
||||
|
||||
// Send a request to the server.
|
||||
tdGWTService.getTabularResources(new AsyncCallback<ArrayList<TabResource>>() {
|
||||
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
// The request resulted in an unexpected error.
|
||||
fail("Request failure: " + caught.getMessage());
|
||||
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<TabResource> result) {
|
||||
// Shows the first three resources.
|
||||
int i=0;
|
||||
for(TabResource tr:result){
|
||||
i++;
|
||||
System.out.println(tr.toString());
|
||||
if(i>3){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assertTrue(result.size()>0);
|
||||
|
||||
// Now that we have received a response, we need to tell the test runner
|
||||
// that the test is complete. You must call finishTest() after an
|
||||
// asynchronous test finishes successfully, or the test will time out.
|
||||
finishTest();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module rename-to="UnionWizardTDJUnit">
|
||||
<!-- Inherit our applications main module. -->
|
||||
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
|
||||
|
||||
<!-- Specify the path to any remote services. -->
|
||||
<servlet path="/TDGWTService"
|
||||
class="org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl" />
|
||||
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
</module>
|
|
@ -1,6 +0,0 @@
|
|||
gCube System - License
|
||||
------------------------------------------------------------
|
||||
|
||||
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
|
||||
The software and documentation is provided by its authors/distributors "as is" and no expressed or
|
||||
implied warranty is given for its use, quality or fitness for a particular case.
|
|
@ -1 +0,0 @@
|
|||
Giancarlo Panichi (giancarlo.panichi@isti.cnr.it), CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
|
|
@ -1,48 +0,0 @@
|
|||
The gCube System - ${name}
|
||||
------------------------------------------------------------
|
||||
|
||||
This work has been supported by the following European projects: iMarine (FP7-INFRASTRUCTURES-2011-2)
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
Giancarlo Panichi (giancarlo.panichi@isti.cnr.it), CNR Pisa,
|
||||
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
|
||||
|
||||
|
||||
Version and Release Date
|
||||
------------------------
|
||||
|
||||
v. ${version} (${release.date})
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
${project.description}
|
||||
|
||||
|
||||
Download information
|
||||
--------------------
|
||||
Source code is available from SVN:
|
||||
${scm.url}
|
||||
|
||||
Binaries can be downloaded from:
|
||||
http://software.d4science.research-infrastructures.eu/
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
${project.description}
|
||||
|
||||
Documentation is available on-line from the Projects Documentation Wiki:
|
||||
${wikiurl}
|
||||
|
||||
|
||||
Licensing
|
||||
---------
|
||||
|
||||
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="${groupId}.${artifactId}.1-2-0" date="2015-02-16">
|
||||
<Change>Updated to GWT 2.6.1</Change>
|
||||
<Change>Updated to GXT 3.1.1</Change>
|
||||
<Change>Fixed Creation Date in TabResourcesSelectionPanel [issue #3149]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="${groupId}.${artifactId}.1-1-0"
|
||||
date="2014-10-31">
|
||||
<Change>Added flows</Change>
|
||||
<Change>Fixed Final and Lock error</Change>
|
||||
</Changeset>
|
||||
<Changeset component="${groupId}.${artifactId}.1-0-0"
|
||||
date="2014-09-12">
|
||||
<Change>First Release</Change>
|
||||
</Changeset>
|
||||
</ReleaseNotes>
|
|
@ -1,39 +0,0 @@
|
|||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>servicearchive</id>
|
||||
<formats>
|
||||
<format>tar.gz</format>
|
||||
</formats>
|
||||
<baseDirectory>/</baseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${distroDirectory}</directory>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
<useDefaultExcludes>true</useDefaultExcludes>
|
||||
<includes>
|
||||
<include>README</include>
|
||||
<include>LICENSE</include>
|
||||
<include>INSTALL</include>
|
||||
<include>MAINTAINERS</include>
|
||||
<include>changelog.xml</include>
|
||||
</includes>
|
||||
<fileMode>755</fileMode>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<files>
|
||||
<file>
|
||||
<source>${distroDirectory}/svnpath.txt</source>
|
||||
<outputDirectory>/${artifactId}</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${configDirectory}/profile.xml</source>
|
||||
<outputDirectory>/</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>target/${build.finalName}.${packaging}</source>
|
||||
<outputDirectory>/${artifactId}</outputDirectory>
|
||||
</file>
|
||||
</files>
|
||||
</assembly>
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Resource>
|
||||
<ID></ID>
|
||||
<Type>Service</Type>
|
||||
<Profile>
|
||||
<Description>${project.description}</Description>
|
||||
<Class>PortletsUser</Class>
|
||||
<Name>${project.name}</Name>
|
||||
<Version>${version}</Version>
|
||||
<Packages>
|
||||
<Software>
|
||||
<Description>${project.description}</Description>
|
||||
<Name>${project.name}</Name>
|
||||
<Version>${version}</Version>
|
||||
<MavenCoordinates>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</MavenCoordinates>
|
||||
<Type>library</Type>
|
||||
<Files>
|
||||
<File>${project.build.finalName}.${project.packaging}</File>
|
||||
</Files>
|
||||
</Software>
|
||||
</Packages>
|
||||
</Profile>
|
||||
</Resource>
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
${scm.url}
|