Compare commits
2 Commits
master
...
horizontal
Author | SHA1 | Date |
---|---|---|
lucio.lelii | f3a3166695 | |
lucio.lelii | 20226d30fb |
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/messages-2.5.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/messages-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/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="src" output="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes" path="target/generated-sources/gwt">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
|
@ -1,174 +1 @@
|
|||
#
|
||||
ignore_me
|
||||
tomcat
|
||||
|
||||
target
|
||||
.classpath
|
||||
.visual
|
||||
.project
|
||||
.settings
|
||||
/**/.DS_Store
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/java,macos,linux,visualstudiocode,eclipse
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=java,macos,linux,visualstudiocode,eclipse
|
||||
|
||||
### Eclipse ###
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
.scala_dependencies
|
||||
.worksheet
|
||||
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
### Eclipse Patch ###
|
||||
# Spring Boot Tooling
|
||||
.sts4-cache/
|
||||
|
||||
### Java ###
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
### Linux ###
|
||||
*~
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### macOS Patch ###
|
||||
# iCloud generated files
|
||||
*.icloud
|
||||
|
||||
### VisualStudioCode ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
### VisualStudioCode Patch ###
|
||||
# Ignore all local history of files
|
||||
.history
|
||||
.ionide
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/java,macos,linux,visualstudiocode,eclipse
|
||||
/target/
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>message-conversations</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<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>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.gwtplugins.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.liferay.ide.core.liferayNature</nature>
|
||||
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
|
||||
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/webapp"/>
|
||||
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="target/m2e-wtp/web-resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
|
@ -0,0 +1,4 @@
|
|||
eclipse.preferences.version=1
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/message-conversations/target/message-conversations-0.0.1-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
|
@ -0,0 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=
|
|
@ -0,0 +1,5 @@
|
|||
eclipse.preferences.version=1
|
||||
lastWarOutDir=${webappDirectory}
|
||||
launchConfigExternalUrlPrefix=
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
|
@ -0,0 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=
|
|
@ -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//target/generated-sources/gwt=UTF-8
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,112 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.APILeak=warning
|
||||
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
|
@ -0,0 +1,3 @@
|
|||
eclipse.preferences.version=1
|
||||
validateFragments=false
|
||||
validation.use-project-settings=true
|
|
@ -0,0 +1,4 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
<wb-module deploy-name="messages-2.5.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"/>
|
||||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
|
||||
|
||||
<property name="java-output-path" value="/message-conversations/target/message-conversations-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
<property name="context-root" value="messages"/>
|
||||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
</project-modules>
|
|
@ -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>
|
|
@ -0,0 +1,10 @@
|
|||
<?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="liferay.portlet" version="6.0"/>
|
||||
<installed facet="jst.jaxrs" version="2.0"/>
|
||||
<installed facet="com.gwtplugins.gwt.facet" version="1.0"/>
|
||||
</faceted-project>
|
|
@ -0,0 +1 @@
|
|||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
|
@ -0,0 +1 @@
|
|||
Window
|
|
@ -0,0 +1,2 @@
|
|||
disabled=06target
|
||||
eclipse.preferences.version=1
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"plugins": {
|
||||
"guess-types": {
|
||||
|
||||
},
|
||||
"outline": {
|
||||
|
||||
},
|
||||
"liferay": {
|
||||
|
||||
},
|
||||
"yui3": {
|
||||
|
||||
},
|
||||
"aui2.0.x": {
|
||||
|
||||
}
|
||||
},
|
||||
"libs": [
|
||||
"ecma5",
|
||||
"browser"
|
||||
]
|
||||
}
|
60
CHANGELOG.md
60
CHANGELOG.md
|
@ -1,60 +0,0 @@
|
|||
|
||||
# Changelog for Messages Portlet
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v2.6.1] - 2024-10-25
|
||||
|
||||
maven-portal-bom 4.0.0
|
||||
|
||||
|
||||
## [v2.6.0] - 2022-09-22
|
||||
|
||||
- Fix Bug #23898: open with email addresse preset is not working anymore
|
||||
- Moved to OpenJDK11
|
||||
- Moved to GWT 2.9.0
|
||||
|
||||
## [v2.5.2] - 2022-06-16
|
||||
|
||||
- Released for removal HL from portal
|
||||
|
||||
## [v2.5.1] - 2021-09-09
|
||||
|
||||
- Fixed attachment issue #21972
|
||||
|
||||
## [v2.5.0] - 2021-07-28
|
||||
|
||||
- Ported to git
|
||||
|
||||
- Remove HomeLibrary dependency and replace with storage hub one
|
||||
|
||||
- Temporarely removed possibility to add attachments
|
||||
|
||||
## [v2.4.0] - 2019-10-25
|
||||
|
||||
- Bug #17876 the message menu isn't fully displayed if there is only one message or no other messages below
|
||||
|
||||
- Incident #17778 direct download attachment does not work
|
||||
|
||||
## [v2.3.0] - 2019-02-28
|
||||
|
||||
- Feature #10068, Request for enhancement: new Messages is error prone and challenging to use
|
||||
|
||||
- Feature #16194, Isolate Gateway user list in Messages
|
||||
|
||||
## [v2.1.0] - 2018-06-14
|
||||
|
||||
- Updated Workspace Explorer dependency
|
||||
|
||||
- Added support for SendTo
|
||||
|
||||
## [v2.0.0] -2 017-09-21
|
||||
|
||||
- Improved look and feel
|
||||
|
||||
- Responsive, works on mobile
|
||||
|
||||
## [v1.0.0] - 2013-01-13
|
||||
|
||||
- First release
|
26
FUNDING.md
26
FUNDING.md
|
@ -1,26 +0,0 @@
|
|||
# Acknowledgments
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
|
||||
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
|
||||
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
|
||||
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
|
||||
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
|
||||
- the H2020 research and innovation programme
|
||||
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
|
||||
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
|
||||
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
|
||||
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
|
||||
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
|
||||
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
|
||||
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
|
||||
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
|
||||
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
|
||||
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
|
||||
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
|
||||
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
|
||||
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
|
18
README.md
18
README.md
|
@ -20,23 +20,29 @@ See [Releases](https://code-repo.d4science.org/gCubeSystem/Messages/releases).
|
|||
|
||||
## Authors
|
||||
|
||||
* **Massimiliano Assante** ([ORCID](https://orcid.org/0000-0002-3761-1492)) - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/M.Assante)
|
||||
* **Alfredo Oliviero** ([ORCID]( https://orcid.org/0009-0007-3191-1025)) - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/A.Oliviero)
|
||||
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
|
||||
|
||||
## Maintainers
|
||||
|
||||
* **Massimiliano Assante** ([ORCID](https://orcid.org/0000-0002-3761-1492)) - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/M.Assante)
|
||||
* **Alfredo Oliviero** ([ORCID]( https://orcid.org/0009-0007-3191-1025)) - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/A.Oliviero)
|
||||
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
|
||||
|
||||
## About the gCube Framework
|
||||
|
||||
## About the gCube Framework
|
||||
This software is part of the [gCubeFramework](https://www.gcube-system.org/ "gCubeFramework"): an
|
||||
open-source software toolkit used for building and operating Hybrid Data
|
||||
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
||||
by favouring the realisation of reuse oriented policies.
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
||||
|
||||
- the Sixth Framework Programme for Research and Technological Development
|
||||
- DILIGENT (grant no. 004260);
|
||||
- the Seventh Framework Programme for research, technological development and demonstration
|
||||
- D4Science (grant no. 212488), D4Science-II (grant no.239019), ENVRI (grant no. 283465), EUBrazilOpenBio (grant no. 288754), iMarine(grant no. 283644);
|
||||
- the H2020 research and innovation programme
|
||||
- BlueBRIDGE (grant no. 675680), EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant no. 654119), SoBigData (grant no. 654024),DESIRA (grant no. 818194), ARIADNEplus (grant no. 823914), RISIS2 (grant no. 824091), PerformFish (grant no. 727610), AGINFRAplus (grant no. 731001);
|
||||
|
|
@ -0,0 +1 @@
|
|||
${gcube.license}
|
|
@ -0,0 +1,61 @@
|
|||
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
|
||||
--------------------------------------------------
|
||||
|
||||
* Massimiliano Assante (massimiliano.assante-AT-isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
* Francesco Mangiacrapa (francesco.mangiacrapa-AT-isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
|
||||
* Massimiliano Assante (massimiliano.assante-AT-isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy).
|
||||
|
||||
Download information
|
||||
--------------------------------------------------
|
||||
|
||||
Source code is available from SVN:
|
||||
${scm.url}
|
||||
|
||||
Binaries can be downloaded from the gCube website:
|
||||
${gcube.website}
|
||||
|
||||
|
||||
Installation
|
||||
--------------------------------------------------
|
||||
|
||||
|
||||
Documentation
|
||||
--------------------------------------------------
|
||||
|
||||
Documentation is available on-line in the gCube Wiki:
|
||||
${gcube.wikiRoot}/Workspace
|
||||
|
||||
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.
|
|
@ -0,0 +1,65 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.messages.2-4-0"
|
||||
date="2019-10-25">
|
||||
<Change>Bug #17876 the message menu isn't fully displayed if there is only one message or no other messages below</Change>
|
||||
<Change>Incident #17778 direct download attachment does not work</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.2-3-0"
|
||||
date="2019-02-28">
|
||||
<Change>Feature #10068, Request for enhancement: new Messages is error prone and challenging to use</Change>
|
||||
<Change>Feature #16194, Isolate Gateway user list in Messages</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.2-1-0"
|
||||
date="2018-06-14">
|
||||
<Change>Updated Workspace Explorer dependency</Change>
|
||||
<Change>Added support for SendTo</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.2-0-0"
|
||||
date="2017-09-21">
|
||||
<Change>Improved look and feel</Change>
|
||||
<Change>Responsive, works on mobile</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.1-3-0"
|
||||
date="2016-11-28">
|
||||
<Change>Removed ASL Session</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.0-8-0"
|
||||
date="2015-10-08">
|
||||
<Change>[Feature #879] Message Improvements</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.0-7-0"
|
||||
date="2015-06-05">
|
||||
<Change>Upgraded to GWT 2.7</Change>
|
||||
<Change>[Feature #129] Porting to HL 2.0</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.0-6-0"
|
||||
date="2013-06-04">
|
||||
<Change>Fixed bug on "reply all"</Change>
|
||||
<Change>Changed icons</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.0-5-0"
|
||||
date="2013-06-04">
|
||||
<Change>Updated pom to support new gcube core (gcube release 3.2)
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.0-4-0"
|
||||
date="2013-10-21">
|
||||
<Change>#Ticket 2223. This project was enhancements to gwt 2.5.1
|
||||
</Change>
|
||||
<Change>GCF dependency was removed</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.0-3-0"
|
||||
date="2013-07-08">
|
||||
<Change>Updated show attachments: this functionality now calls the
|
||||
servlet contained in ws-tree
|
||||
</Change>
|
||||
<Change>Error management for attachments: it was added redirect
|
||||
functionality in download servlet
|
||||
</Change>
|
||||
<Change>Fixed Ticket #1348</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.messages.0-1-0"
|
||||
date="2013-01-13">
|
||||
<Change>First Release</Change>
|
||||
</Changeset>
|
||||
</ReleaseNotes>
|
|
@ -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>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ID></ID>
|
||||
<Type>Service</Type>
|
||||
<Profile>
|
||||
<Description>${description}</Description>
|
||||
<Class>PortletUser</Class>
|
||||
<Name>${artifactId}</Name>
|
||||
<Version>${version}</Version>
|
||||
<Packages>
|
||||
<Software>
|
||||
<Name>${artifactId}</Name>
|
||||
<Version>${version}</Version>
|
||||
<MavenCoordinates>
|
||||
<groupId>${groupId}</groupId>
|
||||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
</MavenCoordinates>
|
||||
<Files>
|
||||
<File>target/${build.finalName}.war</File>
|
||||
</Files>
|
||||
</Software>
|
||||
</Packages>
|
||||
</Profile>
|
||||
</Resource>
|
73
pom.xml
73
pom.xml
|
@ -7,13 +7,13 @@
|
|||
<parent>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<version>1.2.0</version>
|
||||
<version>1.1.0</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
<groupId>org.gcube.portets.user</groupId>
|
||||
<artifactId>messages</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.6.1</version>
|
||||
<version>2.5.0-SNAPSHOT</version>
|
||||
<description>
|
||||
gCube Messages Portlet for exchanging messages with other users.
|
||||
</description>
|
||||
|
@ -25,7 +25,11 @@
|
|||
|
||||
<properties>
|
||||
<!-- Convenience property to set the GWT version -->
|
||||
<gwt.version>2.9.0</gwt.version>
|
||||
<gwt.version>2.8.2</gwt.version>
|
||||
<distroDirectory>distro</distroDirectory>
|
||||
<!-- GWT 2.8 requires 1.8 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<gwt-material.version>2.0.1</gwt-material.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
@ -35,7 +39,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>4.0.0</version>
|
||||
<version>3.6.1-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -98,12 +102,6 @@
|
|||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.widgets</groupId>
|
||||
<artifactId>workspace-explorer</artifactId>
|
||||
|
@ -163,6 +161,11 @@
|
|||
<artifactId>gwt-material-addins</artifactId>
|
||||
<version>${gwt-material.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.gwtmaterialdesign</groupId>
|
||||
<artifactId>gwt-material-table</artifactId>
|
||||
<version>${gwt-material.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portal</groupId>
|
||||
<artifactId>notifications-common-library</artifactId>
|
||||
|
@ -197,11 +200,12 @@
|
|||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>1.7.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
@ -242,6 +246,14 @@
|
|||
<hostedWebapp>${webappDirectory}</hostedWebapp>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.0-M1</version>
|
||||
<configuration>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Copy static web files before executing gwt:run -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -267,24 +279,51 @@
|
|||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- SA Plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
<additionalJOption>-Xdoclint:none</additionalJOption>
|
||||
<descriptors>
|
||||
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-doc</id>
|
||||
<id>servicearchive</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-profile</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${distroDirectory}</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>profile.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
|
||||
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
||||
import org.gcube.portets.user.message_conversations.shared.CurrUserAndPortalUsersWrapper;
|
||||
import org.gcube.portets.user.message_conversations.shared.MessagesWindow;
|
||||
import org.gcube.portets.user.message_conversations.shared.WSUser;
|
||||
|
||||
import com.google.gwt.user.client.rpc.RemoteService;
|
||||
|
@ -13,6 +14,7 @@ import com.google.gwt.user.client.rpc.RemoteService;
|
|||
*/
|
||||
public interface MessageService extends RemoteService {
|
||||
|
||||
MessagesWindow getMessagesWindows(boolean sent, int limit, int offset);
|
||||
ArrayList<ConvMessage> getMessages(boolean sent);
|
||||
ConvMessage getMessageById(String messageId, boolean sent);
|
||||
CurrUserAndPortalUsersWrapper getWorkspaceUsers();
|
||||
|
|
|
@ -1,18 +1,49 @@
|
|||
package org.gcube.portets.user.message_conversations.client.autocomplete;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.gwt.dom.client.Document;
|
||||
import com.google.gwt.event.dom.client.*;
|
||||
import com.google.gwt.event.logical.shared.*;
|
||||
import com.google.gwt.event.dom.client.BlurEvent;
|
||||
import com.google.gwt.event.dom.client.BlurHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.FocusEvent;
|
||||
import com.google.gwt.event.dom.client.FocusHandler;
|
||||
import com.google.gwt.event.dom.client.KeyCodes;
|
||||
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.logical.shared.ValueChangeEvent;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.ui.*;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.SuggestBox;
|
||||
import com.google.gwt.user.client.ui.SuggestOracle;
|
||||
import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
import gwt.material.design.addins.client.MaterialAddins;
|
||||
import gwt.material.design.addins.client.autocomplete.constants.AutocompleteType;
|
||||
import gwt.material.design.addins.client.base.constants.AddinsCssName;
|
||||
import gwt.material.design.client.MaterialDesignBase;
|
||||
import gwt.material.design.client.base.*;
|
||||
import gwt.material.design.client.base.mixin.*;
|
||||
import gwt.material.design.client.base.AbstractValueWidget;
|
||||
import gwt.material.design.client.base.HasPlaceholder;
|
||||
import gwt.material.design.client.base.HasProgress;
|
||||
import gwt.material.design.client.base.HasReadOnly;
|
||||
import gwt.material.design.client.base.HasType;
|
||||
import gwt.material.design.client.base.MaterialWidget;
|
||||
import gwt.material.design.client.base.mixin.CssTypeMixin;
|
||||
import gwt.material.design.client.base.mixin.FocusableMixin;
|
||||
import gwt.material.design.client.base.mixin.ProgressMixin;
|
||||
import gwt.material.design.client.base.mixin.ReadOnlyMixin;
|
||||
import gwt.material.design.client.constants.CssName;
|
||||
import gwt.material.design.client.constants.IconType;
|
||||
import gwt.material.design.client.constants.ProgressType;
|
||||
|
@ -23,9 +54,6 @@ import gwt.material.design.client.ui.html.Label;
|
|||
import gwt.material.design.client.ui.html.ListItem;
|
||||
import gwt.material.design.client.ui.html.UnorderedList;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevzlou7979
|
||||
|
@ -62,8 +90,7 @@ public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Sug
|
|||
private boolean directInputAllowed = true;
|
||||
private MaterialChipProvider chipProvider = new DefaultMaterialChipProvider();
|
||||
|
||||
private final ErrorMixin<AbstractValueWidget, MaterialLabel> errorMixin = new ErrorMixin<>(this, errorLabel, list, placeholderLabel);
|
||||
|
||||
|
||||
private FocusableMixin<MaterialWidget> focusableMixin;
|
||||
private ReadOnlyMixin<MaterialAutoComplete, TextBox> readOnlyMixin;
|
||||
|
||||
|
@ -684,11 +711,7 @@ public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Sug
|
|||
itemBox.setEnabled(enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErrorMixin<AbstractValueWidget, MaterialLabel> getErrorMixin() {
|
||||
return errorMixin;
|
||||
}
|
||||
|
||||
|
||||
public Label getPlaceholderLabel() {
|
||||
return placeholderLabel;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,12 @@ import org.gcube.portets.user.message_conversations.client.ui.resources.Messages
|
|||
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
||||
import org.gcube.portets.user.message_conversations.shared.MessageUserModel;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.IconCell;
|
||||
import com.github.gwtbootstrap.client.ui.constants.IconSize;
|
||||
import com.google.gwt.cell.client.CheckboxCell;
|
||||
import com.google.gwt.cell.client.TextCell;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
|
@ -38,9 +43,16 @@ import com.google.gwt.core.client.GWT;
|
|||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.logical.shared.ResizeEvent;
|
||||
import com.google.gwt.event.logical.shared.ResizeHandler;
|
||||
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
|
||||
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.cellview.client.CellTable;
|
||||
import com.google.gwt.user.cellview.client.Column;
|
||||
import com.google.gwt.user.cellview.client.RowStyles;
|
||||
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
|
||||
import com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy;
|
||||
import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.rpc.ServiceDefTarget;
|
||||
|
@ -50,18 +62,22 @@ import com.google.gwt.user.client.ui.HTMLPanel;
|
|||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwt.user.client.ui.ScrollPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.view.client.DefaultSelectionEventManager;
|
||||
import com.google.gwt.view.client.MultiSelectionModel;
|
||||
import com.google.gwt.view.client.SelectionModel;
|
||||
|
||||
import gwt.material.design.client.constants.IconType;
|
||||
import gwt.material.design.client.constants.Position;
|
||||
import gwt.material.design.client.data.DataSource;
|
||||
import gwt.material.design.client.ui.MaterialAnchorButton;
|
||||
import gwt.material.design.client.ui.MaterialBadge;
|
||||
import gwt.material.design.client.ui.MaterialFAB;
|
||||
import gwt.material.design.client.ui.MaterialLink;
|
||||
import gwt.material.design.client.ui.MaterialProgress;
|
||||
import gwt.material.design.client.ui.MaterialRow;
|
||||
import gwt.material.design.client.ui.MaterialToast;
|
||||
import gwt.material.design.client.ui.animate.MaterialAnimation;
|
||||
import gwt.material.design.client.ui.animate.Transition;
|
||||
|
||||
/**
|
||||
* @author Massimiliano Assante, CNR-ISTI
|
||||
*/
|
||||
|
@ -82,22 +98,28 @@ public class ApplicationView extends Composite {
|
|||
|
||||
|
||||
@UiField ScrollPanel scrollerPanel;
|
||||
@UiField MaterialRow rightPanel;
|
||||
//@UiField MaterialRow rightPanel;
|
||||
@UiField HTMLPanel htmlPanel;
|
||||
@UiField MaterialFAB FAB;
|
||||
@UiField MaterialLink menu, newMessage, switcher;
|
||||
@UiField MaterialAnchorButton replyAll, reply, forward;
|
||||
@UiField MaterialProgress messageLoader, messagesLoader;
|
||||
@UiField MaterialProgress messageLoader;
|
||||
@UiField MaterialBadge badge;
|
||||
@UiField ShowMorePagerPanel pagerPanel;
|
||||
|
||||
MyMaterialCollection<ConvMessage> messagesCollection;
|
||||
|
||||
|
||||
CellTable<ConvMessage> sentCellList;
|
||||
|
||||
MessageProvider mp;
|
||||
|
||||
DataSource<ConvMessage> dataSource = new MessageDataSource(false, convService);
|
||||
//InfiniteScrollView scrollView = new InfiniteScrollView(dataSource);
|
||||
|
||||
private ConvMessage currentSelected;
|
||||
private DisplayMessage displayMessage;
|
||||
private WriteMessage newMessageDisplay;
|
||||
private boolean isSendTo = false;
|
||||
|
||||
|
||||
public ApplicationView(String... sendToUserNames) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
((ServiceDefTarget) convService).setServiceEntryPoint(Utils.getServiceEntryPoint());
|
||||
|
@ -126,16 +148,96 @@ public class ApplicationView extends Composite {
|
|||
isSendTo = true;
|
||||
messageLoader.setVisible(false);
|
||||
}
|
||||
readUserMessages(false, isSendTo);
|
||||
|
||||
GWT.log("application initialized");
|
||||
|
||||
sentCellList = new CellTable<ConvMessage>(ConvMessage.KEY_PROVIDER);
|
||||
sentCellList.setPageSize(100);
|
||||
sentCellList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
|
||||
sentCellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION);
|
||||
sentCellList.setWidth("100%", false);
|
||||
|
||||
|
||||
|
||||
readUserMessages(false, isSendTo);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the columns to the table.
|
||||
*/
|
||||
private void initTableColumns(CellTable<ConvMessage> cellTable
|
||||
,final SelectionModel<ConvMessage> selectionModel /*,
|
||||
ListHandler<ConvMessage> sortHandler*/) {
|
||||
// Checkbox column. This table will uses a checkbox column for selection.
|
||||
// Alternatively, you can call cellTable.setSelectionEnabled(true) to enable
|
||||
// mouse selection.
|
||||
|
||||
cellTable.setRowStyles(new RowStyles<ConvMessage>() {
|
||||
|
||||
@Override
|
||||
public String getStyleNames(ConvMessage row, int rowIndex) {
|
||||
if (row.isRead())
|
||||
return "{style.read}";
|
||||
else return "";
|
||||
}
|
||||
});
|
||||
Column<ConvMessage, Boolean> checkColumn = new Column<ConvMessage, Boolean>(
|
||||
new CheckboxCell(true, false)) {
|
||||
@Override
|
||||
public Boolean getValue(ConvMessage object) {
|
||||
// Get the value from the selection model.
|
||||
return selectionModel.isSelected(object);
|
||||
//return false;
|
||||
}
|
||||
};
|
||||
cellTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("</br>"));
|
||||
cellTable.setColumnWidth(checkColumn, 80, Unit.PX);
|
||||
|
||||
// From.
|
||||
Column<ConvMessage, String> fromColumn = new Column<ConvMessage, String>(
|
||||
new TextCell()) {
|
||||
@Override
|
||||
public String getValue(ConvMessage object) {
|
||||
return object.getOwner().getFullName();
|
||||
}
|
||||
};
|
||||
|
||||
cellTable.addColumn(fromColumn, "From");
|
||||
cellTable.setColumnWidth(fromColumn, 40, Unit.PCT);
|
||||
|
||||
// Subject.
|
||||
Column<ConvMessage, String> subjectColumn = new Column<ConvMessage, String>(
|
||||
new TextCell()) {
|
||||
@Override
|
||||
public String getValue(ConvMessage object) {
|
||||
return object.getSubject();
|
||||
}
|
||||
};
|
||||
cellTable.addColumn(subjectColumn, "Subject");
|
||||
cellTable.setColumnWidth(subjectColumn, 200, Unit.PCT);
|
||||
|
||||
// date.
|
||||
Column<ConvMessage, String> dateColumn = new Column<ConvMessage, String>(
|
||||
new TextCell()) {
|
||||
@Override
|
||||
public String getValue(ConvMessage object) {
|
||||
return Utils.getFormatteDate(object.getDate());
|
||||
}
|
||||
};
|
||||
cellTable.addColumn(dateColumn, "Date");
|
||||
cellTable.setColumnWidth(subjectColumn, 20, Unit.PCT);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sent
|
||||
*/
|
||||
*
|
||||
**/
|
||||
public void readUserMessages(final boolean sent, boolean isSendTo) {
|
||||
messagesLoader.setVisible(true);
|
||||
convService.getMessages(sent, new AsyncCallback<ArrayList<ConvMessage>>() {
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
|
@ -145,55 +247,35 @@ public class ApplicationView extends Composite {
|
|||
@Override
|
||||
public void onSuccess(ArrayList<ConvMessage> messages) {
|
||||
if (messages != null) {
|
||||
showMessages(messages, sent);
|
||||
if (!isSendTo) {
|
||||
if (messages.size() > 0)
|
||||
readUserMessage(messages.get(0).getId(), sent);
|
||||
else {
|
||||
writeWelcomeMessage();
|
||||
messageLoader.setVisible(false);
|
||||
}
|
||||
}
|
||||
totalMessages = messages.size();
|
||||
mp = new MessageProvider(messages);
|
||||
mp.addDataDisplay(sentCellList);
|
||||
|
||||
// Add a selection model so we can select cells.
|
||||
final SelectionModel<ConvMessage> selectionModel = new MultiSelectionModel<ConvMessage>(ConvMessage.KEY_PROVIDER);
|
||||
sentCellList.setSelectionModel(selectionModel,
|
||||
DefaultSelectionEventManager.<ConvMessage> createCheckboxManager());
|
||||
|
||||
|
||||
initTableColumns(sentCellList, selectionModel);
|
||||
|
||||
pagerPanel.setDisplay(sentCellList);
|
||||
pagerPanel.setIncrementSize(50);
|
||||
messageLoader.setVisible(false);
|
||||
readUserMessage(mp.getDataProvider().getList().get(0).getId(), sent);
|
||||
} else {
|
||||
showErrorOccurred();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void showErrorOccurred() {
|
||||
messagesLoader.setVisible(false);
|
||||
//messagesCollection.clear();
|
||||
messageLoader.setVisible(false);
|
||||
hideSidePanel();
|
||||
writeErrorMessage();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param messages
|
||||
* @param sent
|
||||
*/
|
||||
public void showMessages(ArrayList<ConvMessage> messages, boolean sent) {
|
||||
messagesLoader.setVisible(false);
|
||||
int scrollerHeight = Window.getClientHeight() - 100;
|
||||
scrollerPanel.setHeight(scrollerHeight+"px");
|
||||
pagerPanel.setHeight(scrollerHeight+"px");
|
||||
GWT.log("message returned are "+messages.size());
|
||||
messagesCollection= new MyMaterialCollection<>(messages, c -> new MessageItem(c, messagesCollection, this, sent));
|
||||
messagesCollection.init();
|
||||
pagerPanel.setDisplay(messagesCollection);
|
||||
for (ConvMessage convMessage : messages) {
|
||||
if (! (sent || convMessage.isRead()))
|
||||
unreadMessages++;
|
||||
totalMessages++;
|
||||
}
|
||||
if (messages.size() > 0) {
|
||||
GWT.log("message returned are "+messages.size());
|
||||
MessageItem first = (MessageItem) messagesCollection.getChildrenList().get(0);
|
||||
first.setSelected(true);
|
||||
} else {
|
||||
|
||||
}
|
||||
updateBadge(sent);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param sent
|
||||
|
@ -248,8 +330,9 @@ public class ApplicationView extends Composite {
|
|||
displayMessage(messageId, sent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void displayMessage(String messageId, final boolean sent) {
|
||||
messageLoader.setColor(Utils.getRandomColor());
|
||||
messageLoader.setVisible(true);
|
||||
scrollerPanel.clear();
|
||||
convService.getMessageById(messageId, toggleSwitch, new AsyncCallback<ConvMessage>() {
|
||||
|
@ -271,7 +354,7 @@ public class ApplicationView extends Composite {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void updateBadge(boolean sent) {
|
||||
String badgeText = totalMessages + (sent ? " sent" : " (" + unreadMessages + " unread" + ")");
|
||||
if (unreadMessages == 0 && !sent)
|
||||
|
@ -323,8 +406,7 @@ public class ApplicationView extends Composite {
|
|||
private void displayNewOrReplyMessage() {
|
||||
WRITING_MESSAGE = true;
|
||||
FAB.setVisible(false);
|
||||
if (messagesCollection != null)
|
||||
messagesCollection.clearActive();
|
||||
//messagesCollection.clearActive();
|
||||
scrollerPanel.clear();
|
||||
scrollerPanel.add(newMessageDisplay);
|
||||
newMessageDisplay.setFocusOnUsersInput();
|
||||
|
@ -335,10 +417,7 @@ public class ApplicationView extends Composite {
|
|||
private void prepareNewMessageForSendTo(String[] usernamesToSendTo) {
|
||||
newMessageDisplay = new WriteMessage(convService, this);
|
||||
newMessageDisplay.setNewMessageForSendTo(usernamesToSendTo);
|
||||
GWT.log("setNewMessageForSendTo - Done");
|
||||
displayNewOrReplyMessage();
|
||||
GWT.log("displayNewOrReplyMessage - Done");
|
||||
|
||||
}
|
||||
|
||||
@UiHandler("newMessage")
|
||||
|
@ -388,7 +467,6 @@ public class ApplicationView extends Composite {
|
|||
displayMessage.getMainPanel().setGrid("l8 m12 s12");
|
||||
newMessageDisplay.getMainPanel().setLeft(350);
|
||||
newMessageDisplay.getMainPanel().setGrid("l8 m12 s12");
|
||||
rightPanel.setLeft(0);
|
||||
toggle = ! toggle;
|
||||
}
|
||||
|
||||
|
@ -398,7 +476,6 @@ public class ApplicationView extends Composite {
|
|||
newMessageDisplay.getMainPanel().setLeft(0);
|
||||
newMessageDisplay.getMainPanel().setGrid("l12 s12 m12");
|
||||
|
||||
rightPanel.setLeft(-350);
|
||||
toggle = ! toggle;
|
||||
}
|
||||
|
||||
|
@ -415,9 +492,9 @@ public class ApplicationView extends Composite {
|
|||
FAB.setVisible(false);
|
||||
displayMessage.showMessage(welcomeMessage);
|
||||
welcomeMessage.setContent(MessagesResources.WELCOME_MESSAGE.substring(0, 102)+ " ...");
|
||||
MessageItem item = new MessageItem(welcomeMessage, messagesCollection, this, false);
|
||||
item.hideMessageMenu();
|
||||
messagesCollection.add(item);
|
||||
MessageItem item = new MessageItem(welcomeMessage, false);
|
||||
//item.hideMessageMenu();
|
||||
//messagesCollection.add(item);
|
||||
totalMessages++;
|
||||
updateBadge(false);
|
||||
}
|
||||
|
@ -431,9 +508,9 @@ public class ApplicationView extends Composite {
|
|||
FAB.setVisible(false);
|
||||
displayMessage.showMessage(welcomeMessage);
|
||||
welcomeMessage.setContent(MessagesResources.ERROR_MESSAGE.substring(0, 102)+ " ...");
|
||||
MessageItem item = new MessageItem(welcomeMessage, messagesCollection, this, false);
|
||||
item.hideMessageMenu();
|
||||
messagesCollection.add(item);
|
||||
MessageItem item = new MessageItem(welcomeMessage, false);
|
||||
//item.hideMessageMenu();
|
||||
//messagesCollection.add(item);
|
||||
totalMessages++;
|
||||
updateBadge(false);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:m="urn:import:gwt.material.design.client.ui"
|
||||
xmlns:ma="urn:import:gwt.material.design.addins.client"
|
||||
xmlns:mc="urn:import:org.gcube.portets.user.message_conversations.client.autocomplete"
|
||||
xmlns:my="urn:import:org.gcube.portets.user.message_conversations.client.ui">
|
||||
xmlns:s="urn:import:org.gcube.portets.user.message_conversations.client.ui">
|
||||
|
||||
<ui:style>
|
||||
.animation {
|
||||
|
@ -23,14 +23,17 @@
|
|||
}
|
||||
|
||||
.marginTop {
|
||||
margin-top: 0px;
|
||||
min-height: 850px;
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.overflowXHidden {
|
||||
overflow-x: hidden !important; /* needed in windows */
|
||||
}
|
||||
|
||||
.read {
|
||||
font-weight: bold; font-style: italic;
|
||||
}
|
||||
|
||||
.modalTitle {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
@ -40,11 +43,10 @@
|
|||
padding: 50px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="htmlPanel">
|
||||
<g:HTMLPanel ui:field="htmlPanel" >
|
||||
<!-- TOP BAR -->
|
||||
<m:MaterialHeader ui:field="header">
|
||||
<m:MaterialNavBar ui:field="navBar"
|
||||
layoutPosition="FIXED" addStyleNames="{style.topBar}" height="60"
|
||||
layoutPosition="RELATIVE" addStyleNames="{style.topBar}" height="60"
|
||||
backgroundColor="WHITE">
|
||||
<m:MaterialNavSection float="LEFT"
|
||||
showOn="SHOW_ON_MED_DOWN">
|
||||
|
@ -64,33 +66,24 @@
|
|||
textColor="LIGHT_BLUE_DARKEN_2" waves="LIGHT" />
|
||||
</m:MaterialNavSection>
|
||||
</m:MaterialNavBar>
|
||||
</m:MaterialHeader>
|
||||
|
||||
|
||||
<!-- SIDE PANEL -->
|
||||
<m:MaterialRow ui:field="rightPanel" depth="995"
|
||||
grid="l3 m3 s12" padding="0" backgroundColor="WHITE" height="90%"
|
||||
layoutPosition="FIXED" top="60" left="0" width="350px"
|
||||
addStyleNames="{style.animation} {style.borderRight}">
|
||||
<m:MaterialProgress type="INDETERMINATE"
|
||||
ui:field="messagesLoader" color="BLUE" />
|
||||
<my:ShowMorePagerPanel ui:field="pagerPanel"
|
||||
addStyleNames="{style.marginTop}">
|
||||
</my:ShowMorePagerPanel>
|
||||
</m:MaterialRow>
|
||||
|
||||
|
||||
<!-- MAIN WINDOW -->
|
||||
<m:MaterialContainer fontSize="0.8em">
|
||||
<m:MaterialRow layoutPosition="RELATIVE"
|
||||
grid="l8 s12 m12" top="65">
|
||||
<m:MaterialProgress type="INDETERMINATE"
|
||||
ui:field="messageLoader" color="TEAL" />
|
||||
<g:ScrollPanel height="600px" ui:field="scrollerPanel"
|
||||
addStyleNames="{style.overflowXHidden}"></g:ScrollPanel>
|
||||
</m:MaterialRow>
|
||||
</m:MaterialContainer>
|
||||
|
||||
<div height='100%'>
|
||||
|
||||
<!-- SIDE PANEL -->
|
||||
<s:ShowMorePagerPanel ui:field='pagerPanel' addStyleNames="{style.overflowXHidden}" height="300px" />
|
||||
|
||||
|
||||
<!-- MAIN WINDOW -->
|
||||
<m:MaterialContainer>
|
||||
<m:MaterialRow fontSize="0.8em">
|
||||
<m:MaterialProgress type="INDETERMINATE"
|
||||
ui:field="messageLoader" color="TEAL" />
|
||||
<g:ScrollPanel ui:field="scrollerPanel"
|
||||
addStyleNames="{style.overflowXHidden}"></g:ScrollPanel>
|
||||
</m:MaterialRow>
|
||||
</m:MaterialContainer>
|
||||
|
||||
</div>
|
||||
<!-- FAB -->
|
||||
<m:MaterialFAB ui:field="FAB">
|
||||
<m:MaterialButton type="FLOATING"
|
||||
|
@ -107,6 +100,5 @@
|
|||
iconType="REPLY" />
|
||||
</m:MaterialFABList>
|
||||
</m:MaterialFAB>
|
||||
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package org.gcube.portets.user.message_conversations.client.ui;
|
||||
|
||||
import org.gcube.portets.user.message_conversations.client.MessageServiceAsync;
|
||||
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
||||
import org.gcube.portets.user.message_conversations.shared.MessagesWindow;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
|
||||
import gwt.material.design.client.data.DataSource;
|
||||
import gwt.material.design.client.data.loader.LoadCallback;
|
||||
import gwt.material.design.client.data.loader.LoadConfig;
|
||||
import gwt.material.design.client.data.loader.LoadResult;
|
||||
|
||||
|
||||
public class MessageDataSource implements DataSource<ConvMessage> {
|
||||
|
||||
private MessageServiceAsync convService;
|
||||
private boolean sent;
|
||||
|
||||
public MessageDataSource(boolean sent, MessageServiceAsync convService) {
|
||||
this.convService = convService;
|
||||
this.sent= sent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void load(LoadConfig<ConvMessage> loadConfig, LoadCallback<ConvMessage> callback) {
|
||||
|
||||
convService.getMessagesWindows(this.sent, loadConfig.getOffset(), loadConfig.getLimit(),
|
||||
new AsyncCallback<MessagesWindow>() {
|
||||
@Override
|
||||
public void onSuccess(MessagesWindow messages) {
|
||||
callback.onSuccess(new LoadResult<>(messages.getMessages(), loadConfig.getOffset(), messages.getTotal()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable throwable) {
|
||||
GWT.log("Getting people async call failed.", throwable);
|
||||
callback.onFailure(throwable);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean useRemoteSort() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -23,7 +23,6 @@ import com.google.gwt.user.client.ui.Composite;
|
|||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
import gwt.material.design.client.constants.Color;
|
||||
import gwt.material.design.client.ui.MaterialCollection;
|
||||
import gwt.material.design.client.ui.MaterialCollectionItem;
|
||||
import gwt.material.design.client.ui.MaterialDropDown;
|
||||
import gwt.material.design.client.ui.MaterialIcon;
|
||||
|
@ -43,8 +42,6 @@ public class MessageItem extends Composite {
|
|||
|
||||
private boolean deleteClicked = true;
|
||||
|
||||
private ApplicationView ap;
|
||||
private MaterialCollection parentCollection;
|
||||
private ConvMessage myMessage;
|
||||
private boolean sent;
|
||||
|
||||
|
@ -64,13 +61,12 @@ public class MessageItem extends Composite {
|
|||
MessagesResources images = GWT.create(MessagesResources.class);
|
||||
|
||||
|
||||
public MessageItem(final ConvMessage m, MaterialCollection parentCollection, ApplicationView ap, boolean sent) {
|
||||
public MessageItem(final ConvMessage m, boolean sent) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
item.getElement().getStyle().setCursor(Cursor.POINTER);
|
||||
this.sent = sent;
|
||||
this.myMessage = m;
|
||||
this.ap = ap;
|
||||
this.parentCollection = parentCollection;
|
||||
//this.parentCollection = parentCollection;
|
||||
if (m.hasAttachments())
|
||||
attachmentsIcon.setVisibility(Visibility.VISIBLE);
|
||||
if (!sent && !m.isRead())
|
||||
|
@ -128,7 +124,7 @@ public class MessageItem extends Composite {
|
|||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
deleteButton.addClickHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
@ -145,26 +141,14 @@ public class MessageItem extends Composite {
|
|||
new MaterialToast(()->{doDelete(m.getSubject());}, link).toast("Deleting Message ("+m.getSubject()+")");
|
||||
item.setVisible(false);
|
||||
}
|
||||
});
|
||||
}); */
|
||||
dd.getElement().getStyle().setWidth(300, Unit.PX);
|
||||
String activator = "activate"+Random.nextInt();
|
||||
dd.setActivator(activator);
|
||||
messageActionIcon.setActivates(activator);
|
||||
}
|
||||
|
||||
|
||||
@UiHandler("setUnreadButton")
|
||||
void onSetUnread(ClickEvent e) {
|
||||
e.stopPropagation();
|
||||
if (myMessage.isRead()) {
|
||||
ap.setMessageUnread(myMessage, this.sent);
|
||||
myMessage.setRead(false);
|
||||
item.addStyleName("unread-message");
|
||||
} else {
|
||||
Window.alert("Message is marked as unread already.");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private void doDelete(String subject) {
|
||||
if (deleteClicked) {
|
||||
ap.deleteMessage(myMessage, this.sent);
|
||||
|
@ -172,7 +156,8 @@ public class MessageItem extends Composite {
|
|||
else
|
||||
deleteClicked = true;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
public void setSelected(boolean active) {
|
||||
item.setBackgroundColor(Color.WHITE);
|
||||
item.removeStyleName("unread-message");
|
||||
|
@ -180,22 +165,14 @@ public class MessageItem extends Composite {
|
|||
myMessage.setRead(true);
|
||||
}
|
||||
|
||||
/*
|
||||
@UiHandler("item")
|
||||
void onClickedMessage(ClickEvent e) {
|
||||
checkHideSideBarOnMobile();
|
||||
parentCollection.clearActive();
|
||||
//parentCollection.clearActive();
|
||||
ap.readUserMessage(myMessage.getId(), this.sent);
|
||||
setSelected(true);
|
||||
myMessage.setRead(true);
|
||||
}
|
||||
|
||||
private void checkHideSideBarOnMobile() {
|
||||
if (Utils.isMobile())
|
||||
ap.hideSidePanel();
|
||||
}
|
||||
|
||||
public void hideMessageMenu() {
|
||||
messageActionIcon.setVisible(false);
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
package org.gcube.portets.user.message_conversations.client.ui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
||||
|
||||
import com.google.gwt.view.client.HasData;
|
||||
import com.google.gwt.view.client.ListDataProvider;
|
||||
|
||||
/**
|
||||
* The data source for contact information used in the sample.
|
||||
*/
|
||||
public class MessageProvider {
|
||||
|
||||
/**
|
||||
* The singleton instance of the database.
|
||||
|
||||
private static MessageProvider instance;
|
||||
|
||||
|
||||
* Get the singleton instance of the contact database.
|
||||
*
|
||||
* @return the singleton instance
|
||||
|
||||
public static MessageProvider get() {
|
||||
if (instance == null) {
|
||||
instance = new MessageProvider();
|
||||
}
|
||||
return instance;
|
||||
} */
|
||||
|
||||
/**
|
||||
* The provider that holds the list of contacts in the database.
|
||||
*/
|
||||
private ListDataProvider<ConvMessage> dataProvider = new ListDataProvider<ConvMessage>();
|
||||
|
||||
|
||||
public MessageProvider(List<ConvMessage> messages) {
|
||||
List<ConvMessage> contacts = dataProvider.getList();
|
||||
contacts.addAll(messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new contact.
|
||||
*
|
||||
* @param contact the contact to add.
|
||||
*/
|
||||
public void addMessage(ConvMessage message) {
|
||||
List<ConvMessage> contacts = dataProvider.getList();
|
||||
// Remove the contact first so we don't add a duplicate.
|
||||
contacts.remove(message);
|
||||
contacts.add(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a display to the database. The current range of interest of the display
|
||||
* will be populated with data.
|
||||
*
|
||||
* @param display a {@Link HasData}.
|
||||
*/
|
||||
public void addDataDisplay(HasData<ConvMessage> display) {
|
||||
dataProvider.addDataDisplay(display);
|
||||
}
|
||||
|
||||
|
||||
public ListDataProvider<ConvMessage> getDataProvider() {
|
||||
return dataProvider;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Refresh all displays.
|
||||
*/
|
||||
public void refreshDisplays() {
|
||||
dataProvider.refresh();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
package org.gcube.portets.user.message_conversations.client.ui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.view.client.HasRows;
|
||||
import com.google.gwt.view.client.Range;
|
||||
import com.google.gwt.view.client.RangeChangeEvent.Handler;
|
||||
|
||||
import gwt.material.design.client.ui.MaterialCollection;
|
||||
|
||||
public class MyMaterialCollection<T> extends MaterialCollection implements HasRows {
|
||||
|
||||
private final int DEFAULT_LENGTH= 20;
|
||||
|
||||
private boolean init_called = false;
|
||||
|
||||
ArrayList<T> objects = new ArrayList<>();
|
||||
|
||||
Function<T, Widget> converter;
|
||||
|
||||
public MyMaterialCollection(ArrayList<T> objects, Function<T, Widget> function) {
|
||||
this.objects = objects;
|
||||
this.converter = function;
|
||||
}
|
||||
|
||||
int start=0;
|
||||
int length=DEFAULT_LENGTH;
|
||||
|
||||
public void init(){
|
||||
if (init_called) GWT.log("init already called");
|
||||
else {
|
||||
init_called = true;
|
||||
onRangeChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private void onRangeChanged() {
|
||||
int widgetCountIndex = super.getWidgetCount()-1;
|
||||
int index = widgetCountIndex-1>start ? widgetCountIndex: start;
|
||||
int finish = length>objects.size()? objects.size():length ;
|
||||
|
||||
for (int i =index; i<finish; i++) {
|
||||
super.add(converter.apply(objects.get(i)));
|
||||
}
|
||||
}
|
||||
|
||||
public void add(Widget widget) {}
|
||||
|
||||
@Override
|
||||
public HandlerRegistration addRangeChangeHandler(Handler handler) {
|
||||
return new MyHandlerRegistration();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerRegistration addRowCountChangeHandler(
|
||||
com.google.gwt.view.client.RowCountChangeEvent.Handler handler) {
|
||||
return new MyHandlerRegistration();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowCount() {
|
||||
GWT.log("get row count");
|
||||
return objects.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Range getVisibleRange() {
|
||||
GWT.log("get visible range");
|
||||
return new Range(start, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRowCountExact() {
|
||||
GWT.log("is row exact");
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRowCount(int count) {
|
||||
GWT.log("set row count");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRowCount(int count, boolean isExact) {
|
||||
GWT.log("set row count ex");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisibleRange(int start, int length) {
|
||||
this.start = start;
|
||||
this.length = length;
|
||||
onRangeChanged();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setVisibleRange(Range range) {
|
||||
this.setVisibleRange(range.getStart(), range.getLength());
|
||||
}
|
||||
|
||||
class MyHandlerRegistration implements HandlerRegistration{
|
||||
@Override
|
||||
public void removeHandler() {
|
||||
GWT.log("handler removed");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -84,7 +84,6 @@ public class ShowMorePagerPanel extends AbstractPager {
|
|||
public void setDisplay(HasRows display) {
|
||||
assert display instanceof Widget : "display must extend Widget";
|
||||
scrollable.setWidget((Widget) display);
|
||||
scrollable.scrollToTop();
|
||||
super.setDisplay(display);
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public class WriteMessage extends Composite {
|
|||
}
|
||||
|
||||
public void setNewMessageForSendTo(String[] usernames) {
|
||||
GWT.log("setNewMessageForSendTo - here add the users");
|
||||
GWT.log("her add the users");
|
||||
convService.getUsersInfo(usernames, new AsyncCallback<ArrayList<WSUser>>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -91,7 +91,7 @@ public class WriteMessage extends Composite {
|
|||
@Override
|
||||
public void onSuccess(ArrayList<WSUser> result) {
|
||||
for (WSUser user : result) {
|
||||
acModal.addItem(new UserSuggestion(user));
|
||||
acModal.addItem(new UserSuggestion(user));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
layoutPosition="RELATIVE" marginBottom="0" grid="l8 m12 s12"
|
||||
paddingLeft="10" paddingRight="60" marginLeft="5" marginTop="-5"
|
||||
addStyleNames="{style.animation} message-metadata" left="350">
|
||||
<m:MaterialModalFooter textAlign="RIGHT">
|
||||
<m:MaterialFooter textAlign="RIGHT">
|
||||
<m:MaterialButton ui:field="btnCloseModal" text="Cancel"
|
||||
type="FLAT" textColor="BLACK" waves="DEFAULT"/>
|
||||
<m:MaterialButton text="Send" type="FLAT" textColor="WHITE"
|
||||
backgroundColor="BLUE" waves="DEFAULT" ui:field="btnSendModal" />
|
||||
</m:MaterialModalFooter>
|
||||
</m:MaterialFooter>
|
||||
<m:MaterialPanel ui:field="sendingLoader" visible="false"
|
||||
addStyleNames="{style.alignCenter}">
|
||||
<m:MaterialLabel text="Sending message ..."
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
package org.gcube.portets.user.message_conversations.server;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.gcube.portets.user.message_conversations.client.MessageService;
|
||||
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
||||
import org.gcube.portets.user.message_conversations.shared.CurrUserAndPortalUsersWrapper;
|
||||
import org.gcube.portets.user.message_conversations.shared.WSUser;
|
||||
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class ConvService extends RemoteServiceServlet implements MessageService, HttpServletRetriever {
|
||||
|
||||
MessageService delegate;
|
||||
|
||||
public void init() {
|
||||
delegate = new ConvServiceImpl(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ConvMessage> getMessages(boolean sent) {
|
||||
return delegate.getMessages(sent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConvMessage getMessageById(String messageId, boolean sent) {
|
||||
return delegate.getMessageById(messageId, sent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrUserAndPortalUsersWrapper getWorkspaceUsers() {
|
||||
return delegate.getWorkspaceUsers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<WSUser> getUsersInfo(String[] usernames) {
|
||||
return delegate.getUsersInfo(usernames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<WSUser> searchUsers(String keyword) {
|
||||
return delegate.searchUsers(keyword);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendToById(ArrayList<String> recipientIds, ArrayList<String> listAttachmentsId, String subject,
|
||||
String body) {
|
||||
return delegate.sendToById(recipientIds, listAttachmentsId, subject, body);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteMessageById(String messageId, boolean sent) {
|
||||
return delegate.deleteMessageById(messageId, sent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAttachmentDownloadURL(String itemId) {
|
||||
return delegate.getAttachmentDownloadURL(itemId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveAttachmentToWorkspaceFolder(String itemId, String destinationFolderId) {
|
||||
return delegate.saveAttachmentToWorkspaceFolder(itemId, destinationFolderId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean markMessageUnread(String messageId, boolean sent) {
|
||||
return delegate.markMessageUnread(messageId, sent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpServletRequest getRequest() {
|
||||
return getThreadLocalRequest();
|
||||
}
|
||||
|
||||
}
|
|
@ -13,13 +13,10 @@ import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser;
|
|||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.portal.PortalContext;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.common.storagehub.client.dsl.ContainerType;
|
||||
import org.gcube.common.storagehub.client.dsl.FileContainer;
|
||||
import org.gcube.common.storagehub.client.dsl.OpenResolver;
|
||||
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
||||
import org.gcube.common.storagehub.client.plugins.AbstractPlugin;
|
||||
import org.gcube.common.storagehub.client.proxies.MessageManagerClient;
|
||||
import org.gcube.common.storagehub.model.exceptions.StorageHubException;
|
||||
import org.gcube.common.storagehub.model.items.FolderItem;
|
||||
import org.gcube.common.storagehub.model.items.Item;
|
||||
import org.gcube.common.storagehub.model.messages.Message;
|
||||
|
@ -30,6 +27,7 @@ import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
|||
import org.gcube.portets.user.message_conversations.shared.CurrUserAndPortalUsersWrapper;
|
||||
import org.gcube.portets.user.message_conversations.shared.FileModel;
|
||||
import org.gcube.portets.user.message_conversations.shared.MessageUserModel;
|
||||
import org.gcube.portets.user.message_conversations.shared.MessagesWindow;
|
||||
import org.gcube.portets.user.message_conversations.shared.WSUser;
|
||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||
|
@ -40,6 +38,7 @@ import org.gcube.vomanagement.usermanagement.util.ManagementUtils;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
import com.liferay.portal.kernel.exception.PortalException;
|
||||
import com.liferay.portal.kernel.exception.SystemException;
|
||||
import com.liferay.portal.model.User;
|
||||
|
@ -49,20 +48,29 @@ import com.liferay.portal.util.PortalUtil;
|
|||
/**
|
||||
* @author Massimiliano Assante, CNR-ISTI
|
||||
*/
|
||||
public class ConvServiceImpl implements MessageService {
|
||||
@SuppressWarnings("serial")
|
||||
public class ConvServiceImpl extends RemoteServiceServlet implements MessageService {
|
||||
private static final Logger _log = LoggerFactory.getLogger(ConvServiceImpl.class);
|
||||
private final int MESSAGE_BODY_CHAR_LIMIT = 79;
|
||||
|
||||
|
||||
private PortalContext pContext;
|
||||
private UserManager um;
|
||||
|
||||
private HttpServletRetriever requestRetriever;
|
||||
|
||||
ConvServiceImpl(HttpServletRetriever servletRetriever) {
|
||||
|
||||
public void init() {
|
||||
um = new LiferayUserManager();
|
||||
pContext = PortalContext.getConfiguration();
|
||||
requestRetriever= servletRetriever;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MessagesWindow getMessagesWindows(boolean sent, int limit, int offset) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return true if you're running into the portal, false if in development
|
||||
|
@ -71,8 +79,7 @@ public class ConvServiceImpl implements MessageService {
|
|||
try {
|
||||
UserLocalServiceUtil.getService();
|
||||
return true;
|
||||
}
|
||||
catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) {
|
||||
}catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) {
|
||||
_log.trace("Development Mode ON");
|
||||
return false;
|
||||
}
|
||||
|
@ -94,27 +101,26 @@ public class ConvServiceImpl implements MessageService {
|
|||
return null;
|
||||
}
|
||||
} else {
|
||||
return pContext.getCurrentUser(requestRetriever.getRequest());
|
||||
return pContext.getCurrentUser(getThreadLocalRequest());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ArrayList<ConvMessage> getMessages(boolean sent) {
|
||||
ArrayList<ConvMessage> toReturn = new ArrayList<>();
|
||||
try {
|
||||
GCubeUser user = getCurrentUser(requestRetriever.getRequest());
|
||||
GCubeUser user = getCurrentUser(getThreadLocalRequest());
|
||||
pContext = PortalContext.getConfiguration();
|
||||
_log.debug("*** Reading user = " +user.getFullname());
|
||||
String scope = pContext.getCurrentScope(requestRetriever.getRequest());
|
||||
String scope = pContext.getCurrentScope(getThreadLocalRequest());
|
||||
ScopeProvider.instance.set(scope);
|
||||
String token = pContext.getCurrentUserToken(scope, user.getUserId());
|
||||
SecurityTokenProvider.instance.set(token);
|
||||
|
||||
MessageManagerClient client = AbstractPlugin.messages().build();
|
||||
long start = System.currentTimeMillis();
|
||||
List<Message> listMessages = (sent) ? client.getSentMessages(MESSAGE_BODY_CHAR_LIMIT)
|
||||
: client.getReceivedMessages(MESSAGE_BODY_CHAR_LIMIT);
|
||||
List<Message> listMessages = (sent) ? client.getSentMessages(79)
|
||||
: client.getReceivedMessages(79);
|
||||
if (listMessages == null) {
|
||||
_log.error("listMessages is null, Could not read messages of {}", user.getFullname());
|
||||
return null;
|
||||
|
@ -192,8 +198,8 @@ public class ConvServiceImpl implements MessageService {
|
|||
|
||||
@Override
|
||||
public boolean markMessageUnread(String messageId, boolean sent) {
|
||||
GCubeUser user = getCurrentUser(requestRetriever.getRequest());
|
||||
String scope = pContext.getCurrentScope(requestRetriever.getRequest());
|
||||
GCubeUser user = getCurrentUser(getThreadLocalRequest());
|
||||
String scope = pContext.getCurrentScope(getThreadLocalRequest());
|
||||
SecurityTokenProvider.instance.set(pContext.getCurrentUserToken(scope, user.getUserId()));
|
||||
try {
|
||||
MessageManagerClient client = AbstractPlugin.messages().build();
|
||||
|
@ -209,9 +215,9 @@ public class ConvServiceImpl implements MessageService {
|
|||
public ConvMessage getMessageById(String messageId, boolean sent) {
|
||||
ConvMessage toReturn = null;
|
||||
try {
|
||||
GCubeUser user = getCurrentUser(requestRetriever.getRequest());
|
||||
GCubeUser user = getCurrentUser(getThreadLocalRequest());
|
||||
_log.debug("*** Reading user from liferay session = " +user.getFullname());
|
||||
String scope = pContext.getCurrentScope(requestRetriever.getRequest());
|
||||
String scope = pContext.getCurrentScope(getThreadLocalRequest());
|
||||
SecurityTokenProvider.instance.set(pContext.getCurrentUserToken(scope, user.getUserId()));
|
||||
LiferayUserManager um = new LiferayUserManager();
|
||||
MessageManagerClient client = AbstractPlugin.messages().build();
|
||||
|
@ -268,8 +274,8 @@ public class ConvServiceImpl implements MessageService {
|
|||
|
||||
@Override
|
||||
public String getAttachmentDownloadURL(String itemId) {
|
||||
GCubeUser user = getCurrentUser(requestRetriever.getRequest());
|
||||
String scope = pContext.getCurrentScope(requestRetriever.getRequest());
|
||||
GCubeUser user = getCurrentUser(getThreadLocalRequest());
|
||||
String scope = pContext.getCurrentScope(getThreadLocalRequest());
|
||||
SecurityTokenProvider.instance.set(pContext.getCurrentUserToken(scope, user.getUserId()));
|
||||
_log.info("getAttachmentDownloadURL for user "+user.getUsername() + " file id="+itemId);
|
||||
try {
|
||||
|
@ -284,8 +290,8 @@ public class ConvServiceImpl implements MessageService {
|
|||
}
|
||||
@Override
|
||||
public boolean saveAttachmentToWorkspaceFolder(String itemId, String destinationFolderId) {
|
||||
GCubeUser user = getCurrentUser(requestRetriever.getRequest());
|
||||
String scope = pContext.getCurrentScope(requestRetriever.getRequest());
|
||||
GCubeUser user = getCurrentUser(getThreadLocalRequest());
|
||||
String scope = pContext.getCurrentScope(getThreadLocalRequest());
|
||||
SecurityTokenProvider.instance.set(pContext.getCurrentUserToken(scope, user.getUserId()));
|
||||
try {
|
||||
StorageHubClient shc = new StorageHubClient();
|
||||
|
@ -300,9 +306,9 @@ public class ConvServiceImpl implements MessageService {
|
|||
|
||||
@Override
|
||||
public boolean deleteMessageById(String messageId, boolean sent) {
|
||||
GCubeUser user = getCurrentUser(requestRetriever.getRequest());
|
||||
GCubeUser user = getCurrentUser(getThreadLocalRequest());
|
||||
_log.debug("deleteMessageById reading user from liferay session = " +user.getFullname() + " m id = " + messageId);
|
||||
String scope = pContext.getCurrentScope(requestRetriever.getRequest());
|
||||
String scope = pContext.getCurrentScope(getThreadLocalRequest());
|
||||
SecurityTokenProvider.instance.set(pContext.getCurrentUserToken(scope, user.getUserId()));
|
||||
try {
|
||||
MessageManagerClient client = AbstractPlugin.messages().build();
|
||||
|
@ -319,7 +325,7 @@ public class ConvServiceImpl implements MessageService {
|
|||
public ArrayList<WSUser> searchUsers(String keyword) {
|
||||
ArrayList<WSUser> toReturn = new ArrayList<>();
|
||||
if (isWithinPortal()) {
|
||||
long gatewayGroupId = pContext.getCurrentGroupId(this.requestRetriever.getRequest());
|
||||
long gatewayGroupId = pContext.getCurrentGroupId(this.getThreadLocalRequest());
|
||||
try {
|
||||
_log.debug("Searching " + keyword);
|
||||
List<GCubeUser> users = um.searchUsersByGroup(keyword, gatewayGroupId);
|
||||
|
@ -363,7 +369,7 @@ public class ConvServiceImpl implements MessageService {
|
|||
@Override
|
||||
public boolean sendToById(ArrayList<String> recipientIds, ArrayList<String> listAttachmentsId, String subject, String body) {
|
||||
PortalContext pContext = PortalContext.getConfiguration();
|
||||
GCubeUser currentUser = pContext.getCurrentUser(requestRetriever.getRequest());
|
||||
GCubeUser currentUser = pContext.getCurrentUser(getThreadLocalRequest());
|
||||
MessageManagerClient client = AbstractPlugin.messages().build();
|
||||
try {
|
||||
_log.info("Sending message to: " + recipientIds.toString());
|
||||
|
@ -371,17 +377,17 @@ public class ConvServiceImpl implements MessageService {
|
|||
String checkedBody = body;
|
||||
String messageId = client.sendMessage(recipientIds, checkedSubject, checkedBody, listAttachmentsId);
|
||||
|
||||
try {
|
||||
/*try {
|
||||
body += getPublicLinksForAttachs(listAttachmentsId);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
catch (StorageHubException e) {
|
||||
_log.error("Ops, could not generate publick link for some of the attachments");
|
||||
}
|
||||
}*/
|
||||
_log.debug("Sending message notification to: " + recipientIds.toString());
|
||||
|
||||
List<GenericItemBean> recipients = getUsersbyUserId(recipientIds);
|
||||
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(new SocialNetworkingSite(requestRetriever.getRequest()), pContext.getCurrentScope(requestRetriever.getRequest()),
|
||||
NotificationsManager nm = new ApplicationNotificationsManager(new SocialNetworkingSite(getThreadLocalRequest()), pContext.getCurrentScope(getThreadLocalRequest()),
|
||||
new SocialNetworkingUser(
|
||||
currentUser.getUsername(),
|
||||
currentUser.getEmail(),
|
||||
|
@ -435,8 +441,10 @@ public class ConvServiceImpl implements MessageService {
|
|||
* @throws ItemNotFoundException
|
||||
* @throws InternalErrorException
|
||||
*/
|
||||
|
||||
/*
|
||||
private String getPublicLinksForAttachs(ArrayList<String> listAttachments) {
|
||||
|
||||
|
||||
if (listAttachments != null && (!listAttachments.isEmpty()) ) {
|
||||
StorageHubClient client = new StorageHubClient();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
@ -448,22 +456,24 @@ public class ConvServiceImpl implements MessageService {
|
|||
try {
|
||||
OpenResolver openResolver = client.open(itemId);
|
||||
|
||||
if(openResolver.resolve().getType()==ContainerType.FILE) {
|
||||
String publicLink = openResolver.asFile().getPublicLink().toString();
|
||||
String itemName = openResolver.asFile().get().getTitle();
|
||||
if(openResolver.asItem().getType()==ContainerType.FOLDER) {
|
||||
|
||||
String publicLink = openResolver.getPublickLink(itemId).toString();;
|
||||
String itemName = item.getTitle();
|
||||
|
||||
builder.append(itemName + " ("+publicLink+")");
|
||||
builder.append("\n");
|
||||
}
|
||||
} catch (StorageHubException e) {
|
||||
_log.error("While reading attachments", e);
|
||||
}catch (StorageHubException e) {
|
||||
_log.error("While reading attachments");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_log.debug("returning public links: "+builder.toString());
|
||||
return builder.toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
else return "";
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
|
@ -474,7 +484,7 @@ public class ConvServiceImpl implements MessageService {
|
|||
public CurrUserAndPortalUsersWrapper getWorkspaceUsers() {
|
||||
|
||||
PortalContext pContext = PortalContext.getConfiguration();
|
||||
GCubeUser currentUser = pContext.getCurrentUser(requestRetriever.getRequest());
|
||||
GCubeUser currentUser = pContext.getCurrentUser(getThreadLocalRequest());
|
||||
_log.debug("trying to get WorkspaceUsers ..");
|
||||
WSUser currUser = null;
|
||||
ArrayList<WSUser> portalUsers = new ArrayList<WSUser>();
|
||||
|
|
|
@ -12,12 +12,19 @@ import org.gcube.portets.user.message_conversations.client.MessageService;
|
|||
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
||||
import org.gcube.portets.user.message_conversations.shared.CurrUserAndPortalUsersWrapper;
|
||||
import org.gcube.portets.user.message_conversations.shared.MessageUserModel;
|
||||
import org.gcube.portets.user.message_conversations.shared.MessagesWindow;
|
||||
import org.gcube.portets.user.message_conversations.shared.WSUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class FakeConvServiceImpl implements MessageService{
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
|
||||
public class FakeConvServiceImpl extends RemoteServiceServlet implements MessageService{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7437932085896191683L;
|
||||
private static final Logger _log = LoggerFactory.getLogger(FakeConvServiceImpl.class);
|
||||
|
||||
|
||||
|
@ -28,10 +35,10 @@ public class FakeConvServiceImpl implements MessageService{
|
|||
Map<String,ConvMessage> sentMessagesMap = new HashMap<>();
|
||||
|
||||
|
||||
final int messageReceivedNumberToTest = 200;
|
||||
final int messageSentNumberToTest = 11;
|
||||
final int messageReceivedNumberToTest = 1000;
|
||||
final int messageSentNumberToTest = 200;
|
||||
|
||||
public FakeConvServiceImpl() {
|
||||
public void init() {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
MessageUserModel mu = new MessageUserModel("andrea.rossi");
|
||||
|
||||
|
@ -39,7 +46,7 @@ public class FakeConvServiceImpl implements MessageService{
|
|||
|
||||
String prefix ="received";
|
||||
receivedMessages = new ArrayList<>();
|
||||
for (int i =0; i<messageReceivedNumberToTest; i++) {
|
||||
for (int i =0; i<3000; i++) {
|
||||
String id = "id-"+prefix+i;
|
||||
ConvMessage msg= new ConvMessage(id, prefix+i, mu, recipients, new Date(cal.getTimeInMillis()), prefix+i, false, false);
|
||||
receivedMessages.add(msg);
|
||||
|
@ -48,7 +55,7 @@ public class FakeConvServiceImpl implements MessageService{
|
|||
|
||||
prefix ="sent";
|
||||
sentMessages = new ArrayList<>();
|
||||
for (int i =0; i<messageSentNumberToTest; i++) {
|
||||
for (int i =0; i<3000; i++) {
|
||||
String id = "id-"+prefix+i;
|
||||
ConvMessage msg= new ConvMessage(id, prefix+i, mu, recipients, new Date(cal.getTimeInMillis()), prefix+i, false, false);
|
||||
sentMessages.add(msg);
|
||||
|
@ -64,11 +71,11 @@ public class FakeConvServiceImpl implements MessageService{
|
|||
public ArrayList<ConvMessage> getMessages(boolean sent) {
|
||||
if (sent) {
|
||||
_log.info("sent messages call with sent {}",sent);
|
||||
return new ArrayList<>(sentMessages);
|
||||
return new ArrayList<>(sentMessages.subList(0, messageSentNumberToTest));
|
||||
}
|
||||
else {
|
||||
_log.info("received messages call with sent {}",sent);
|
||||
return new ArrayList<>(receivedMessages);
|
||||
return new ArrayList<>(receivedMessages.subList(0, messageReceivedNumberToTest));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,5 +147,16 @@ public class FakeConvServiceImpl implements MessageService{
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MessagesWindow getMessagesWindows(boolean sent, int limit, int offset) {
|
||||
_log.info("get Message Window called limit {} offset {}", limit, offset);
|
||||
if (sent) {
|
||||
List<ConvMessage> messages = sentMessages.subList(0, messageSentNumberToTest);
|
||||
return new MessagesWindow(messages.size(), new ArrayList<>(messages.subList(offset, offset+limit)));
|
||||
} else {
|
||||
List<ConvMessage> messages = receivedMessages.subList(0, messageReceivedNumberToTest);
|
||||
return new MessagesWindow(messages.size(), new ArrayList<>(messages.subList(offset, offset+limit)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
package org.gcube.portets.user.message_conversations.server;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public interface HttpServletRetriever {
|
||||
|
||||
HttpServletRequest getRequest();
|
||||
}
|
|
@ -5,6 +5,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.google.gwt.view.client.ProvidesKey;
|
||||
|
||||
|
||||
public class ConvMessage implements IsSerializable{
|
||||
|
@ -17,7 +18,15 @@ public class ConvMessage implements IsSerializable{
|
|||
private boolean isRead;
|
||||
private ArrayList<FileModel> attachments;
|
||||
private boolean hasAttachments;
|
||||
|
||||
|
||||
|
||||
public static final ProvidesKey<ConvMessage> KEY_PROVIDER = new ProvidesKey<ConvMessage>() {
|
||||
@Override
|
||||
public Object getKey(ConvMessage item) {
|
||||
return item == null ? null : item.getId();
|
||||
}
|
||||
};
|
||||
|
||||
public ConvMessage() {
|
||||
super();
|
||||
}
|
||||
|
@ -54,8 +63,8 @@ public class ConvMessage implements IsSerializable{
|
|||
this.hasAttachments = hasAttachments;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public ConvMessage(String id, String subject, MessageUserModel owner, List<MessageUserModel> recipients, Date date,
|
||||
String content, boolean isRead, boolean hasAttachments) {
|
||||
super();
|
||||
|
@ -157,8 +166,30 @@ public class ConvMessage implements IsSerializable{
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((id == null) ? 0 : id.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ConvMessage other = (ConvMessage) obj;
|
||||
if (id == null) {
|
||||
if (other.id != null)
|
||||
return false;
|
||||
} else if (!id.equals(other.id))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package org.gcube.portets.user.message_conversations.shared;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
|
||||
public class MessagesWindow implements IsSerializable {
|
||||
|
||||
private int total;
|
||||
private ArrayList<ConvMessage> messages;
|
||||
|
||||
public MessagesWindow() {
|
||||
super();
|
||||
}
|
||||
|
||||
public MessagesWindow(int total, ArrayList<ConvMessage> messages) {
|
||||
super();
|
||||
this.total = total;
|
||||
this.messages = messages;
|
||||
}
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
public ArrayList<ConvMessage> getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
}
|
|
@ -18,4 +18,4 @@ log4j.logger.org.gcube.contentmanager=WARN
|
|||
log4j.logger.org.gcube.resources.discovery=WARN
|
||||
log4j.logger.com.liferay.portal.kernel.bean.PortalBeanLocatorUtil=OFF
|
||||
log4j.logger.com.liferay.portal.kernel.log.Jdk14LogImpl=OFF
|
||||
log4j.logger.org.eclipse.jetty=ERROR
|
||||
log4j.logger.org.eclipse.jetty=INFO
|
|
@ -3,6 +3,7 @@
|
|||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<inherits name="com.google.gwt.logging.Logging" />
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
padding: 3px;
|
||||
}
|
||||
|
||||
#wpTreepopup>div.modal-body>table>tbody>tr:nth-child(1)>td {
|
||||
#wpTreepopup>div.modal-body>table>tbody>tr:nth-child (1) >td {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
|||
color: #ccc !important;
|
||||
}
|
||||
|
||||
.message-metadata>div:not(.empty-state ) h4 {
|
||||
.message-metadata>div:not (.empty-state ) h4 {
|
||||
font-size: 2em;
|
||||
margin-top: 10px !important;
|
||||
font-weight: 400 !important;
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<!-- Servlets -->
|
||||
<servlet>
|
||||
<servlet-name>convServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portets.user.message_conversations.server.ConvService</servlet-class>
|
||||
<servlet-class>org.gcube.portets.user.message_conversations.server.FakeConvServiceImpl</servlet-class>
|
||||
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
|
@ -20,7 +21,7 @@
|
|||
<servlet-class>com.liferay.portal.kernel.servlet.PortalDelegateServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>servlet-class</param-name>
|
||||
<param-value>org.gcube.portets.user.message_conversations.server.ConvService</param-value>
|
||||
<param-value>org.gcube.portets.user.message_conversations.server.FakeConvServiceImpl</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>sub-context</param-name>
|
||||
|
|
Loading…
Reference in New Issue