From e4ddea0ae39a65e1a89aa4397e33d2f99079d5f5 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 5 Mar 2014 17:15:19 +0000 Subject: [PATCH] Initial import. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@92702 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 37 +++ .project | 53 +++ .settings/.jsdtscope | 13 + .settings/com.google.gdt.eclipse.core.prefs | 4 + .settings/org.eclipse.core.resources.prefs | 6 + .settings/org.eclipse.jdt.core.prefs | 8 + .settings/org.eclipse.m2e.core.prefs | 4 + .settings/org.eclipse.wst.common.component | 10 + ....eclipse.wst.common.project.facet.core.xml | 7 + ...rg.eclipse.wst.jsdt.ui.superType.container | 1 + .../org.eclipse.wst.jsdt.ui.superType.name | 1 + pom.xml | 306 ++++++++++++++++++ .../user/td/tablewidget/TableWidget.gwt.xml | 31 ++ .../tablewidget/client/TableWidgetEntry.java | 15 + .../user/td/sharewidget/TableWidget.gwt.xml | 31 ++ .../td/sharewidget/client/Messages.properties | 2 + .../sharewidget/client/Messages_fr.properties | 2 + src/main/webapp/TableWidget.css | 34 ++ src/main/webapp/TableWidget.html | 50 +++ src/main/webapp/WEB-INF/web.xml | 38 +++ .../client/GwtTestTableWidget.java | 64 ++++ .../td/sharewidget/ShareWidgetJUnit.gwt.xml | 14 + templates/INSTALL | 0 templates/LICENSE | 6 + templates/MAINTAINERS | 1 + templates/README | 40 +++ templates/changelog.xml | 6 + templates/descriptor.xml | 39 +++ templates/profile.xml | 29 ++ templates/svnpath.txt | 1 + 30 files changed, 853 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/.jsdtscope create mode 100644 .settings/com.google.gdt.eclipse.core.prefs create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 .settings/org.eclipse.m2e.core.prefs create mode 100644 .settings/org.eclipse.wst.common.component create mode 100644 .settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 pom.xml create mode 100644 src/main/java/org/gcube/portlets/user/td/tablewidget/TableWidget.gwt.xml create mode 100644 src/main/java/org/gcube/portlets/user/td/tablewidget/client/TableWidgetEntry.java create mode 100644 src/main/resources/org/gcube/portlets/user/td/sharewidget/TableWidget.gwt.xml create mode 100644 src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages.properties create mode 100644 src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages_fr.properties create mode 100644 src/main/webapp/TableWidget.css create mode 100644 src/main/webapp/TableWidget.html create mode 100644 src/main/webapp/WEB-INF/web.xml create mode 100644 src/test/java/org/gcube/portlets/user/td/tablewidget/client/GwtTestTableWidget.java create mode 100644 src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml create mode 100644 templates/INSTALL create mode 100644 templates/LICENSE create mode 100644 templates/MAINTAINERS create mode 100644 templates/README create mode 100644 templates/changelog.xml create mode 100644 templates/descriptor.xml create mode 100644 templates/profile.xml create mode 100644 templates/svnpath.txt diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..d06a431 --- /dev/null +++ b/.classpath @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..901f98d --- /dev/null +++ b/.project @@ -0,0 +1,53 @@ + + + tabular-data-table-widget + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + com.google.gdt.eclipse.core.webAppProjectValidator + + + + + com.google.gwt.eclipse.core.gwtProjectValidator + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + com.google.gwt.eclipse.core.gwtNature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..3b2886e --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs new file mode 100644 index 0000000..7254093 --- /dev/null +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +lastWarOutDir=/home/giancarlo/workspace/tabular-data-share-widget/target/tabular-data-share-widget-0.0.1-SNAPSHOT +warSrcDir=src/main/webapp +warSrcDirIsOutput=false diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..df47e82 --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..4045d87 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..42858ad --- /dev/null +++ b/pom.xml @@ -0,0 +1,306 @@ + + + + + maven-parent + org.gcube.tools + 1.0.0 + + + + + 4.0.0 + org.gcube.portlets.user + tabular-data-table-widget + 0.0.1-SNAPSHOT + + + tabular-data-table-widget + tabular-data-table-widget allows operation on table and change table type + + + https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-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} + 2013-10-18 + templates + distro + config + + + 2.5.1 + + ${env.GLOBUS_LOCATION} + + UTF-8 + UTF-8 + + + + + + + localRun + + + org.slf4j + slf4j-api + compile + + + ch.qos.logback + logback-classic + 1.0.1 + runtime + + + + + + + + + com.google.gwt + gwt-servlet + + + com.google.gwt + gwt-user + + + + + javax.validation + validation-api + 1.0.0.GA + test + + + javax.validation + validation-api + 1.0.0.GA + sources + test + + + + com.sencha.gxt + gxt + 3.0.1 + + + + + + + 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 + + + + + com.allen-sauer.gwt.log + gwt-log + + + + org.slf4j + slf4j-api + compile + + + + + junit + junit + 4.8.1 + test + + + + + + + + + + ${webappDirectory}/WEB-INF/classes + + + src/main/resources + + **/*.* + + + + + + + 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 + + + + + TableWidget.html + ${webappDirectory} + org.gcube.portlets.user.td.tablewidget.TableWidget + + + + + + 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 + + + + war + diff --git a/src/main/java/org/gcube/portlets/user/td/tablewidget/TableWidget.gwt.xml b/src/main/java/org/gcube/portlets/user/td/tablewidget/TableWidget.gwt.xml new file mode 100644 index 0000000..8b7bf94 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/tablewidget/TableWidget.gwt.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/TableWidgetEntry.java b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/TableWidgetEntry.java new file mode 100644 index 0000000..468fb01 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/TableWidgetEntry.java @@ -0,0 +1,15 @@ +package org.gcube.portlets.user.td.tablewidget.client; + + + +import com.allen_sauer.gwt.log.client.Log; +import com.google.gwt.core.client.EntryPoint; + +public class TableWidgetEntry implements EntryPoint { + + + public void onModuleLoad() { + + Log.info("Hello!"); + } +} diff --git a/src/main/resources/org/gcube/portlets/user/td/sharewidget/TableWidget.gwt.xml b/src/main/resources/org/gcube/portlets/user/td/sharewidget/TableWidget.gwt.xml new file mode 100644 index 0000000..d66eb24 --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/sharewidget/TableWidget.gwt.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages.properties b/src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages.properties new file mode 100644 index 0000000..c222555 --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages.properties @@ -0,0 +1,2 @@ +sendButton = Send +nameField = Enter your name \ No newline at end of file diff --git a/src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages_fr.properties b/src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages_fr.properties new file mode 100644 index 0000000..b4a7627 --- /dev/null +++ b/src/main/resources/org/gcube/portlets/user/td/sharewidget/client/Messages_fr.properties @@ -0,0 +1,2 @@ +sendButton = Envoyer +nameField = Entrez votre nom \ No newline at end of file diff --git a/src/main/webapp/TableWidget.css b/src/main/webapp/TableWidget.css new file mode 100644 index 0000000..7aca7ac --- /dev/null +++ b/src/main/webapp/TableWidget.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/src/main/webapp/TableWidget.html b/src/main/webapp/TableWidget.html new file mode 100644 index 0000000..4526e82 --- /dev/null +++ b/src/main/webapp/TableWidget.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + Web Application Starter Project + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..1214f3d --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,38 @@ + + + + + + + + + TDGWTService + org.gcube.portlets.user.td.gwtservice.server.TDGWTServiceImpl + + + + jUnitHostImpl + com.google.gwt.junit.server.JUnitHostImpl + + + + + TDGWTService + /tdgwtservice/TDGWTService + + + + + jUnitHostImpl + /tablewidget/junithost/* + + + + + + TableWidget.html + + + diff --git a/src/test/java/org/gcube/portlets/user/td/tablewidget/client/GwtTestTableWidget.java b/src/test/java/org/gcube/portlets/user/td/tablewidget/client/GwtTestTableWidget.java new file mode 100644 index 0000000..1eba281 --- /dev/null +++ b/src/test/java/org/gcube/portlets/user/td/tablewidget/client/GwtTestTableWidget.java @@ -0,0 +1,64 @@ +package org.gcube.portlets.user.td.tablewidget.client; + + + +import com.google.gwt.junit.client.GWTTestCase; + +/** + * 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 GwtTestTableWidget extends GWTTestCase { + + /** + * Must refer to a valid module that sources this class. + */ + public String getModuleName() { + return "org.gcube.portlets.user.td.tablewidget.TableWidgetJUnit"; + } + + + /** + * This test will send a request to the server using the greetServer method in + * GreetingService and verify the response. + */ + public void testGreetingService() { + // Create the service that we will test. + //GreetingServiceAsync greetingService = GWT.create(GreetingService.class); + //ServiceDefTarget target = (ServiceDefTarget) greetingService; + //target.setServiceEntryPoint(GWT.getModuleBaseURL() + "SDMXImportWizardTD/greet"); + + // 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 10 seconds before timing out. + //delayTestFinish(10000); + + // Send a request to the server. + /* greetingService.greetServer("GWT User", new AsyncCallback() { + public void onFailure(Throwable caught) { + // The request resulted in an unexpected error. + fail("Request failure: " + caught.getMessage()); + } + + + public void onSuccess(String result) { + // Verify that the response is correct. + assertTrue(result.startsWith("Hello, GWT User!")); + + // 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/src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml b/src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml new file mode 100644 index 0000000..ac20f89 --- /dev/null +++ b/src/test/resources/org/gcube/portlets/user/td/sharewidget/ShareWidgetJUnit.gwt.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/INSTALL b/templates/INSTALL new file mode 100644 index 0000000..e69de29 diff --git a/templates/LICENSE b/templates/LICENSE new file mode 100644 index 0000000..cc51139 --- /dev/null +++ b/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/templates/MAINTAINERS b/templates/MAINTAINERS new file mode 100644 index 0000000..0bc9be3 --- /dev/null +++ b/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/templates/README b/templates/README new file mode 100644 index 0000000..e81341a --- /dev/null +++ b/templates/README @@ -0,0 +1,40 @@ +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 URL: ${scm.url} + + +Documentation +------------- + +${project.description} + + +Licensing +--------- + +This software is licensed under the terms you may find in the file named "LICENSE" in this directory. + + + diff --git a/templates/changelog.xml b/templates/changelog.xml new file mode 100644 index 0000000..3741410 --- /dev/null +++ b/templates/changelog.xml @@ -0,0 +1,6 @@ + + + First Release + + \ No newline at end of file diff --git a/templates/descriptor.xml b/templates/descriptor.xml new file mode 100644 index 0000000..b978636 --- /dev/null +++ b/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/templates/profile.xml b/templates/profile.xml new file mode 100644 index 0000000..ffa3274 --- /dev/null +++ b/templates/profile.xml @@ -0,0 +1,29 @@ + + + + Service + + ${project.description} + PortletsUser + ${project.name} + 1.0.0 + + + ${project.description} + ${project.name} + ${version} + + ${project.groupId} + ${project.artifactId} + ${project.version} + + library + + ${project.build.finalName}.${project.packaging} + + + + + + + diff --git a/templates/svnpath.txt b/templates/svnpath.txt new file mode 100644 index 0000000..dcd0d22 --- /dev/null +++ b/templates/svnpath.txt @@ -0,0 +1 @@ +${scm.url} \ No newline at end of file