From 14761e9c50cf0c2885e3dc1ece07aeaaee2450be Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Sat, 14 Feb 2015 10:13:24 +0000 Subject: [PATCH] Release 3.6.0 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-unionwizard-widget@112094 82a268e6-3cf1-43bd-a215-b396298e98cf --- 1.2/UnionWizardTD.launch | 16 + 1.2/pom.xml | 312 ++++++++++ .../unionwizardwidget/UnionWizardTD.gwt.xml | 33 + .../client/ColumnMappingCard.java | 100 +++ .../client/ColumnMappingPanel.java | 587 ++++++++++++++++++ .../client/TabResourcesProperties.java | 28 + .../client/TabResourcesSelectionCard.java | 284 +++++++++ .../client/TabResourcesSelectionPanel.java | 396 ++++++++++++ .../client/UnionOperationInProgressCard.java | 292 +++++++++ .../client/UnionWizardTD.java | 46 ++ .../client/UnionWizardTDEntry.java | 23 + .../client/custom/IconButton.html | 4 + .../client/custom/IconButton.java | 51 ++ .../client/custom/IconButtonAppearance.java | 16 + .../custom/IconButtonAppearanceDefault.java | 75 +++ .../client/custom/IconButtonStyle.css | 17 + .../properties/ColumnDataProperties.java | 25 + .../client/resources/UnionCSS.java | 41 ++ .../client/resources/UnionResourceBundle.java | 51 ++ .../client/resources/UnionWizardTD.css | 54 ++ .../client/resources/accept.png | Bin 0 -> 781 bytes .../client/resources/add.png | Bin 0 -> 660 bytes .../client/resources/add_32.png | Bin 0 -> 1486 bytes .../client/resources/arrow-refresh.png | Bin 0 -> 984 bytes .../client/resources/arrow-refresh_16.png | Bin 0 -> 572 bytes .../client/resources/arrow-refresh_32.png | Bin 0 -> 1182 bytes .../client/resources/codelistmapping.png | Bin 0 -> 962 bytes .../client/resources/codelistmapping_32.png | Bin 0 -> 2160 bytes .../client/resources/delete.png | Bin 0 -> 614 bytes .../client/resources/delete_32.png | Bin 0 -> 1360 bytes .../client/resources/error.png | Bin 0 -> 701 bytes .../client/resources/information.png | Bin 0 -> 778 bytes .../client/resources/loading.gif | Bin 0 -> 771 bytes .../unionwizardwidget/UnionWizardTD.gwt.xml | 33 + .../client/Messages.properties | 2 + .../client/Messages_fr.properties | 2 + .../client/custom/IconButton.html | 4 + .../client/custom/IconButtonStyle.css | 17 + .../client/resources/UnionWizardTD.css | 54 ++ .../client/resources/accept.png | Bin 0 -> 781 bytes .../client/resources/add.png | Bin 0 -> 660 bytes .../client/resources/add_32.png | Bin 0 -> 1486 bytes .../client/resources/arrow-refresh.png | Bin 0 -> 984 bytes .../client/resources/arrow-refresh_16.png | Bin 0 -> 572 bytes .../client/resources/arrow-refresh_32.png | Bin 0 -> 1182 bytes .../client/resources/codelistmapping.png | Bin 0 -> 962 bytes .../client/resources/codelistmapping_32.png | Bin 0 -> 2160 bytes .../client/resources/delete.png | Bin 0 -> 614 bytes .../client/resources/delete_32.png | Bin 0 -> 1360 bytes .../client/resources/error.png | Bin 0 -> 701 bytes .../client/resources/information.png | Bin 0 -> 778 bytes .../client/resources/loading.gif | Bin 0 -> 771 bytes 1.2/src/main/webapp/UnionWizardTD.css | 34 + 1.2/src/main/webapp/UnionWizardTD.html | 63 ++ 1.2/src/main/webapp/WEB-INF/web.xml | 40 ++ .../client/GwtTestUnionWizardTD.java | 82 +++ .../UnionWizardTDJUnit.gwt.xml | 13 + 1.2/templates/INSTALL | 0 1.2/templates/LICENSE | 6 + 1.2/templates/MAINTAINERS | 1 + 1.2/templates/README | 48 ++ 1.2/templates/changelog.xml | 16 + 1.2/templates/descriptor.xml | 39 ++ 1.2/templates/profile.xml | 29 + 1.2/templates/svnpath.txt | 1 + 65 files changed, 2935 insertions(+) create mode 100644 1.2/UnionWizardTD.launch create mode 100644 1.2/pom.xml create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingCard.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingPanel.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesProperties.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionCard.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionPanel.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionOperationInProgressCard.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTD.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTDEntry.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearance.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearanceDefault.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/properties/ColumnDataProperties.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionCSS.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionResourceBundle.java create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/accept.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/add.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/add_32.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh_16.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh_32.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping_32.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/delete.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/delete_32.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/error.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/information.png create mode 100644 1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/loading.gif create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages.properties create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages_fr.properties create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/accept.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/add.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/add_32.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh_16.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh_32.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping_32.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/delete.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/delete_32.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/error.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/information.png create mode 100644 1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/loading.gif create mode 100644 1.2/src/main/webapp/UnionWizardTD.css create mode 100644 1.2/src/main/webapp/UnionWizardTD.html create mode 100644 1.2/src/main/webapp/WEB-INF/web.xml create mode 100644 1.2/src/test/java/org/gcube/portlets/user/td/unionwizardwidget/client/GwtTestUnionWizardTD.java create mode 100644 1.2/src/test/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTDJUnit.gwt.xml create mode 100644 1.2/templates/INSTALL create mode 100644 1.2/templates/LICENSE create mode 100644 1.2/templates/MAINTAINERS create mode 100644 1.2/templates/README create mode 100644 1.2/templates/changelog.xml create mode 100644 1.2/templates/descriptor.xml create mode 100644 1.2/templates/profile.xml create mode 100644 1.2/templates/svnpath.txt diff --git a/1.2/UnionWizardTD.launch b/1.2/UnionWizardTD.launch new file mode 100644 index 0000000..908caf4 --- /dev/null +++ b/1.2/UnionWizardTD.launch @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/1.2/pom.xml b/1.2/pom.xml new file mode 100644 index 0000000..4682f5a --- /dev/null +++ b/1.2/pom.xml @@ -0,0 +1,312 @@ + + + + + maven-parent + org.gcube.tools + 1.0.0 + + + + + 4.0.0 + org.gcube.portlets.user + tabular-data-unionwizard-widget + 1.2.0-SNAPSHOT + + tabular-data-unionwizard-widget + tabular-data-unionwizard-widget allows the union of tabular resources + + + https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-unionwizard-widget + + + + + Giancarlo Panichi + g.panichi@isti.cnr.it + CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" + + architect + developer + + + + + + ${project.basedir}/distro + ${project.build.directory}/${project.build.finalName} + 2015-02-16 + https://gcube.wiki.gcube-system.org/gcube/index.php + templates + distro + config + + 2.6.1 + 3.3.2 + 3.1.1 + + ${env.KEYS} + + UTF-8 + UTF-8 + + + + + localRun + + + org.slf4j + slf4j-api + compile + + + ch.qos.logback + logback-classic + 1.0.1 + runtime + + + + + + + + + com.google.gwt + gwt-servlet + ${gwtVersion} + + + com.google.gwt + gwt-user + ${gwtVersion} + + + + junit + junit + 4.8.1 + test + + + javax.validation + validation-api + 1.0.0.GA + test + + + javax.validation + validation-api + 1.0.0.GA + sources + test + + + + com.sencha.gxt + gxt + ${gxtVersion} + + + + + + + org.gcube.portlets.user + tabular-data-gwt-service + [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT) + provided + + + + + org.gcube.portlets.user + tabular-data-widget-common-event + [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + provided + + + + + org.gcube.portlets.user + tabular-data-monitor-widget + [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + provided + + + + + + org.gcube.portlets.user + tabular-data-wizard-widget + [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + provided + + + + + + com.allen-sauer.gwt.log + gwt-log + ${gwtLogVersion} + provided + + + + org.slf4j + slf4j-api + + + + + + + + + + ${webappDirectory}/WEB-INF/classes + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.16 + + true + + + + + org.apache.maven.surefire + surefire-junit47 + 2.16 + + + + + + + org.codehaus.mojo + gwt-maven-plugin + ${gwtVersion} + + + + resources + + + + + UnionWizardTD.html + ${webappDirectory} + org.gcube.portlets.user.td.unionwizardwidget.UnionWizardTD + + + + + + maven-resources-plugin + 2.6 + + + copy-profile + process-resources + + copy-resources + + + ${configDirectory} + + + ${templatesDirectory} + + profile.xml + + true + + + + + + copy-distro-resources + process-resources + + copy-resources + + + ${distroDirectory} + + + ${templatesDirectory} + + profile.xml + descriptor.xml + + true + + + + + + + + maven-clean-plugin + 2.5 + + + + ${distroDirectory} + + ** + + false + + + ${configDirectory} + + ** + + false + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2 + + + ${templatesDirectory}/descriptor.xml + + + + + servicearchive + package + + single + + + + + + + + + + + + + org.gcube.distribution + maven-portal-bom + LATEST + pom + import + + + + diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml new file mode 100644 index 0000000..7f2ef90 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingCard.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingCard.java new file mode 100644 index 0000000..595fadd --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingCard.java @@ -0,0 +1,100 @@ +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 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(); + } + } + +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingPanel.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingPanel.java new file mode 100644 index 0000000..fbce402 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/ColumnMappingPanel.java @@ -0,0 +1,587 @@ +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: g.panichi@isti.cnr.it + * + */ +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 sourceColumns; + protected ArrayList unionColumns; + protected ResizeContainer thisPanel; + + protected HashMap columnMap; + protected ArrayList 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>() { + + @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 result) { + sourceColumns = result; + retrieveUnionColumns(); + + } + }); + + } + + private void retrieveUnionColumns() { + TRId trId = parent.unionSession.getUnionTabularResource().getTrId(); + TDGWTServiceAsync.INSTANCE.getColumns(trId, + new AsyncCallback>() { + + @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 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 storeComboSourceColumn = new ListStore( + propsSourceColumn.id()); + storeComboSourceColumn.addAll(sourceColumns); + + final ComboBox comboSourceColumn = new ComboBox( + 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 storeComboUnionColumn = new ListStore( + propsUnionColumn.id()); + + final ComboBox comboUnionColumn = new ComboBox( + 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() { + + @Override + public void onSelection(SelectionEvent 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 storeComboSourceColumn = new ListStore( + propsSourceColumn.id()); + storeComboSourceColumn.addAll(sourceColumns); + + final ComboBox comboSourceColumn = new ComboBox( + 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 storeComboUnionColumn = new ListStore( + propsUnionColumn.id()); + + final ComboBox comboUnionColumn = new ComboBox( + 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() { + + @Override + public void onSelection(SelectionEvent 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 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 getSelectedMap() { + listUnionColumnsMapping = new ArrayList(); + + 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 comboSourceColumn = (ComboBox) h + .getItemByItemId(itemIdSourceColumn); + ColumnData sourceColumn = comboSourceColumn.getCurrentValue(); + if (sourceColumn != null) { + @SuppressWarnings("unchecked") + ComboBox comboUnionColumn = (ComboBox) 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; + + } + +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesProperties.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesProperties.java new file mode 100644 index 0000000..533f85e --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesProperties.java @@ -0,0 +1,28 @@ +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" + * g.panichi@isti.cnr.it + * + */ +public interface TabResourcesProperties extends PropertyAccess { + + @Path("id") + ModelKeyProvider id(); + + ValueProvider name(); + ValueProvider tabResourceType(); + ValueProvider agency(); + ValueProvider date(); + ValueProvider tableTypeName(); + ValueProvider ownerLogin(); + +} \ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionCard.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionCard.java new file mode 100644 index 0000000..3ba5530 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionCard.java @@ -0,0 +1,284 @@ +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() { + + public void onSelection(SelectionEvent 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() { + + @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() { + + 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() { + + 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()); + } + } + +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionPanel.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionPanel.java new file mode 100644 index 0000000..4dca5fd --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/TabResourcesSelectionPanel.java @@ -0,0 +1,396 @@ +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 { + + private static final TabResourcesProperties properties = GWT + .create(TabResourcesProperties.class); + + protected static final ColumnConfig nameColumn = new ColumnConfig( + properties.name(), 90, "Name"); + protected static final ColumnConfig typeColumn = new ColumnConfig( + properties.tabResourceType(), 30, "Type"); + protected static final ColumnConfig tableTypeNameColumn = new ColumnConfig( + properties.tableTypeName(), 30, "Table Type"); + protected static final ColumnConfig agencyColumn = new ColumnConfig( + properties.agency(), 60, "Agency"); + protected static final ColumnConfig ownerColumn = new ColumnConfig( + properties.ownerLogin(), 70, "Owner"); + protected static final ColumnConfig dateColumn = new ColumnConfig( + properties.date(), 50, "Creation Date"); + + protected Grid 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.> 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 keyProvider, + List> columns, + ColumnConfig 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 identity = new IdentityValueProvider(); + final CheckBoxSelectionModel sm = new CheckBoxSelectionModel( + identity); + + ColumnModel cm = new ColumnModel(columns); + + final ExtendedListStore store = new ExtendedListStore( + keyProvider); + + searchField.addKeyUpHandler(new KeyUpHandler() { + + public void onKeyUp(KeyUpEvent event) { + Log.trace("searchTerm: " + searchField.getCurrentValue()); + store.applyFilters(); + } + }); + + store.addFilter(new StoreFilter() { + + public boolean select(Store store, TabResource parent, + TabResource item) { + String searchTerm = searchField.getCurrentValue(); + if (searchTerm == null) + return true; + return TabResourcesSelectionPanel.this.select(item, searchTerm); + } + }); + + store.setEnableFilters(true); + + RpcProxy> proxy = new RpcProxy>() { + + public void load(ListLoadConfig loadConfig, + final AsyncCallback> callback) { + loadData(loadConfig, callback); + } + }; + final ListLoader> loader = new ListLoader>( + proxy); + + loader.setRemoteSort(false); + loader.addLoadHandler(new LoadResultListStoreBinding>( + store)); + + grid = new Grid(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() { + + @Override + public void onSelection(SelectionEvent 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> callback) { + TDGWTServiceAsync.INSTANCE + .getTabularResources(new AsyncCallback>() { + + 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 result) { + Log.debug("loaded " + result.size() + + " TabularResources"); + callback.onSuccess(new ListLoadResultBean( + result)); + } + }); + } + + public HandlerRegistration addSelectionHandler( + SelectionHandler handler) { + return grid.getSelectionModel().addSelectionHandler(handler); + } + + public TabResource getSelectedItem() { + return grid.getSelectionModel().getSelectedItem(); + } + + protected class ExtendedListStore extends ListStore { + + public ExtendedListStore(ModelKeyProvider 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() { + + 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(); + } + + }); + } +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionOperationInProgressCard.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionOperationInProgressCard.java new file mode 100644 index 0000000..e0ffe7c --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionOperationInProgressCard.java @@ -0,0 +1,292 @@ +/** + * + */ +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" g.panichi@isti.cnr.it + * + */ +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, + "Union with: "); + description.setText(0, 1, unionSession.getUnionTabularResource() + .getName()); + description.setHTML(1, 0, + "Type: "); + description.setText(1, 1, unionSession.getUnionTabularResource() + .getTableTypeName()); + + description.setHTML(2, 0, + "Owner: "); + 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("
"); + + 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() { + + 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("
Operation Completed
"); + 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("
Operation Failed
"); + 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("
Problems in the Operation
"); + 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("
Operation Aborted
"); + 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("
Operation in Background
"); + 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(); + + } + +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTD.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTD.java new file mode 100644 index 0000000..56b97c1 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTD.java @@ -0,0 +1,46 @@ +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: g.panichi@isti.cnr.it + * + */ +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(); + + } + +} \ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTDEntry.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTDEntry.java new file mode 100644 index 0000000..c0cb6dc --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/UnionWizardTDEntry.java @@ -0,0 +1,23 @@ +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: g.panichi@isti.cnr.it + * + */ +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()); + } +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html new file mode 100644 index 0000000..9b36b96 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html @@ -0,0 +1,4 @@ + +
+
+
\ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java new file mode 100644 index 0000000..8d6d6dd --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java @@ -0,0 +1,51 @@ +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" + * g.panichi@isti.cnr.it + * + */ +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); + } +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearance.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearance.java new file mode 100644 index 0000000..15ea2ce --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearance.java @@ -0,0 +1,16 @@ +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" + * g.panichi@isti.cnr.it + * + */ +public interface IconButtonAppearance { + void render(SafeHtmlBuilder sb); + void onUpdateIcon(XElement parent, ImageResource icon); +} \ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearanceDefault.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearanceDefault.java new file mode 100644 index 0000000..e2cbb4f --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonAppearanceDefault.java @@ -0,0 +1,75 @@ +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" + * g.panichi@isti.cnr.it + * + */ +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)); + } +} \ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css new file mode 100644 index 0000000..98ef72c --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css @@ -0,0 +1,17 @@ +@CHARSET "UTF-8"; + +.iconButton { + border: none; + font-size: 12px; + margin: 0px; + padding: 0px; +} + +.iconButton .iconButtonImage { + vertical-align: center; +} + +.iconButtonRef { + vertical-align: center; + cursor: pointer; +} \ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/properties/ColumnDataProperties.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/properties/ColumnDataProperties.java new file mode 100644 index 0000000..b0d059d --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/properties/ColumnDataProperties.java @@ -0,0 +1,25 @@ +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" + * g.panichi@isti.cnr.it + * + */ +public interface ColumnDataProperties extends + PropertyAccess { + + @Path("id") + ModelKeyProvider id(); + + LabelProvider label(); + + +} \ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionCSS.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionCSS.java new file mode 100644 index 0000000..24b2844 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionCSS.java @@ -0,0 +1,41 @@ +/** + * + */ +package org.gcube.portlets.user.td.unionwizardwidget.client.resources; + +import com.google.gwt.resources.client.CssResource; + +/** + * + * @author "Giancarlo Panichi" + * g.panichi@isti.cnr.it + * + */ +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(); + + +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionResourceBundle.java b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionResourceBundle.java new file mode 100644 index 0000000..df77749 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionResourceBundle.java @@ -0,0 +1,51 @@ +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(); + +} + \ No newline at end of file diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css new file mode 100644 index 0000000..553fd48 --- /dev/null +++ b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css @@ -0,0 +1,54 @@ +@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; +} diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/accept.png b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/accept.png new file mode 100644 index 0000000000000000000000000000000000000000..89c8129a490b329f3165f32fa0781701aab417ea GIT binary patch literal 781 zcmV+o1M>WdP)4-QibtN)VXQDpczE`xXAkUjh%RI>;okxb7K@0kpyQ1k_Y(|Oe7$m(^ zNYX>mI||sUbmn+c3<&FnE=4u#()KBS^SH8e)Qs5i!#lY=$-1gbH6VluzU=m=EP78&5vQ z-?+fFP-G2l&l_QzYealK$;1Rl?FkzXR&Jv@fBPNjCr#AYRyJ7UJQ0v#?)7Ott=>3`#-pV!7>9}>Q1jL)H6h&gkP@3nI=+F3nA~M>u#(n* z8T!#8oEw&-mED4!h4s!N@Jo3S7N&Q6%6l3}nlcd~X@>;uelvPsSkXIgg~e+^T1zSf z3SNj(5%jK~i8@b;CcG#j=lT?7W*brGf@qBq@y z5p)_O=zq}>(yA({d#@RIbBT0)V!(h&BJ*f z&iDJA=ldM^PiVUn{quhBW=2^=R z)$H+6<){G#YZ;woeTmQU59@|u4!^m&{CE#R?_6NWf$QP9!vmVtYU4*XPTE)p6ctt{ zb>$5hhRO3!k5nr2d+^;z_(_qVf8OsEd3&Vy=tXx{W{GEFpcE*D+KMQ}!HOozq=N@< zr&Br1V;@H&x&^?vTzyhF5?LxE1 zM{PUY<(Z=rkey`mWk)gmPx1qAcH==*H(RBoiEa%?Ksg#+? zw}d9*t5$&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paK_N8ef!+0izi#n zZxk*6$ulQsEhvenvl&aIvETnM0RWgeHEU^c#i_;Gj=;Z(m8-)-a!ZQ<0000k}@P)!zsI^oFu^eLtRk2V!i)n@$RxIgIMoHpcTS{|^*cF_{n60zQX00O7z z>L;lelMMptr&pq7df8B*_fWJaiY*;oP)dP9PzVtLg>Z^4+(k#vPQ3ar;+vQ~)45(Q z%?)hdGZ^XK0fLYUv6f5`2nl*rwHNr-y^z|L3d^WEayap3bO(k@ES3CnK z%sca_HH^l7q~U{75O?!B@3jg5!?%v<)3=AEC7_);p%3eJaDM@v$~&2NCw$ld0000< KMNUMnLSTYm0R)}^ literal 0 HcmV?d00001 diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh_32.png b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh_32.png new file mode 100644 index 0000000000000000000000000000000000000000..f3521ea5e0d148384d82c3cba4376972090af7f6 GIT binary patch literal 1182 zcmV;P1Y!G$P)wK~z|UwU%8>TXh)5pK}h{F>r;#a2qh7O*95Kj84sVVF)0>j3^p4 z+l*P3Eir0LTz2J!<8Y-HvXPiwPGd;)!W+UC21FUogb~TIiJNG@z%fz>w6Ox~fS&j9 zq93%-(+`60&1wHVeSgpYJ@0v+Kd?n{?7O!1&HPW@DgiX8zuo<6&LXxPhL`+uFTI{=s0ET(5DM0+0|3RW)->y1X^LMNzi6%mh zaL+wATz6f7fsXz&!@8M(JOGF`TtT(1IvGylVK{`T*(vxJ{dn;3!CC`~#6L%NN;DmK zIVU&(CT!i#wJy1XDI_V6P48>^{5k7tSZfwB&QVyQ zC<>l*Jdrdd@Bi(KG`L7#Ry~jix0l;7Ffw3j$%#WsRW;N-y&q*e%i;qrY#10C`VpZ} zC>&PRnv4}#50B4^H1K>&K1xeUVXv~ovdxk-UA-PRLZJ{K{CfP0@q1}2U%2{A+r%9-)=6PIEb&5ZB7;vIH0S1EyDpq>PZt;Go^ zAoH_9IBZ~fIfVIuAKu9++`M%Q{&_zr{8ym7HGcm0?nF+;x1hQ6C7r_dno0*8d+h*- zD_8r?EqUVsHY^6e(kS|kXxS6Pv;wj44E{B2Z`!N)|MAz8fX!-y)9XwJUlI|okYkES zS6I_N__g!)x4zN&#Z>vT_JW4b4(TFncU0No^t$l#*FO))9Z>% wu`P<6%;?&uqdEm0*?7VK8i&pv(6=hre}=nUJq4NLMgRZ+07*qoM6N<$f|YC_5&!@I literal 0 HcmV?d00001 diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping.png b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping.png new file mode 100644 index 0000000000000000000000000000000000000000..04850798085602bf1ab76d205809493b9f548c1a GIT binary patch literal 962 zcmV;z13mnSP)Px#24YJ`L;yqpc>uk-z}Xl8000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^t) z4*)4J`%>Tl000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0009WNkl4J&g>Z5-~uxx0D0G27kk?*6}CteH^ud;j@atfouq0g64y{TZqFoCC&z}bjr=k6C_u4AUx|elkJ2pn z!q&}DyVqNI_@nOe?3vCJnm;)z!@dgrxu%)M)%kK@yDuHaI=MdL-y%Z3Dv#WS2YibUcIC z>!x)_IYk9I6y@cxdtVi=92@6)wFf&>Mbb`U7Y#8-g7?i6XN|;c@_}U17H@%@R5C*< zt%$(l*e!NFU5RTdOj$BWPG%#b299(#8)&67_jLTp+`Un#?J@(cZx?-iVM3|x(!%ZC z`tGYI?a^GXPJ?#7^OYVsW$DWw|E_yFuG%ec{ba{xZEXv-?B(wq0K9qh%*8j3C+aJV z2)(}^z?_S7E_jGr57nTFxQ1PMa>27wn``pq;I`bDC%0e;z}+UE|3!|2)GwR1$eN3z zz?QC#1qTUv{mi}B&FfE<5*ZH#7r1|lRNK`EoZs10W(OL5#&=i3n#zEnxSR%o$~-yv zgfElrGCwyA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us?*N?#LpU&Gq;s>w9fnZPi z`%{U2r4@*`5s0@9STM3HNy3uE5;o7@J{nC3+G3qY{!*$#sP^5%M`K6&4sy?F z)0j%yw8t&B+%uN^utzD^p{22Q#gfNY96RF*oXmRD`r^SR|4@xuu(eiHA3TBI1dpL% z=%8s@ue3<1u%*JXB{^9hUYS>>hJ-yrDOZ5@%!u-f9~;P*ab^J$bar%z<#UVG(Gw{# zf8_z%5|YN|B(4%5B!|JVx0to!8JnDZaf|Q=?L^$^TvjT zeHRq_M-Ch8GhV*?B6T9}is}Q$i6vbWihx&R{Ky<~LYe}E<2ZD7#ty%&R+ literal 0 HcmV?d00001 diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/delete.png b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..b639afd5cf625c0075bf21cdaa70959b0ffb30bb GIT binary patch literal 614 zcmV-s0-61ZP)li^|sBsmue{0{Byw ztBuLFXhX1BSB%zJAKnmJbqOcqEqc=*0k8m!)&owW6>DX&uJ~V0eSC|PXvK&O0)zmJ zNN*?-K`j+P1nb7*|Bg&wIgMKWjva|$M0&OZFoC~SRo5T72%s>&Uvah#FsBQ}{%}JC zwZ4vj{o)SWMx=7r8WV5FUoB!pK2`q!(KF@T5;}gcrswTqL**>W2)yyN z&+}`ZAHq*|))o8demp0}dUn1jo_e%nk>)O(9kLzgS>ogg)u_u@3$v)7KPtAPtpwdi z@tR_|FJBp5@`lqB&!=iud3I>voU(Y@e7Livxg$j=)>7%PP^7f@m5ndCf-zi9PtMe? zauqUoDq(0CK{1G-2f)A_Fl`~@>FF2lZq1(JFFZax1!6p-|`vdZbV&P)NiOEX0@qUO)&!G*W}c zKfo&!qmjrVNI;{B@gMMpD-w{D5ET-*K}?JSN)4J8Ii=@rSz72}58ZzAzFvH7+0sJ0 z;GI4ex)pvjVty#!d*F9t zjQ%SCs%m0i9cfTFf>Jk2-WG!%D%<;M<4hn=1&AFzSmOnPCknw*hZklhC}34R}d*J1~Wrw zs-%1SNVaz&BclLugEUke{QRd`19TicxW%ZP2STCZ0_N8(!vq2#iXFUO}PKzs9y<~V`jL2T2{n3g6GA-|@IP~m)VvM}iMgg&|C+fFT%(fGQ-1CQWMhe?uY3CDR~^+Ti3p&sEvI5srW;l1!r_s7UvC*`owJ?Z#-W zOC$;AMbK~_CNVV8aBly*vuZe|X-p|B1{J*FVZV8yb4mh;Tv8E6dgGvqtaARYqcQKLM4CQvjTfowXP{QHEM>`{SM*G@w%e0BVn)YE*TXy+nfktABuVxXM~w*^=DNSG|C& z-2l$f|63DYGJ&eQy!`m7GufV#01T+-7Ez^f42DjQN0Rp)p|6XH>*8&uWUtL z+z7zH^=8uDy&w_~D0{M3Kjt}Ax8B;dS>XZ@ij*&+sD2$b81(;=ctrQ^h>FVl5Fc>u;nH$od$@b+OYEUx!GSz$JO%2_N5kc0@w%;$cqv!FC|*Oh`_wL z1R@atTq=c2BuMqdN%i#Nk|`esei3WlS#$ba+mk$IelY>__v_ns8{r6s)ic$P{i@lh zJ+$Kc^QRx*^PB-Df$Z42-dKH2VGB^nqo-OI&~1#lC}PgmoxN~vCgcA#u73bYx+8E} Sl2Y9O0000N#0$9Ug7g~-`rQ^qx~m@y2OU8A z#zh~=7n#Z$Z*fx-GOtDf07cgx0suCz_W(2~Y(0tf@FX@P6EPuM_dgn$vj9LucO)%W zw%HgMW>=#oL>nZ>M&NEf08>)#)k<{$fCT_r>rPi=BV=hFh6WS^qqze>C6Ek}o{M5% za|@JGowu0t{&hgNzySHZxy@LTNh);YzZ2zSp_ zl$^T&Dnc|NLb&RD_!4>pt@VHdP)ZGER%5ZmWEe$lryR&y;2u^3cOkO4#6c%-(EY6a{600000NkvXXu0mjfxS2AI literal 0 HcmV?d00001 diff --git a/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/information.png b/1.2/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/resources/information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!CkBu&tMWm(%-ejACVWGS2RX5=QOJ$1*tr7F}F+*-OA+Ly&Isg|AEuUYicA z#%IG6kPXkHt{zk2M6zK@Vu^4Q(1zE$?yY6M!^&jQ+2^E?!p7{g*|X6}vuRC3p@jk0 W117c83?+LXEZI4G$p&LV25SKE>nb+@ literal 0 HcmV?d00001 diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml new file mode 100644 index 0000000..7f2ef90 --- /dev/null +++ b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTD.gwt.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages.properties b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages.properties new file mode 100644 index 0000000..c222555 --- /dev/null +++ b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages.properties @@ -0,0 +1,2 @@ +sendButton = Send +nameField = Enter your name \ No newline at end of file diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages_fr.properties b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages_fr.properties new file mode 100644 index 0000000..b4a7627 --- /dev/null +++ b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/Messages_fr.properties @@ -0,0 +1,2 @@ +sendButton = Envoyer +nameField = Entrez votre nom \ No newline at end of file diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html new file mode 100644 index 0000000..9b36b96 --- /dev/null +++ b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.html @@ -0,0 +1,4 @@ + +
+
+
\ No newline at end of file diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css new file mode 100644 index 0000000..98ef72c --- /dev/null +++ b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButtonStyle.css @@ -0,0 +1,17 @@ +@CHARSET "UTF-8"; + +.iconButton { + border: none; + font-size: 12px; + margin: 0px; + padding: 0px; +} + +.iconButton .iconButtonImage { + vertical-align: center; +} + +.iconButtonRef { + vertical-align: center; + cursor: pointer; +} \ No newline at end of file diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css new file mode 100644 index 0000000..553fd48 --- /dev/null +++ b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/UnionWizardTD.css @@ -0,0 +1,54 @@ +@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; +} diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/accept.png b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/accept.png new file mode 100644 index 0000000000000000000000000000000000000000..89c8129a490b329f3165f32fa0781701aab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client/resources/arrow-refresh_32.png b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/arrow-refresh_32.png new file mode 100644 index 0000000000000000000000000000000000000000..f3521ea5e0d148384d82c3cba4376972090af7f6 GIT binary patch literal 1182 zcmV;P1Y!G$P)wK~z|UwU%8>TXh)5pK}h{F>r;#a2qh7O*95Kj84sVVF)0>j3^p4 z+l*P3Eir0LTz2J!<8Y-HvXPiwPGd;)!W+UC21FUogb~TIiJNG@z%fz>w6Ox~fS&j9 zq93%-(+`60&1wHVeSgpYJ@0v+Kd?n{?7O!1&HPW@DgiX8zuo<6&LXxPhL`+uFTI{=s0ET(5DM0+0|3RW)->y1X^LMNzi6%mh zaL+wATz6f7fsXz&!@8M(JOGF`TtT(1IvGylVK{`T*(vxJ{dn;3!CC`~#6L%NN;DmK zIVU&(CT!i#wJy1XDI_V6P48>^{5k7tSZfwB&QVyQ zC<>l*Jdrdd@Bi(KG`L7#Ry~jix0l;7Ffw3j$%#WsRW;N-y&q*e%i;qrY#10C`VpZ} zC>&PRnv4}#50B4^H1K>&K1xeUVXv~ovdxk-UA-PRLZJ{K{CfP0@q1}2U%2{A+r%9-)=6PIEb&5ZB7;vIH0S1EyDpq>PZt;Go^ zAoH_9IBZ~fIfVIuAKu9++`M%Q{&_zr{8ym7HGcm0?nF+;x1hQ6C7r_dno0*8d+h*- zD_8r?EqUVsHY^6e(kS|kXxS6Pv;wj44E{B2Z`!N)|MAz8fX!-y)9XwJUlI|okYkES zS6I_N__g!)x4zN&#Z>vT_JW4b4(TFncU0No^t$l#*FO))9Z>% wu`P<6%;?&uqdEm0*?7VK8i&pv(6=hre}=nUJq4NLMgRZ+07*qoM6N<$f|YC_5&!@I literal 0 HcmV?d00001 diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping.png b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/codelistmapping.png new file mode 100644 index 0000000000000000000000000000000000000000..04850798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delete.png b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..b639afd5cf625c0075bf21cdaa70959b0ffb30bb GIT binary patch literal 614 zcmV-s0-61ZP)li^|sBsmue{0{Byw ztBuLFXhX1BSB%zJAKnmJbqOcqEqc=*0k8m!)&owW6>DX&uJ~V0eSC|PXvK&O0)zmJ zNN*?-K`j+P1nb7*|Bg&wIgMKWjva|$M0&OZFoC~SRo5T72%s>&Uvah#FsBQ}{%}JC zwZ4vj{o)SWMx=7r8WV5FUoB!pK2`q!(KF@T5;}gcrswTqL**>W2)yyN z&+}`ZAHq*|))o8demp0}dUn1jo_e%nk>)O(9kLzgS>ogg)u_u@3$v)7KPtAPtpwdi z@tR_|FJBp5@`lqB&!=iud3I>voU(Y@e7Livxg$j=)>7%PP^7f@m5ndCf-zi9PtMe? zauqUoDq(0CK{1G-2f)A_Fl`~@>FF2lZq1(JFFZax1!6p-|`vdZbV&P)NiOEX0@qUO)&!G*W}c zKfo&!qmjrVNI;{B@gMMpD-w{D5ET-*K}?JSN)4J8Ii=@rSz72}58ZzAzFvH7+0sJ0 z;GI4ex)pvjVty#!d*F9t zjQ%SCs%m0i9cfTFf>Jk2-WG!%D%<;M<4hn=1&AFzSmOnPCknw*hZklhC}34R}d*J1~Wrw zs-%1SNVaz&BclLugEUke{QRd`19TicxW%ZP2STCZ0_N8(!vq2#iXFUO}PKzs9y<~V`jL2T2{n3g6GA-|@IP~m)VvM}iMgg&|C+fFT%(fGQ-1CQWMhe?uY3CDR~^+Ti3p&sEvI5srW;l1!r_s7UvC*`owJ?Z#-W zOC$;AMbK~_CNVV8aBly*vuZe|X-p|B1{J*FVZV8yb4mh;Tv8E6dgGvqtaARYqcQKLM4CQvjTfowXP{QHEM>`{SM*G@w%e0BVn)YE*TXy+nfktABuVxXM~w*^=DNSG|C& z-2l$f|63DYGJ&eQy!`m7GufV#01T+-7Ez^f42DjQN0Rp)p|6XH>*8&uWUtL z+z7zH^=8uDy&w_~D0{M3Kjt}Ax8B;dS>XZ@ij*&+sD2$b81(;=ctrQ^h>FVl5Fc>u;nH$od$@b+OYEUx!GSz$JO%2_N5kc0@w%;$cqv!FC|*Oh`_wL z1R@atTq=c2BuMqdN%i#Nk|`esei3WlS#$ba+mk$IelY>__v_ns8{r6s)ic$P{i@lh zJ+$Kc^QRx*^PB-Df$Z42-dKH2VGB^nqo-OI&~1#lC}PgmoxN~vCgcA#u73bYx+8E} Sl2Y9O0000N#0$9Ug7g~-`rQ^qx~m@y2OU8A z#zh~=7n#Z$Z*fx-GOtDf07cgx0suCz_W(2~Y(0tf@FX@P6EPuM_dgn$vj9LucO)%W zw%HgMW>=#oL>nZ>M&NEf08>)#)k<{$fCT_r>rPi=BV=hFh6WS^qqze>C6Ek}o{M5% za|@JGowu0t{&hgNzySHZxy@LTNh);YzZ2zSp_ zl$^T&Dnc|NLb&RD_!4>pt@VHdP)ZGER%5ZmWEe$lryR&y;2u^3cOkO4#6c%-(EY6a{600000NkvXXu0mjfxS2AI literal 0 HcmV?d00001 diff --git a/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/information.png b/1.2/src/main/resources/org/gcube/portlets/user/td/unionwizardwidget/client/resources/information.png new file mode 100644 index 0000000000000000000000000000000000000000..12cd1aef900803abba99b26920337ec01ad5c267 GIT binary patch literal 778 zcmV+l1NHogP)BVme|mWaqy4$_pJm?y9KM{-*hp?1+Ey3e-CEDooTa!B;e(Q>TSF?bj>5At13y1p zriN3w3x~5SfZj{@J4M{kp{?=M_Lh2bV+5LH)Q)5W!-ePA$RgE1@5f1cyHki0Y}JyVEYZF(LD$xXlt$7A5CgE@ zpV-&l%vf;=5kZ2-2gi@Y6J&=cuwt>!vJ^#(&n|LcZyUzi6Duj$$hJ1s*HD-#;k-w@ zpdrwAuoDG_N2bvb07G$Zk*?Hc)JLtW4yqOnic_$zO7NZ#l>Fm){;fE?b$IbOaX2fe z0la4g0Dfw2xk7Wi7NapVD8YMPCZu?A1QCK*67dgsvRKBLFtrM>?$%&_lD1882mzdO zWPdw5KWw6IT`m1b_8=lS5jt8D3=RDa=&jWzR-)S@56WMslZ~mKu1)-wpXB>rNBQ>N zU#K`#1B&v|_AQK;7I~B}OdGiUT9LX>f0xm6<;LeP!=vFjPsUQF*wCJ*dO)4YBypgdiuF!=i@6Zyi7F|q#K zz?tlSZULa@t1D?$e;f@b36&N!V2mjOHw|* ~NwO_yO%;SvZ5MdNYf|QNy-I*%yJaj+uTdt+qbZ z4E`Fzb8m}I&!N8OKmWEcCmrLs^Hs&3i)mt@hQVdcqghkaBs*D}tG_lKew4?rTjzIZ z9tSone1TS+TR7tu^CunG)Y7Jg#sw#)sG9C!c0I%LEzP)9;hqRf&)s$D8d5Db{TBs% zgl0~5QQ91luq4Q9tJgt4QLbaxZvAaKeCM9!oy85dg4k>TdBSVqjHub_PG=PO&J-rx z7oYTuF+kH|tG-UK+EkUhDjYx?zW?T|lx>+aOQm zzL$v$zBLo4Cj=G&tw{H}dW?tlTkS)SY4<#NS92z*EY-MMB6Ftp`R=*=*Ev7cS+X%W zMCur^FdlokL}1Y+&aasU2J4#EOuNlnb9CmqgLCGTSY!1BD42pkHY^XidQ5=>YQx%` z*%Pm9D!CkBu&tMWm(%-ejACVWGS2RX5=QOJ$1*tr7F}F+*-OA+Ly&Isg|AEuUYicA z#%IG6kPXkHt{zk2M6zK@Vu^4Q(1zE$?yY6M!^&jQ+2^E?!p7{g*|X6}vuRC3p@jk0 W117c83?+LXEZI4G$p&LV25SKE>nb+@ literal 0 HcmV?d00001 diff --git a/1.2/src/main/webapp/UnionWizardTD.css b/1.2/src/main/webapp/UnionWizardTD.css new file mode 100644 index 0000000..7aca7ac --- /dev/null +++ b/1.2/src/main/webapp/UnionWizardTD.css @@ -0,0 +1,34 @@ +/** 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; +} diff --git a/1.2/src/main/webapp/UnionWizardTD.html b/1.2/src/main/webapp/UnionWizardTD.html new file mode 100644 index 0000000..5f67805 --- /dev/null +++ b/1.2/src/main/webapp/UnionWizardTD.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + Web Application Starter Project + + + + + + + + + + + + + + + + + + + + + + +

Web Application Starter Project

+ + + + + + + + + + + + +
Please enter your name:
+ + diff --git a/1.2/src/main/webapp/WEB-INF/web.xml b/1.2/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..eb27dcd --- /dev/null +++ b/1.2/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,40 @@ + + + + + + + + TDGWTService + org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl + + + + jUnitHostImpl + com.google.gwt.junit.server.JUnitHostImpl + + + + + + + + TDGWTService + tdgwtservice/TDGWTService + + + jUnitHostImpl + UnionWizardWidgets/junithost/* + + + + + + + + UnionWizardTD.html + + + diff --git a/1.2/src/test/java/org/gcube/portlets/user/td/unionwizardwidget/client/GwtTestUnionWizardTD.java b/1.2/src/test/java/org/gcube/portlets/user/td/unionwizardwidget/client/GwtTestUnionWizardTD.java new file mode 100644 index 0000000..fa0a84e --- /dev/null +++ b/1.2/src/test/java/org/gcube/portlets/user/td/unionwizardwidget/client/GwtTestUnionWizardTD.java @@ -0,0 +1,82 @@ +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 integration tests must extend GWTTestCase. + * Using "GwtTest*" 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>() { + + + public void onFailure(Throwable caught) { + // The request resulted in an unexpected error. + fail("Request failure: " + caught.getMessage()); + + } + + public void onSuccess(ArrayList 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(); + + } + }); + + } + + +} diff --git a/1.2/src/test/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTDJUnit.gwt.xml b/1.2/src/test/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTDJUnit.gwt.xml new file mode 100644 index 0000000..bd02383 --- /dev/null +++ b/1.2/src/test/resources/org/gcube/portlets/user/td/unionwizardwidget/UnionWizardTDJUnit.gwt.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/1.2/templates/INSTALL b/1.2/templates/INSTALL new file mode 100644 index 0000000..e69de29 diff --git a/1.2/templates/LICENSE b/1.2/templates/LICENSE new file mode 100644 index 0000000..cc51139 --- /dev/null +++ b/1.2/templates/LICENSE @@ -0,0 +1,6 @@ +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. \ No newline at end of file diff --git a/1.2/templates/MAINTAINERS b/1.2/templates/MAINTAINERS new file mode 100644 index 0000000..0bc9be3 --- /dev/null +++ b/1.2/templates/MAINTAINERS @@ -0,0 +1 @@ +Giancarlo Panichi (giancarlo.panichi@isti.cnr.it), CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" diff --git a/1.2/templates/README b/1.2/templates/README new file mode 100644 index 0000000..7e3ad55 --- /dev/null +++ b/1.2/templates/README @@ -0,0 +1,48 @@ +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. + + diff --git a/1.2/templates/changelog.xml b/1.2/templates/changelog.xml new file mode 100644 index 0000000..33661de --- /dev/null +++ b/1.2/templates/changelog.xml @@ -0,0 +1,16 @@ + + + Updated to GWT 2.6.1 + Updated to GXT 3.1.1 + Fixed Creation Date in TabResourcesSelectionPanel [issue #3149] + + + Added flows + Fixed Final and Lock error + + + First Release + + \ No newline at end of file diff --git a/1.2/templates/descriptor.xml b/1.2/templates/descriptor.xml new file mode 100644 index 0000000..b978636 --- /dev/null +++ b/1.2/templates/descriptor.xml @@ -0,0 +1,39 @@ + + servicearchive + + tar.gz + + / + + + ${distroDirectory} + / + true + + README + LICENSE + INSTALL + MAINTAINERS + changelog.xml + + 755 + + + + + ${distroDirectory}/svnpath.txt + /${artifactId} + + + ${configDirectory}/profile.xml + / + + + target/${build.finalName}.${packaging} + /${artifactId} + + + \ No newline at end of file diff --git a/1.2/templates/profile.xml b/1.2/templates/profile.xml new file mode 100644 index 0000000..19ed5bc --- /dev/null +++ b/1.2/templates/profile.xml @@ -0,0 +1,29 @@ + + + + Service + + ${project.description} + PortletsUser + ${project.name} + ${version} + + + ${project.description} + ${project.name} + ${version} + + ${project.groupId} + ${project.artifactId} + ${project.version} + + library + + ${project.build.finalName}.${project.packaging} + + + + + + + diff --git a/1.2/templates/svnpath.txt b/1.2/templates/svnpath.txt new file mode 100644 index 0000000..dcd0d22 --- /dev/null +++ b/1.2/templates/svnpath.txt @@ -0,0 +1 @@ +${scm.url} \ No newline at end of file