testing incubator
This commit is contained in:
parent
f9911cbdc6
commit
20226d30fb
29
.classpath
29
.classpath
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/messages-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/messages-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -22,36 +22,19 @@
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/messages-2.4.0-SNAPSHOT/WEB-INF/classes" path="target/generated-sources/gwt">
|
<classpathentry kind="src" output="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes" path="target/generated-sources/gwt">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER/gwt-2.8.1"/>
|
<classpathentry kind="con" path="com.gwtplugins.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="test" value="true"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="/Users/massi/portal/distro/GWT SDK/gwt-2.8.2/gwt-user.jar">
|
<classpathentry kind="output" path="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
<attributes>
|
|
||||||
<attribute name="javadoc_location" value="file:/Users/massi/portal/distro/GWT%20SDK/gwt-2.8.2/doc/javadoc/"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/Users/massi/portal/distro/GWT SDK/gwt-2.8.2/gwt-codeserver.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="javadoc_location" value="file:/Users/massi/portal/distro/GWT%20SDK/gwt-2.8.2/doc/javadoc/"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/Users/massi/portal/distro/GWT SDK/gwt-2.8.2/gwt-dev.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="javadoc_location" value="file:/Users/massi/portal/distro/GWT%20SDK/gwt-2.8.2/doc/javadoc/"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/Users/massi/portal/distro/GWT SDK/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
|
||||||
<classpathentry kind="lib" path="/Users/massi/portal/distro/GWT SDK/gwt-2.8.2/validation-api-1.0.0.GA.jar" sourcepath="/Users/massi/portal/distro/GWT SDK/gwt-2.8.2/validation-api-1.0.0.GA-sources.jar"/>
|
|
||||||
<classpathentry kind="output" path="target/messages-2.4.0-SNAPSHOT/WEB-INF/classes"/>
|
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//src/main/java=UTF-8
|
encoding//src/main/java=UTF-8
|
||||||
encoding//src/main/resources=UTF-8
|
encoding//src/main/resources=UTF-8
|
||||||
|
encoding//src/test/java=UTF-8
|
||||||
encoding//target/generated-sources/gwt=UTF-8
|
encoding//target/generated-sources/gwt=UTF-8
|
||||||
encoding/<project>=UTF-8
|
encoding/<project>=UTF-8
|
||||||
|
|
|
@ -1,9 +1,112 @@
|
||||||
eclipse.preferences.version=1
|
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.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=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.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.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.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.release=disabled
|
||||||
org.eclipse.jdt.core.compiler.source=1.8
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -1,11 +1,31 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||||
<wb-module deploy-name="messages">
|
|
||||||
|
|
||||||
|
<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="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<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/java"/>
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<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"/>
|
<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="java-output-path" value="/message-conversations/target/message-conversations-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="messages"/>
|
<property name="context-root" value="messages"/>
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
</project-modules>
|
</project-modules>
|
||||||
|
|
10
pom.xml
10
pom.xml
|
@ -30,7 +30,7 @@
|
||||||
<!-- GWT 2.8 requires 1.8 -->
|
<!-- GWT 2.8 requires 1.8 -->
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
<gwt-material.version>2.0.1</gwt-material.version>
|
<gwt-material.version>2.1.1</gwt-material.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -161,6 +161,11 @@
|
||||||
<artifactId>gwt-material-addins</artifactId>
|
<artifactId>gwt-material-addins</artifactId>
|
||||||
<version>${gwt-material.version}</version>
|
<version>${gwt-material.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gwtmaterialdesign</groupId>
|
||||||
|
<artifactId>gwt-material-table</artifactId>
|
||||||
|
<version>${gwt-material.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>notifications-common-library</artifactId>
|
<artifactId>notifications-common-library</artifactId>
|
||||||
|
@ -195,11 +200,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<version>1.7.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<scope>provided</scope>
|
<version>1.7.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
|
|
@ -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.ConvMessage;
|
||||||
import org.gcube.portets.user.message_conversations.shared.CurrUserAndPortalUsersWrapper;
|
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 org.gcube.portets.user.message_conversations.shared.WSUser;
|
||||||
|
|
||||||
import com.google.gwt.user.client.rpc.RemoteService;
|
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 {
|
public interface MessageService extends RemoteService {
|
||||||
|
|
||||||
|
MessagesWindow getMessagesWindows(boolean sent, int limit, int offset);
|
||||||
ArrayList<ConvMessage> getMessages(boolean sent);
|
ArrayList<ConvMessage> getMessages(boolean sent);
|
||||||
ConvMessage getMessageById(String messageId, boolean sent);
|
ConvMessage getMessageById(String messageId, boolean sent);
|
||||||
CurrUserAndPortalUsersWrapper getWorkspaceUsers();
|
CurrUserAndPortalUsersWrapper getWorkspaceUsers();
|
||||||
|
|
|
@ -62,8 +62,7 @@ public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Sug
|
||||||
private boolean directInputAllowed = true;
|
private boolean directInputAllowed = true;
|
||||||
private MaterialChipProvider chipProvider = new DefaultMaterialChipProvider();
|
private MaterialChipProvider chipProvider = new DefaultMaterialChipProvider();
|
||||||
|
|
||||||
private final ErrorMixin<AbstractValueWidget, MaterialLabel> errorMixin = new ErrorMixin<>(this, errorLabel, list, placeholderLabel);
|
|
||||||
|
|
||||||
private FocusableMixin<MaterialWidget> focusableMixin;
|
private FocusableMixin<MaterialWidget> focusableMixin;
|
||||||
private ReadOnlyMixin<MaterialAutoComplete, TextBox> readOnlyMixin;
|
private ReadOnlyMixin<MaterialAutoComplete, TextBox> readOnlyMixin;
|
||||||
|
|
||||||
|
@ -284,7 +283,7 @@ public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Sug
|
||||||
}
|
}
|
||||||
suggestionMap.clear();
|
suggestionMap.clear();
|
||||||
|
|
||||||
clearErrorOrSuccess();
|
clearErrorText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -684,11 +683,7 @@ public class MaterialAutoComplete extends AbstractValueWidget<List<? extends Sug
|
||||||
itemBox.setEnabled(enabled);
|
itemBox.setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ErrorMixin<AbstractValueWidget, MaterialLabel> getErrorMixin() {
|
|
||||||
return errorMixin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Label getPlaceholderLabel() {
|
public Label getPlaceholderLabel() {
|
||||||
return placeholderLabel;
|
return placeholderLabel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ import org.gcube.portets.user.message_conversations.client.Utils;
|
||||||
import org.gcube.portets.user.message_conversations.client.ui.resources.MessagesResources;
|
import org.gcube.portets.user.message_conversations.client.ui.resources.MessagesResources;
|
||||||
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
import org.gcube.portets.user.message_conversations.shared.ConvMessage;
|
||||||
import org.gcube.portets.user.message_conversations.shared.MessageUserModel;
|
import org.gcube.portets.user.message_conversations.shared.MessageUserModel;
|
||||||
|
import org.gcube.portlets.user.messages.client.ui.MessageDataSource;
|
||||||
|
import org.gcube.portlets.user.messages.client.ui.MessageItem;
|
||||||
|
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
|
||||||
|
@ -63,6 +65,7 @@ import gwt.material.design.client.ui.MaterialRow;
|
||||||
import gwt.material.design.client.ui.MaterialToast;
|
import gwt.material.design.client.ui.MaterialToast;
|
||||||
import gwt.material.design.client.ui.animate.MaterialAnimation;
|
import gwt.material.design.client.ui.animate.MaterialAnimation;
|
||||||
import gwt.material.design.client.ui.animate.Transition;
|
import gwt.material.design.client.ui.animate.Transition;
|
||||||
|
import gwt.material.design.incubator.client.infinitescroll.data.LoadConfig;
|
||||||
/**
|
/**
|
||||||
* @author Massimiliano Assante, CNR-ISTI
|
* @author Massimiliano Assante, CNR-ISTI
|
||||||
*/
|
*/
|
||||||
|
@ -126,13 +129,24 @@ public class ApplicationView extends Composite {
|
||||||
messageLoader.setVisible(false);
|
messageLoader.setVisible(false);
|
||||||
}
|
}
|
||||||
readUserMessages(false, isSendTo);
|
readUserMessages(false, isSendTo);
|
||||||
|
infiniteScrollBasic.setLoadConfig(new LoadConfig<>(0, 200));
|
||||||
|
infiniteScrollBasic.setDataSource(new MessageDataSource(false, convService));
|
||||||
|
infiniteScrollBasic.setRenderer(model -> createColumn(model));
|
||||||
|
messageLoader.setVisible(false);
|
||||||
|
infiniteScrollBasic.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected MessageItem createColumn(ConvMessage m) {
|
||||||
|
return new MessageItem(m , this, isSendTo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param sent
|
* @param sent
|
||||||
*/
|
*
|
||||||
public void readUserMessages(final boolean sent, boolean isSendTo) {
|
public void readUserMessages(final boolean sent, boolean isSendTo) {
|
||||||
messagesLoader.setVisible(true);
|
messagesLoader.setVisible(true);
|
||||||
convService.getMessages(sent, new AsyncCallback<ArrayList<ConvMessage>>() {
|
convService.getMessages(sent, new AsyncCallback<ArrayList<ConvMessage>>() {
|
||||||
|
@ -158,7 +172,9 @@ public class ApplicationView extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
private void showErrorOccurred() {
|
private void showErrorOccurred() {
|
||||||
messagesCollection.clear();
|
messagesCollection.clear();
|
||||||
messagesLoader.setVisible(false);
|
messagesLoader.setVisible(false);
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
|
||||||
xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:m="urn:import:gwt.material.design.client.ui"
|
xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:m="urn:import:gwt.material.design.client.ui"
|
||||||
xmlns:ma="urn:import:gwt.material.design.addins.client"
|
xmlns:ma="urn:import:gwt.material.design.addins.client"
|
||||||
xmlns:mc="urn:import:org.gcube.portets.user.message_conversations.client.autocomplete">
|
xmlns:mc="urn:import:org.gcube.portets.user.message_conversations.client.autocomplete"
|
||||||
|
xmlns:incubator="urn:import:gwt.material.design.incubator.client">
|
||||||
|
|
||||||
<ui:style>
|
<ui:style>
|
||||||
.animation {
|
.animation {
|
||||||
|
@ -63,14 +64,14 @@
|
||||||
|
|
||||||
<!-- SIDE PANEL -->
|
<!-- SIDE PANEL -->
|
||||||
<m:MaterialRow ui:field="rightPanel" overflow="AUTO"
|
<m:MaterialRow ui:field="rightPanel" overflow="AUTO"
|
||||||
depth="995" grid="l3 m3 s12" padding="0" backgroundColor="WHITE"
|
depth="995" grid="l3 m3 s12" padding="0" backgroundColor="WHITE"
|
||||||
height="100%" layoutPosition="FIXED" top="60" left="0" width="350px"
|
height="100%" layoutPosition="FIXED" top="60" left="0" width="350px"
|
||||||
addStyleNames="{style.animation} {style.borderRight}">
|
addStyleNames="{style.animation} {style.borderRight}">
|
||||||
<m:MaterialProgress type="INDETERMINATE" ui:field="messagesLoader"
|
<!-- <m:MaterialProgress type="INDETERMINATE"
|
||||||
color="BLUE" />
|
ui:field="messagesLoader" color="BLUE" /> -->
|
||||||
<m:MaterialCollection ui:field="messagesCollection"
|
<incubator:infinitescroll.InfiniteScrollPanel
|
||||||
addStyleNames="{style.marginTop}" visible="false">
|
ui:field="infiniteScrollBasic" addStyleNames="{style.marginTop}"
|
||||||
</m:MaterialCollection>
|
overflow="AUTO" />
|
||||||
</m:MaterialRow>
|
</m:MaterialRow>
|
||||||
|
|
||||||
<!-- MAIN WINDOW -->
|
<!-- MAIN WINDOW -->
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
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.incubator.client.infinitescroll.data.DataSource;
|
||||||
|
import gwt.material.design.incubator.client.infinitescroll.data.LoadCallback;
|
||||||
|
import gwt.material.design.incubator.client.infinitescroll.data.LoadConfig;
|
||||||
|
import gwt.material.design.incubator.client.infinitescroll.data.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<ConvMessage>(messages.getMessages(), loadConfig.getOffset(), messages.getTotal()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable throwable) {
|
||||||
|
GWT.log("Getting people async call failed.", throwable);
|
||||||
|
callback.onFailure(throwable);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -277,20 +277,20 @@ public class WriteMessage extends Composite {
|
||||||
@UiHandler("btnSendModal")
|
@UiHandler("btnSendModal")
|
||||||
void onSendMessage(ClickEvent e) {
|
void onSendMessage(ClickEvent e) {
|
||||||
if (getSelectedUsers().isEmpty()) {
|
if (getSelectedUsers().isEmpty()) {
|
||||||
acModal.setError("Look empty to me");
|
acModal.setErrorText("Look empty to me");
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
acModal.reset();
|
acModal.reset();
|
||||||
}
|
}
|
||||||
if (txtBoxSubject.getText().isEmpty()) {
|
if (txtBoxSubject.getText().isEmpty()) {
|
||||||
txtBoxSubject.setError("Subject is mandatory");
|
txtBoxSubject.setErrorText("Subject is mandatory");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
txtBoxSubject.reset();
|
txtBoxSubject.reset();
|
||||||
}
|
}
|
||||||
if (txtArea.getText().isEmpty()) {
|
if (txtArea.getText().isEmpty()) {
|
||||||
txtArea.setError("The body of the message is mandatory");
|
txtArea.setErrorText("The body of the message is mandatory");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
layoutPosition="RELATIVE" marginBottom="0" grid="l8 m12 s12"
|
layoutPosition="RELATIVE" marginBottom="0" grid="l8 m12 s12"
|
||||||
paddingLeft="10" paddingRight="60" marginLeft="5" marginTop="-5"
|
paddingLeft="10" paddingRight="60" marginLeft="5" marginTop="-5"
|
||||||
addStyleNames="{style.animation} message-metadata" left="350">
|
addStyleNames="{style.animation} message-metadata" left="350">
|
||||||
<m:MaterialModalFooter textAlign="RIGHT">
|
<m:MaterialFooter textAlign="RIGHT">
|
||||||
<m:MaterialButton ui:field="btnCloseModal" text="Cancel"
|
<m:MaterialButton ui:field="btnCloseModal" text="Cancel"
|
||||||
type="FLAT" textColor="BLACK" waves="DEFAULT"/>
|
type="FLAT" textColor="BLACK" waves="DEFAULT"/>
|
||||||
<m:MaterialButton text="Send" type="FLAT" textColor="WHITE"
|
<m:MaterialButton text="Send" type="FLAT" textColor="WHITE"
|
||||||
backgroundColor="BLUE" waves="DEFAULT" ui:field="btnSendModal" />
|
backgroundColor="BLUE" waves="DEFAULT" ui:field="btnSendModal" />
|
||||||
</m:MaterialModalFooter>
|
</m:MaterialFooter>
|
||||||
<m:MaterialPanel ui:field="sendingLoader" visible="false"
|
<m:MaterialPanel ui:field="sendingLoader" visible="false"
|
||||||
addStyleNames="{style.alignCenter}">
|
addStyleNames="{style.alignCenter}">
|
||||||
<m:MaterialLabel text="Sending message ..."
|
<m:MaterialLabel text="Sending message ..."
|
||||||
|
|
|
@ -27,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.CurrUserAndPortalUsersWrapper;
|
||||||
import org.gcube.portets.user.message_conversations.shared.FileModel;
|
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.MessageUserModel;
|
||||||
|
import org.gcube.portets.user.message_conversations.shared.MessagesWindow;
|
||||||
import org.gcube.portets.user.message_conversations.shared.WSUser;
|
import org.gcube.portets.user.message_conversations.shared.WSUser;
|
||||||
import org.gcube.vomanagement.usermanagement.GroupManager;
|
import org.gcube.vomanagement.usermanagement.GroupManager;
|
||||||
import org.gcube.vomanagement.usermanagement.UserManager;
|
import org.gcube.vomanagement.usermanagement.UserManager;
|
||||||
|
@ -54,10 +55,22 @@ public class ConvServiceImpl extends RemoteServiceServlet implements MessageServ
|
||||||
private PortalContext pContext;
|
private PortalContext pContext;
|
||||||
private UserManager um;
|
private UserManager um;
|
||||||
|
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
um = new LiferayUserManager();
|
um = new LiferayUserManager();
|
||||||
pContext = PortalContext.getConfiguration();
|
pContext = PortalContext.getConfiguration();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@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
|
* @return true if you're running into the portal, false if in development
|
||||||
|
@ -66,8 +79,7 @@ public class ConvServiceImpl extends RemoteServiceServlet implements MessageServ
|
||||||
try {
|
try {
|
||||||
UserLocalServiceUtil.getService();
|
UserLocalServiceUtil.getService();
|
||||||
return true;
|
return true;
|
||||||
}
|
}catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) {
|
||||||
catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) {
|
|
||||||
_log.trace("Development Mode ON");
|
_log.trace("Development Mode ON");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,161 @@
|
||||||
|
package org.gcube.portets.user.message_conversations.server;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<ConvMessage> receivedMessages;
|
||||||
|
ArrayList<ConvMessage> sentMessages;
|
||||||
|
|
||||||
|
Map<String,ConvMessage> receivedMessagesMap = new HashMap<>();
|
||||||
|
Map<String,ConvMessage> sentMessagesMap = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
final int messageReceivedNumberToTest = 1000;
|
||||||
|
final int messageSentNumberToTest = 200;
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
Calendar cal = Calendar.getInstance();
|
||||||
|
MessageUserModel mu = new MessageUserModel("andrea.rossi");
|
||||||
|
|
||||||
|
List<MessageUserModel> recipients = Arrays.asList(new MessageUserModel("lucio.lelii"));
|
||||||
|
|
||||||
|
String prefix ="received";
|
||||||
|
receivedMessages = new ArrayList<>();
|
||||||
|
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);
|
||||||
|
receivedMessagesMap.put(id, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix ="sent";
|
||||||
|
sentMessages = new ArrayList<>();
|
||||||
|
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);
|
||||||
|
sentMessagesMap.put(id, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<ConvMessage> getMessages(boolean sent) {
|
||||||
|
if (sent) {
|
||||||
|
_log.info("sent messages call with sent {}",sent);
|
||||||
|
return new ArrayList<>(sentMessages.subList(0, messageSentNumberToTest));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_log.info("received messages call with sent {}",sent);
|
||||||
|
return new ArrayList<>(receivedMessages.subList(0, messageReceivedNumberToTest));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConvMessage getMessageById(String messageId, boolean sent) {
|
||||||
|
_log.info("get messageById called with id {} and sent {}", messageId,sent );
|
||||||
|
|
||||||
|
ConvMessage msg;
|
||||||
|
if (sent)
|
||||||
|
msg = sentMessagesMap.get(messageId);
|
||||||
|
else msg = receivedMessagesMap.get(messageId);
|
||||||
|
msg.setRead(true);
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CurrUserAndPortalUsersWrapper getWorkspaceUsers() {
|
||||||
|
_log.debug("trying to get WorkspaceUsers ..");
|
||||||
|
WSUser currUser = new WSUser("andrea.rossi", "andrea.rossi", "Andrea Rossi", "m.assante@gmail.com");
|
||||||
|
ArrayList<WSUser> portalUsers = new ArrayList<WSUser>();
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
portalUsers.add(new WSUser(""+i, "username"+i, "userGetFullname()"+i, "user.getEmail()"+i));
|
||||||
|
}
|
||||||
|
|
||||||
|
CurrUserAndPortalUsersWrapper toReturn = new CurrUserAndPortalUsersWrapper(currUser, portalUsers);
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<WSUser> getUsersInfo(String[] usernames) {
|
||||||
|
return new ArrayList<>(Arrays.asList(new WSUser("andrea.rossi", "andrea.rossi", "Andrea Rossi", "m.assante@gmail.com")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<WSUser> searchUsers(String keyword) {
|
||||||
|
return new ArrayList<>(Arrays.asList(new WSUser("andrea.rossi", "andrea.rossi", "Andrea Rossi", "m.assante@gmail.com")));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean sendToById(ArrayList<String> recipientIds, ArrayList<String> listAttachmentsId, String subject,
|
||||||
|
String body) {
|
||||||
|
_log.info("email sent");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteMessageById(String messageId, boolean sent) {
|
||||||
|
_log.info("message deleted");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAttachmentDownloadURL(String itemId) {
|
||||||
|
return "www.google.it";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveAttachmentToWorkspaceFolder(String itemId, String destinationFolderId) {
|
||||||
|
_log.info("attachment saved");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean markMessageUnread(String messageId, boolean sent) {
|
||||||
|
_log.info("message marked");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessagesWindow getMessagesWindows(boolean sent, int limit, int offset) {
|
||||||
|
if (sent) {
|
||||||
|
List<ConvMessage> messages = sentMessages.subList(0, messageSentNumberToTest);
|
||||||
|
return new MessagesWindow(messages.size(), new ArrayList<>(sentMessages.subList(offset, limit)));
|
||||||
|
} else {
|
||||||
|
List<ConvMessage> messages = receivedMessages.subList(0, messageReceivedNumberToTest);
|
||||||
|
return new MessagesWindow(messages.size(), new ArrayList<>(receivedMessages.subList(offset, limit)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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.org.gcube.resources.discovery=WARN
|
||||||
log4j.logger.com.liferay.portal.kernel.bean.PortalBeanLocatorUtil=OFF
|
log4j.logger.com.liferay.portal.kernel.bean.PortalBeanLocatorUtil=OFF
|
||||||
log4j.logger.com.liferay.portal.kernel.log.Jdk14LogImpl=OFF
|
log4j.logger.com.liferay.portal.kernel.log.Jdk14LogImpl=OFF
|
||||||
log4j.logger.org.eclipse.jetty=ERROR
|
log4j.logger.org.eclipse.jetty=INFO
|
|
@ -14,6 +14,11 @@
|
||||||
<!-- GWT Material -->
|
<!-- GWT Material -->
|
||||||
<inherits name="gwt.material.design.GwtMaterialWithJQueryDebug" />
|
<inherits name="gwt.material.design.GwtMaterialWithJQueryDebug" />
|
||||||
|
|
||||||
|
<inherits name="gwt.material.design.addins.GwtMaterialAddins"/>
|
||||||
|
<inherits name="gwt.material.design.incubator.AddinsIncubator"/>
|
||||||
|
<inherits name="gwt.material.design.GwtMaterialTable"/>
|
||||||
|
|
||||||
|
|
||||||
<!--Inherit the GCubeClientContext widget code -->
|
<!--Inherit the GCubeClientContext widget code -->
|
||||||
<inherits name='org.gcube.portal.clientcontext.GCubeClientContext' />
|
<inherits name='org.gcube.portal.clientcontext.GCubeClientContext' />
|
||||||
<inherits name="gwt.material.design.addins.GwtMaterialAddins" />
|
<inherits name="gwt.material.design.addins.GwtMaterialAddins" />
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
<!-- Servlets -->
|
<!-- Servlets -->
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>convServlet</servlet-name>
|
<servlet-name>convServlet</servlet-name>
|
||||||
<servlet-class>org.gcube.portets.user.message_conversations.server.ConvServiceImpl</servlet-class>
|
<servlet-class>org.gcube.portets.user.message_conversations.server.FakeConvServiceImpl</servlet-class>
|
||||||
|
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
<servlet-class>com.liferay.portal.kernel.servlet.PortalDelegateServlet</servlet-class>
|
<servlet-class>com.liferay.portal.kernel.servlet.PortalDelegateServlet</servlet-class>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>servlet-class</param-name>
|
<param-name>servlet-class</param-name>
|
||||||
<param-value>org.gcube.portets.user.message_conversations.server.ConvServiceImpl</param-value>
|
<param-value>org.gcube.portets.user.message_conversations.server.FakeConvServiceImpl</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>sub-context</param-name>
|
<param-name>sub-context</param-name>
|
||||||
|
|
Loading…
Reference in New Issue