Giancarlo Panichi 4 years ago
parent
commit
f307dfe922
  1. 54
      .classpath
  2. 53
      .project
  3. 3
      .settings/com.google.appengine.eclipse.core.prefs
  4. 4
      .settings/com.google.gdt.eclipse.core.prefs
  5. 3
      .settings/com.google.gwt.eclipse.core.prefs
  6. 6
      .settings/org.eclipse.core.resources.prefs
  7. 13
      .settings/org.eclipse.jdt.core.prefs
  8. 4
      .settings/org.eclipse.m2e.core.prefs
  9. 10
      .settings/org.eclipse.wst.common.component
  10. 7
      .settings/org.eclipse.wst.common.project.facet.core.prefs.xml
  11. 8
      .settings/org.eclipse.wst.common.project.facet.core.xml
  12. 2
      .settings/org.eclipse.wst.validation.prefs
  13. 1
      distro/LICENSE
  14. 68
      distro/README
  15. 5
      distro/changelog.xml
  16. 32
      distro/descriptor.xml
  17. 29
      distro/profile.xml
  18. 395
      pom.xml
  19. 39
      src/main/java/org/gcube/portlets/user/accountingdashboard/accountingdashb.gwt.xml
  20. 36
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationModule.java
  21. 78
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationPresenter.java
  22. 34
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.java
  23. 14
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.ui.xml
  24. 23
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/CommonMessages.java
  25. 27
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ApplicationCache.java
  26. 88
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/Controller.java
  27. 23
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ControllerModule.java
  28. 73
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.java
  29. 42
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.ui.xml
  30. 54
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidgetHideEvent.java
  31. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorModule.java
  32. 58
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorPresenter.java
  33. 13
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorUiHandlers.java
  34. 68
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.java
  35. 31
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.ui.xml
  36. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoModule.java
  37. 58
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoPresenter.java
  38. 13
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoUiHandlers.java
  39. 68
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.java
  40. 31
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.ui.xml
  41. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorModule.java
  42. 58
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorPresenter.java
  43. 13
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorUiHandlers.java
  44. 57
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorView.java
  45. 21
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/monitor/MonitorView.ui.xml
  46. 37
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/HelloEvent.java
  47. 50
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/event/MonitorEvent.java
  48. 21
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaModule.java
  49. 79
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaPresenter.java
  50. 13
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaUiHandlers.java
  51. 51
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaView.java
  52. 13
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/MainAreaView.ui.xml
  53. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaModule.java
  54. 57
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaPresenter.java
  55. 13
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaUiHandlers.java
  56. 132
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaView.java
  57. 50
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/FilterAreaView.ui.xml
  58. 97
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/filter/scopetree/ScopeTreeModel.java
  59. 13
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReaportAreaUiHandlers.java
  60. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaModule.java
  61. 53
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaPresenter.java
  62. 45
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaView.java
  63. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/mainarea/report/ReportAreaView.ui.xml
  64. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuModule.java
  65. 41
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuPresenter.java
  66. 14
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuUiHanlers.java
  67. 30
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuView.java
  68. 24
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/menu/MenuView.ui.xml
  69. 16
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/providers/DataProviderModule.java
  70. 183
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/providers/DeadFishBySpecificDiseasesProvider.java
  71. 181
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/providers/TreatmentsProvider.java
  72. 42
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/utils/CheckCellHead.java
  73. 45
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/utils/DateTimeUtils.java
  74. 40
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/gin/AccountingDashBoardClientModule.java
  75. 46
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/gin/CustomRootPresenter.java
  76. 26
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/place/NameTokens.java
  77. 15
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/place/TokenParameters.java
  78. 68
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/AppResources.java
  79. 24
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/ResourceLoader.java
  80. 21
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/ScopeTreeResources.java
  81. 292
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/uiData.css
  82. 68
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/resources/uiScopeTree.css
  83. 28
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/rpc/AccountingDashboardService.java
  84. 26
      src/main/java/org/gcube/portlets/user/accountingdashboard/client/rpc/AccountingDashboardServiceAsync.java
  85. 49
      src/main/java/org/gcube/portlets/user/accountingdashboard/portlet/AccountingDashboardPortlet.java
  86. 62
      src/main/java/org/gcube/portlets/user/accountingdashboard/server/AccountingDashboardServiceImpl.java
  87. 187
      src/main/java/org/gcube/portlets/user/accountingdashboard/server/SessionUtil.java
  88. 33
      src/main/java/org/gcube/portlets/user/accountingdashboard/server/accounting/AccountingService.java
  89. 141
      src/main/java/org/gcube/portlets/user/accountingdashboard/server/util/ServiceCredentials.java
  90. 37
      src/main/java/org/gcube/portlets/user/accountingdashboard/shared/Constants.java
  91. 89
      src/main/java/org/gcube/portlets/user/accountingdashboard/shared/data/ScopeData.java
  92. 79
      src/main/java/org/gcube/portlets/user/accountingdashboard/shared/data/TreatmentData.java
  93. 44
      src/main/java/org/gcube/portlets/user/accountingdashboard/shared/exception/ServiceException.java
  94. 39
      src/main/java/org/gcube/portlets/user/accountingdashboard/shared/exception/SessionExpiredException.java
  95. 18
      src/main/java/org/gcube/portlets/user/accountingdashboard/shared/session/SessionConstants.java
  96. 107
      src/main/java/org/gcube/portlets/user/accountingdashboard/shared/session/UserInfo.java
  97. 39
      src/main/resources/org/gcube/portlets/user/accountingdashboard/accountingdashb.gwt.xml
  98. 55
      src/main/webapp/AccountingDashboard.css
  99. 51
      src/main/webapp/AccountingDashboard.html
  100. 14
      src/main/webapp/WEB-INF/jsp/AccountingDashboardPortlet_view.jsp

54
.classpath

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/accounting-dashboard-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/accounting-dashboard-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/gwt-user.jar">
<attributes>
<attribute name="javadoc_location" value="file:/home/giancarlo/gwt/gwt-2.8.2/doc/javadoc/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/gwt-codeserver.jar">
<attributes>
<attribute name="javadoc_location" value="file:/home/giancarlo/gwt/gwt-2.8.2/doc/javadoc/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/gwt-dev.jar">
<attributes>
<attribute name="javadoc_location" value="file:/home/giancarlo/gwt/gwt-2.8.2/doc/javadoc/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="output" path="target/accounting-dashboard-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

53
.project

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>accounting-dashboard</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
</natures>
</projectDescription>

3
.settings/com.google.appengine.eclipse.core.prefs

@ -0,0 +1,3 @@
eclipse.preferences.version=1
googleCloudSqlEnabled=false
localDevMySqlEnabled=true

4
.settings/com.google.gdt.eclipse.core.prefs

@ -0,0 +1,4 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

3
.settings/com.google.gwt.eclipse.core.prefs

@ -0,0 +1,3 @@
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=

6
.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/<project>=UTF-8

13
.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,13 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
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.8

4
.settings/org.eclipse.m2e.core.prefs

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

10
.settings/org.eclipse.wst.common.component

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="accounting-dashboard-1.0.0-SNAPSHOT">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<property name="java-output-path" value="/cmems-importer/target/cmems-importer-1.0.0-SNAPSHOT/WEB-INF/classes"/>
<property name="context-root" value="accounting-dashboard"/>
</wb-module>
</project-modules>

7
.settings/org.eclipse.wst.common.project.facet.core.prefs.xml

@ -0,0 +1,7 @@
<root>
<facet id="jst.jaxrs">
<node name="libprov">
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
</node>
</facet>
</root>

8
.settings/org.eclipse.wst.common.project.facet.core.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.8"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jaxrs" version="2.0"/>
</faceted-project>

2
.settings/org.eclipse.wst.validation.prefs

@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1

1
distro/LICENSE

@ -0,0 +1 @@
${gcube.license}

68
distro/README

@ -0,0 +1,68 @@
The gCube System - ${name}
--------------------------------------------------
${description}
${gcube.description}
${gcube.funding}
Version
--------------------------------------------------
${version} (${buildDate})
Please see the file named "changelog.xml" in this directory for the release notes.
Authors
--------------------------------------------------
* Giancarlo Panichi (giancarlo.panichi-AT-isti.cnr.it),
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" CNR, Pisa IT
Maintainers
-----------
* Giancarlo Panichi (giancarlo.panichi-AT-isti.cnr.it),
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" CNR, Pisa IT
Download information
--------------------------------------------------
Source code is available from SVN:
${scm.url}
Binaries can be downloaded from the gCube website:
${gcube.website}
Installation
--------------------------------------------------
Installation documentation is available on-line in the gCube Wiki:
https://wiki.gcube-system.org/gcube/CMEMS_Scheduler_Manager
Documentation
--------------------------------------------------
Documentation is available on-line in the gCube Wiki:
https://wiki.gcube-system.org/gcube/CMEMS_Scheduler_Manager
Support
--------------------------------------------------
Bugs and support requests can be reported in the gCube issue tracking tool:
${gcube.issueTracking}
Licensing
--------------------------------------------------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

5
distro/changelog.xml

@ -0,0 +1,5 @@
<ReleaseNotes>
<Changeset component="${groupId}.${artifactId}.1-0-0" date="2018-08-01">
<Change>First Release</Change>
</Changeset>
</ReleaseNotes>

32
distro/descriptor.xml

@ -0,0 +1,32 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>changelog.xml</include>
<include>profile.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>target/${build.finalName}.${project.packaging}</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
</files>
</assembly>

29
distro/profile.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource>
<ID></ID>
<Type>Service</Type>
<Profile>
<Description>${project.description}</Description>
<Class>PortletsUser</Class>
<Name>${project.name}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Description>${project.description}</Description>
<Name>${project.name}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</MavenCoordinates>
<Type>webapplication</Type>
<Files>
<File>${project.build.finalName}.${project.packaging}</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

395
pom.xml

@ -0,0 +1,395 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.gcube.tools</groupId>
<version>1.0.0</version>
<relativePath />
</parent>
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>accounting-dashboard</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>accounting-dashboard</name>
<description>Accounting Dashboard</description>
<scm>
<url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/accounting-dashborad</url>
</scm>
<developers>
<developer>
<name>Giancarlo Panichi</name>
<email>g.panichi@isti.cnr.it</email>
<organization>CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"</organization>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
</developer>
</developers>
<properties>
<distroDirectory>distro</distroDirectory>
<configDirectory>config</configDirectory>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<!-- Java -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- GWT configuration -->
<gwt.version>2.8.2</gwt.version>
<gwt.log.version>3.3.2</gwt.log.version>
<gwtp.version>1.6</gwtp.version>
<gin.version>2.1.2</gin.version>
<gwtBootStrapVersion>2.3.2.0</gwtBootStrapVersion>
<gwt.runTarget>AccountingDashboard.html</gwt.runTarget>
<gwt.module.name>org.gcube.portlets.user.accountingdashboard.accountingdashb</gwt.module.name>
<!-- maven -->
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
<KEYS>${env.KEYS}</KEYS>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<profiles>
<profile>
<id>localRun</id>
<dependencies>
<!-- Logger -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>runtime</scope>
</dependency>
<!-- javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- Authorization -->
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>common-authorization</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<!-- GWT -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- JDT -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- GWTP -->
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-mvp-client</artifactId>
<version>${gwtp.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-processors</artifactId>
<version>${gwtp.version}</version>
</dependency>
<!-- DI -->
<dependency>
<groupId>com.google.gwt.inject</groupId>
<artifactId>gin</artifactId>
<version>${gin.version}</version>
<scope>provided</scope>
</dependency>
<!-- XML Apis -->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<!-- GWTBootstrap -->
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>${gwtBootStrapVersion}</version>
</dependency>
<!-- Portlet -->
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
</dependency>
<!-- PORTAL -->
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gcube.common.portal</groupId>
<artifactId>portal-manager</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.dvos</groupId>
<artifactId>usermanagement-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>client-context-library</artifactId>
<version>[1.0.0-SNAPSHOT,)</version>
<scope>compile</scope>
</dependency>
<!-- Authorization -->
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>common-authorization</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId>
<scope>provided</scope>
</dependency>
<!-- Information System -->
<dependency>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
</dependency>
<!-- accounting-summary-access -->
<dependency>
<groupId>org.gcube.data.access</groupId>
<artifactId>accounting-summary-access</artifactId>
<version>[0.0.1-SNAPSHOT,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- LOGGING -->
<dependency>
<groupId>com.allen-sauer.gwt.log</groupId>
<artifactId>gwt-log</artifactId>
<version>${gwt.log.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>provided</scope>
</dependency>
<!-- JUnit TEST -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.css</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins>
<!-- GWT -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<configuration>
<strict>true</strict>
<testTimeOut>180</testTimeOut>
<mode>htmlunit</mode>
<includes>**/*GwtTest.java</includes>
<logLevel>INFO</logLevel>
<runTarget>${gwt.runTarget}</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<module>${gwt.module.name}</module>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
<warName>${project.build.finalName}</warName>
</configuration>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<!-- <configuration> <excludes> <exclude>src/java/main/org/gcube/portlets/user/cmemsschedulermanager/client/application/event/*</exclude>
</excludes> </configuration> -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>servicearchive</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId>
<version>LATEST</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

39
src/main/java/org/gcube/portlets/user/accountingdashboard/accountingdashb.gwt.xml

@ -0,0 +1,39 @@
<module rename-to="accountingdashb">
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.gwt.http.HTTP" />
<inherits name="com.google.gwt.resources.Resources" />
<inherits name="com.google.gwt.logging.Logging" />
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<inherits name='com.github.gwtbootstrap.datetimepicker.Datetimepicker' />
<!--pay attention in this part -->
<!-- <replace-with class="org.gcube.portlets.user.cmemsschedulermanager.client.resources.ThemeConfigurator">
<when-type-is class="com.github.gwtbootstrap.client.ui.config.Configurator"
/> </replace-with> -->
<inherits name="com.gwtplatform.mvp.MvpWithEntryPoint" />
<extend-configuration-property name="gin.ginjector.modules"
value="org.gcube.portlets.user.accountingdashboard.client.gin.AccountingDashBoardClientModule" />
<!-- Specify the paths for translatable code -->
<source path="client" />
<source path="shared" />
<set-configuration-property name="CssResource.enableGss"
value="true" />
<set-configuration-property name="CssResource.conversionMode"
value="strict" />
<!-- <set-property name="gwt.logging.logLevel" value="SEVERE" /> <set-property
name="gwt.logging.enabled" value="TRUE" /> -->
<set-property name="gwt.logging.logLevel" value="FINE" />
<set-property name="gwt.logging.enabled" value="TRUE" />
<set-property name="gwt.logging.consoleHandler" value="ENABLED" />
</module>

36
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationModule.java

@ -0,0 +1,36 @@
package org.gcube.portlets.user.accountingdashboard.client.application;
import org.gcube.portlets.user.accountingdashboard.client.application.controller.ControllerModule;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.error.ErrorModule;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.info.InfoModule;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.monitor.MonitorModule;
import org.gcube.portlets.user.accountingdashboard.client.application.mainarea.MainAreaModule;
import org.gcube.portlets.user.accountingdashboard.client.application.menu.MenuModule;
import org.gcube.portlets.user.accountingdashboard.client.application.providers.DataProviderModule;
import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
/**
*
* @author Giancarlo Panichi
*
*/
public class ApplicationModule extends AbstractPresenterModule {
@Override
protected void configure() {
install(new MonitorModule());
install(new InfoModule());
install(new ErrorModule());
install(new ControllerModule());
install(new DataProviderModule());
install(new MenuModule());
install(new MainAreaModule());
bindPresenter(ApplicationPresenter.class, ApplicationPresenter.PresenterView.class, ApplicationView.class,
ApplicationPresenter.ApplicationPresenterProxy.class);
}
}

78
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationPresenter.java

@ -0,0 +1,78 @@
package org.gcube.portlets.user.accountingdashboard.client.application;
import org.gcube.portlets.user.accountingdashboard.client.application.controller.Controller;
import org.gcube.portlets.user.accountingdashboard.client.application.menu.MenuPresenter;
import com.google.gwt.user.client.Window;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.ProxyStandard;
import com.gwtplatform.mvp.client.presenter.slots.NestedSlot;
import com.gwtplatform.mvp.client.presenter.slots.PermanentSlot;
import com.gwtplatform.mvp.client.proxy.NavigationEvent;
import com.gwtplatform.mvp.client.proxy.NavigationHandler;
import com.gwtplatform.mvp.client.proxy.Proxy;
/**
*
* @author Giancarlo Panichi
*
*/
public class ApplicationPresenter
extends Presenter<ApplicationPresenter.PresenterView, ApplicationPresenter.ApplicationPresenterProxy>
implements NavigationHandler {
interface PresenterView extends View {
}
@ProxyStandard
interface ApplicationPresenterProxy extends Proxy<ApplicationPresenter> {
}
public static final PermanentSlot<MenuPresenter> SLOT_MENU = new PermanentSlot<>();
public static final NestedSlot SLOT_MAIN = new NestedSlot();
private MenuPresenter menuPresenter;
private Controller controller;
@Inject
ApplicationPresenter(EventBus eventBus, PresenterView view, ApplicationPresenterProxy proxy, MenuPresenter menuPresenter,
Controller controller) {
super(eventBus, view, proxy, RevealType.Root);
this.menuPresenter = menuPresenter;
this.controller = controller;
callHello();
}
@Override
protected void onBind() {
super.onBind();
setInSlot(SLOT_MENU, menuPresenter);
addRegisteredHandler(NavigationEvent.getType(), this);
}
@Override
protected void onReveal() {
super.onReveal();
}
@Override
public void onNavigation(NavigationEvent navigationEvent) {
Window.scrollTo(0, 0);
// PlaceRequest placeRequest=navigationEvent.getRequest();
// placeManager.revealPlace(placeRequest);
}
private void callHello(){
controller.callHello();
}
}

34
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.java

@ -0,0 +1,34 @@
package org.gcube.portlets.user.accountingdashboard.client.application;
import javax.inject.Inject;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;
import com.gwtplatform.mvp.client.ViewImpl;
/**
*
* @author Giancarlo Panichi
*
*/
public class ApplicationView extends ViewImpl implements ApplicationPresenter.PresenterView {
interface Binder extends UiBinder<Widget, ApplicationView> {
}
@UiField
HTMLPanel menu;
@UiField
HTMLPanel main;
@Inject
ApplicationView(Binder uiBinder) {
initWidget(uiBinder.createAndBindUi(this));
bindSlot(ApplicationPresenter.SLOT_MENU, menu);
bindSlot(ApplicationPresenter.SLOT_MAIN, main);
}
}

14
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/ApplicationView.ui.xml

@ -0,0 +1,14 @@
<!-- @Author Giancarlo Panichi -->
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
<ui:with field="res"
type="org.gcube.portlets.user.accountingdashboard.client.resources.AppResources" />
<g:HTMLPanel>
<g:HTMLPanel ui:field="menu" />
<g:HTMLPanel ui:field="main" />
</g:HTMLPanel>
</ui:UiBinder>

23
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/CommonMessages.java

@ -0,0 +1,23 @@
package org.gcube.portlets.user.accountingdashboard.client.application;
import com.google.gwt.i18n.client.Messages;
/**
*
* @author Giancarlo Panichi
*
*
*/
public interface CommonMessages extends Messages {
//
@DefaultMessage("Attention")
String attention();
@DefaultMessage("Error")
String error();
}

27
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ApplicationCache.java

@ -0,0 +1,27 @@
package org.gcube.portlets.user.accountingdashboard.client.application.controller;
import java.io.Serializable;
/**
*
* @author Giancarlo Panichi
*
*/
public class ApplicationCache implements Serializable {
/**
*
*/
private static final long serialVersionUID = 4076265357737593194L;
public ApplicationCache() {
}
@Override
public String toString() {
return "ApplicationCache";
}
}

88
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/Controller.java

@ -0,0 +1,88 @@
package org.gcube.portlets.user.accountingdashboard.client.application.controller;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.error.ErrorPresenter;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.info.InfoPresenter;
import org.gcube.portlets.user.accountingdashboard.client.application.dialog.monitor.MonitorPresenter;
import org.gcube.portlets.user.accountingdashboard.client.application.event.HelloEvent;
import org.gcube.portlets.user.accountingdashboard.client.rpc.AccountingDashboardServiceAsync;
import org.gcube.portlets.user.accountingdashboard.shared.session.UserInfo;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
import com.google.inject.name.Named;
/**
*
* @author Giancarlo Panichi
*
*/
public class Controller {
private static Logger logger = java.util.logging.Logger.getLogger("");
private EventBus eventBus;
private AccountingDashboardServiceAsync service;
private ApplicationCache cache;
private MonitorPresenter monitorPresenter;
private ErrorPresenter errorPresenter;
private InfoPresenter infoPresenter;
@Inject
Controller(@Named("ControllerEventBus") EventBus eventBus, AccountingDashboardServiceAsync service,
MonitorPresenter monitorPresenter, ErrorPresenter errorPresenter, InfoPresenter infoPresenter) {
this.eventBus = eventBus;
this.service = service;
this.monitorPresenter = monitorPresenter;
this.errorPresenter = errorPresenter;
this.infoPresenter = infoPresenter;
this.cache = new ApplicationCache();
}
public void fireEvent(GwtEvent<?> event) {
eventBus.fireEventFromSource(event, this);
}
public final <H extends EventHandler> HandlerRegistration addHandler(GwtEvent.Type<H> type, H handler) {
return eventBus.addHandler(type, handler);
}
public EventBus getEventBus() {
return eventBus;
}
public void hello() {
eventBus.fireEvent(new HelloEvent());
}
public void callHello() {
/* String groupId= GCubeClientContext.getCurrentContextId(); */
// String token = Window.Location.getParameter(Constants.TOKEN);
// logger.log(Level.FINE,"Token: " + token);
// MaterialLoader.showLoading(true);
service.hello(new AsyncCallback<UserInfo>() {
@Override
public void onFailure(Throwable caught) {
logger.log(Level.FINE, "Error in Hello(): ", caught);
errorPresenter.errorMessage(caught.getLocalizedMessage());
}
@Override
public void onSuccess(UserInfo result) {
logger.log(Level.FINE, "Hello: " + result.getUsername());
}
});
}
}

23
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/controller/ControllerModule.java

@ -0,0 +1,23 @@
package org.gcube.portlets.user.accountingdashboard.client.application.controller;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.Singleton;
import com.google.inject.name.Names;
/**
*
* @author Giancarlo Panichi
*
*/
public class ControllerModule extends AbstractGinModule {
@Override
protected void configure() {
bind(Controller.class).in(Singleton.class);
bind(EventBus.class).annotatedWith(Names.named("ControllerEventBus")).to(SimpleEventBus.class)
.in(Singleton.class);
}
}

73
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.java

@ -0,0 +1,73 @@
package org.gcube.portlets.user.accountingdashboard.client.application.customwidget;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.gcube.portlets.user.accountingdashboard.client.application.customwidget.TagWidgetHideEvent.HasTagWidgetHideEventHandlers;
import org.gcube.portlets.user.accountingdashboard.client.application.customwidget.TagWidgetHideEvent.TagWidgetHideEventHandler;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.SpanElement;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Widget;
/**
*
* @author Giancarlo Panichi
*
*/
public class TagWidget extends Composite implements HasText, HasTagWidgetHideEventHandlers {
private static Logger logger = java.util.logging.Logger.getLogger("");
private static TagWidgetUiBinder uiBinder = GWT.create(TagWidgetUiBinder.class);
interface TagWidgetUiBinder extends UiBinder<Widget, TagWidget> {
}
public TagWidget() {
initWidget(uiBinder.createAndBindUi(this));
int typeInt = Event.getTypeInt(ClickEvent.getType().getName());
sinkEvents(typeInt);
}
@UiField
Button button;
@UiField
SpanElement tagLabel;
public TagWidget(String label) {
initWidget(uiBinder.createAndBindUi(this));
tagLabel.setInnerText(label);
button.setText("x");
}
@UiHandler("button")
void onClick(ClickEvent e) {
logger.log(Level.FINE,"Button Click");
TagWidgetHideEvent event = new TagWidgetHideEvent(this);
fireEvent(event);
}
public void setText(String text) {
tagLabel.setInnerText(text);
}
public String getText() {
return tagLabel.getInnerText();
}
@Override
public HandlerRegistration addTagWidgetHideEventHandler(TagWidgetHideEventHandler handler) {
return addHandler(handler, TagWidgetHideEvent.TYPE);
}
}

42
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidget.ui.xml

@ -0,0 +1,42 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:with field="res"
type="org.gcube.portlets.user.accountingdashboard.client.resources.AppResources" />
<ui:style>
.cmsTagLabelText {
font-weight: bold;
}
.cmsTagLabelButton {
border-radius: 10px;
border-bottom-style: inset;
background-color: white;
font-weight: normal;
font-size: small;
padding: 2px;
margin: 1px;
line-height: 11px!important;
vertical-align: baseline;
color: #5a5a5a;
}
.csmTagLabelPanel {
color: white;
font-weight: bold;
background-color: #00ace2;
border-radius: 8px;
padding: 3px;
margin: 2px;
width: auto;
display: inline-block;
word-wrap: break-word;
}
</ui:style>
<g:HTMLPanel styleName="{style.csmTagLabelPanel}">
<span ui:field="tagLabel" styleName="{style.cmsTagLabelText}" />
<g:Button styleName="{style.cmsTagLabelButton}" ui:field="button" />
</g:HTMLPanel>
</ui:UiBinder>

54
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/customwidget/TagWidgetHideEvent.java

@ -0,0 +1,54 @@
package org.gcube.portlets.user.accountingdashboard.client.application.customwidget;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
/**
*
* @author Giancarlo Panichi
*
*/
public class TagWidgetHideEvent extends GwtEvent<TagWidgetHideEvent.TagWidgetHideEventHandler> {
public interface TagWidgetHideEventHandler extends EventHandler {
void onHide(TagWidgetHideEvent event);
}
public interface HasTagWidgetHideEventHandlers extends HasHandlers {
HandlerRegistration addTagWidgetHideEventHandler(TagWidgetHideEventHandler handler);
}
private TagWidget tagWidget;
public static final Type<TagWidgetHideEventHandler> TYPE = new Type<>();
public TagWidgetHideEvent(TagWidget tagWidget) {
this.tagWidget = tagWidget;
}
public static void fire(HasHandlers source, TagWidgetHideEvent event) {
source.fireEvent(event);
}
@Override
public Type<TagWidgetHideEventHandler> getAssociatedType() {
return TYPE;
}
@Override
protected void dispatch(TagWidgetHideEventHandler handler) {
handler.onHide(this);
}
public TagWidget getTagWidget() {
return tagWidget;
}
@Override
public String toString() {
return "TagWidgetHideEvent [tagWidget=" + tagWidget + "]";
}
}

16
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorModule.java

@ -0,0 +1,16 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.error;
import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
/**
*
* @author Giancarlo Panichi
*
*/
public class ErrorModule extends AbstractPresenterModule {
@Override
protected void configure() {
bindPresenterWidget(ErrorPresenter.class, ErrorPresenter.ErrorPresenterView.class, ErrorView.class);
}
}

58
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorPresenter.java

@ -0,0 +1,58 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.error;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.HasUiHandlers;
import com.gwtplatform.mvp.client.PopupView;
import com.gwtplatform.mvp.client.PresenterWidget;
/**
*
* @author Giancarlo Panichi
*
*
*/
public class ErrorPresenter extends PresenterWidget<ErrorPresenter.ErrorPresenterView>
implements ErrorUiHandlers {
private static Logger logger = java.util.logging.Logger.getLogger("");
interface ErrorPresenterView extends PopupView, HasUiHandlers<ErrorPresenter> {
public void errorMessage(String error);
}
@Inject
ErrorPresenter(EventBus eventBus, ErrorPresenterView view) {
super(eventBus, view);
getView().setUiHandlers(this);
bindToEvent();
}
@Override
public void onBind() {
super.onBind();
}
private void bindToEvent() {
/*
controller.getEventBus().addHandler(MonitorEvent.TYPE, new MonitorEvent.MonitorEventHandler() {
@Override
public void onMonitor(MonitorEvent event) {
}
});
*/
}
public void errorMessage(String error) {
logger.log(Level.FINE,"Error message: " + error);
getView().errorMessage(error);
}
}

13
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorUiHandlers.java

@ -0,0 +1,13 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.error;
import com.gwtplatform.mvp.client.UiHandlers;
/**
*
* @author Giancarlo Panichi
*
*/
public interface ErrorUiHandlers extends UiHandlers{
}

68
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.java

@ -0,0 +1,68 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.error;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.inject.Inject;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.Paragraph;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.PopupViewWithUiHandlers;
/**
*
* @author Giancarlo Panichi
*
*/
public class ErrorView extends PopupViewWithUiHandlers<ErrorPresenter> implements ErrorPresenter.ErrorPresenterView {
private static Logger logger = java.util.logging.Logger.getLogger("");
interface Binder extends UiBinder<PopupPanel, ErrorView> {
}
@UiField
DialogBox dialogBox;
@UiField
Paragraph errorMsg;
@UiField
Button okBtn;
@UiHandler("okBtn")
void handleClick(ClickEvent e) {
logger.log(Level.FINE,"Close error dialog");
dialogBox.hide();
}
@Inject
ErrorView(Binder uiBinder, EventBus eventBus) {
super(eventBus);
init();
initWidget(uiBinder.createAndBindUi(this));
}
private void init() {
dialogBox = new DialogBox(false, true);
dialogBox.getElement().getStyle().setZIndex(1070);
errorMsg = new Paragraph();
okBtn = new Button();
}
@Override
public void errorMessage(String error) {
errorMsg.setText(error);
dialogBox.center();
dialogBox.show();
}
}

31
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/error/ErrorView.ui.xml

@ -0,0 +1,31 @@
<!-- @Author Giancarlo Panichi -->
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
<ui:with field="res"
type="org.gcube.portlets.user.accountingdashboard.client.resources.AppResources" />
<!-- styleName="{style.popup}" -->
<g:DialogBox ui:field="dialogBox" styleName="{res.uiDataCss.uiDataPopup}"
glassStyleName="{res.uiDataCss.uiDataPopupGlass}" glassEnabled="true">
<g:caption>
<b>Error</b>
</g:caption>
<g:HTMLPanel>
<b:Container>
<b:Paragraph ui:field="errorMsg">
</b:Paragraph>
</b:Container>
<b:Paragraph styleName="{res.uiDataCss.uiDataParagraphCentered}">
<b:Button ui:field="okBtn">
Ok
</b:Button>
</b:Paragraph>
</g:HTMLPanel>
</g:DialogBox>
</ui:UiBinder>

16
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoModule.java

@ -0,0 +1,16 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.info;
import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
/**
*
* @author Giancarlo Panichi
*
*/
public class InfoModule extends AbstractPresenterModule {
@Override
protected void configure() {
bindPresenterWidget(InfoPresenter.class, InfoPresenter.InfoPresenterView.class, InfoView.class);
}
}

58
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoPresenter.java

@ -0,0 +1,58 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.info;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.HasUiHandlers;
import com.gwtplatform.mvp.client.PopupView;
import com.gwtplatform.mvp.client.PresenterWidget;
/**
*
* @author Giancarlo Panichi
*
*
*/
public class InfoPresenter extends PresenterWidget<InfoPresenter.InfoPresenterView>
implements InfoUiHandlers {
private static Logger logger = java.util.logging.Logger.getLogger("");
interface InfoPresenterView extends PopupView, HasUiHandlers<InfoPresenter> {
public void infoMessage(String info);
}
@Inject
InfoPresenter(EventBus eventBus, InfoPresenterView view) {
super(eventBus, view);
getView().setUiHandlers(this);
bindToEvent();
}
@Override
public void onBind() {
super.onBind();
}
private void bindToEvent() {
/*
controller.getEventBus().addHandler(MonitorEvent.TYPE, new MonitorEvent.MonitorEventHandler() {
@Override
public void onMonitor(MonitorEvent event) {
}
});
*/
}
public void infoMessage(String error) {
logger.log(Level.FINE,"Info message: " + error);
getView().infoMessage(error);
}
}

13
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoUiHandlers.java

@ -0,0 +1,13 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.info;
import com.gwtplatform.mvp.client.UiHandlers;
/**
*
* @author Giancarlo Panichi
*
*/
public interface InfoUiHandlers extends UiHandlers{
}

68
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.java

@ -0,0 +1,68 @@
package org.gcube.portlets.user.accountingdashboard.client.application.dialog.info;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.inject.Inject;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.Paragraph;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.PopupViewWithUiHandlers;
/**
*
* @author Giancarlo Panichi
*
*/
public class InfoView extends PopupViewWithUiHandlers<InfoPresenter> implements InfoPresenter.InfoPresenterView {
private static Logger logger = java.util.logging.Logger.getLogger("");
interface Binder extends UiBinder<PopupPanel, InfoView> {
}
@UiField
DialogBox dialogBox;
@UiField
Paragraph infoMsg;
@UiField
Button okBtn;
@UiHandler("okBtn")
void handleClick(ClickEvent e) {
logger.log(Level.FINE,"Close info dialog");
dialogBox.hide();
}
@Inject
InfoView(Binder uiBinder, EventBus eventBus) {
super(eventBus);
init();
initWidget(uiBinder.createAndBindUi(this));
}
private void init() {
dialogBox = new DialogBox(false, true);
dialogBox.getElement().getStyle().setZIndex(1070);
infoMsg = new Paragraph();
okBtn = new Button();
}
@Override
public void infoMessage(String error) {
infoMsg.setText(error);
dialogBox.center();
dialogBox.show();
}
}

31
src/main/java/org/gcube/portlets/user/accountingdashboard/client/application/dialog/info/InfoView.ui.xml

@ -0,0 +1,31 @@
<!-- @Author Giancarlo Panichi -->
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
<ui:with field="res"
type="org.gcube.portlets.user.accountingdashboard.client.resources.AppResources" />
<!-- styleName="{style.popup}" -->