Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
Massimiliano Assante | d98116cc37 | |
Massimiliano Assante | 257141f581 | |
Massimiliano Assante | cdb2e85967 | |
Massimiliano Assante | caa2570450 | |
Massimiliano Assante | cfeef31ec1 | |
Massimiliano Assante | 0eb9e7602f | |
Massimiliano Assante | d73f4944b6 | |
Massimiliano Assante | e8cc5753bc | |
Massimiliano Assante | 40ac5d0d4e | |
Massimiliano Assante | 23c2dedffb | |
Massimiliano Assante | 46e5e2a787 |
|
@ -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.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/messages-2.5.3-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.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/messages-2.5.3-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -30,11 +30,11 @@
|
||||||
<attribute name="test" value="true"/>
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes" path="target/generated-sources/gwt">
|
<classpathentry kind="src" output="target/messages-2.5.3-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="output" path="target/messages-2.5.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/messages-2.5.3-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<?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">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,7 +13,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="messages">
|
<wb-module deploy-name="messages">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +27,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +41,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +55,12 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,12 +69,15 @@
|
||||||
|
|
||||||
|
|
||||||
<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"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,7 +86,12 @@
|
||||||
|
|
||||||
|
|
||||||
<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"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +100,12 @@
|
||||||
|
|
||||||
|
|
||||||
<property name="context-root" value="messages"/>
|
<property name="context-root" value="messages"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +114,12 @@
|
||||||
|
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -4,7 +4,21 @@
|
||||||
All notable changes to this project will be documented in this file.
|
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).
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [v2.5.0] -2021-07-28
|
## [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
|
- Ported to git
|
||||||
|
|
||||||
|
@ -12,7 +26,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
- Temporarely removed possibility to add attachments
|
- Temporarely removed possibility to add attachments
|
||||||
|
|
||||||
## [v2.4.0] -2019-10-25
|
## [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
|
- Bug #17876 the message menu isn't fully displayed if there is only one message or no other messages below
|
||||||
|
|
||||||
|
|
15
README.md
15
README.md
|
@ -20,29 +20,20 @@ See [Releases](https://code-repo.d4science.org/gCubeSystem/Messages/releases).
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
|
* **Massimiliano Assante** ([ORCID](https://orcid.org/0000-0002-3761-1492)) - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/M.Assante)
|
||||||
|
|
||||||
## Maintainers
|
## Maintainers
|
||||||
|
|
||||||
* **Massimiliano Assante** - [ISTI-CNR Infrascience Group](http://nemis.isti.cnr.it/groups/infrascience)
|
* **Massimiliano Assante** ([ORCID](https://orcid.org/0000-0002-3761-1492)) - [ISTI-CNR Infrascience Group](https://www.isti.cnr.it/People/M.Assante)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
|
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
|
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
|
open-source software toolkit used for building and operating Hybrid Data
|
||||||
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
Infrastructures enabling the dynamic deployment of Virtual Research Environments
|
||||||
by favouring the realisation of reuse oriented policies.
|
by favouring the realisation of reuse oriented policies.
|
||||||
|
|
||||||
The projects leading to this software have received funding from a series of European Union programmes including:
|
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
||||||
|
|
||||||
- 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);
|
|
||||||
|
|
16
pom.xml
16
pom.xml
|
@ -13,7 +13,7 @@
|
||||||
<groupId>org.gcube.portets.user</groupId>
|
<groupId>org.gcube.portets.user</groupId>
|
||||||
<artifactId>messages</artifactId>
|
<artifactId>messages</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>2.5.0</version>
|
<version>2.6.0</version>
|
||||||
<description>
|
<description>
|
||||||
gCube Messages Portlet for exchanging messages with other users.
|
gCube Messages Portlet for exchanging messages with other users.
|
||||||
</description>
|
</description>
|
||||||
|
@ -25,11 +25,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Convenience property to set the GWT version -->
|
<!-- Convenience property to set the GWT version -->
|
||||||
<gwt.version>2.8.2</gwt.version>
|
<gwt.version>2.9.0</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>
|
<gwt-material.version>2.0.1</gwt-material.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -39,7 +35,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.distribution</groupId>
|
<groupId>org.gcube.distribution</groupId>
|
||||||
<artifactId>maven-portal-bom</artifactId>
|
<artifactId>maven-portal-bom</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.4</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -102,6 +98,12 @@
|
||||||
<artifactId>xercesImpl</artifactId>
|
<artifactId>xercesImpl</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>2.9.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.2</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>workspace-explorer</artifactId>
|
<artifactId>workspace-explorer</artifactId>
|
||||||
|
|
|
@ -323,7 +323,8 @@ public class ApplicationView extends Composite {
|
||||||
private void displayNewOrReplyMessage() {
|
private void displayNewOrReplyMessage() {
|
||||||
WRITING_MESSAGE = true;
|
WRITING_MESSAGE = true;
|
||||||
FAB.setVisible(false);
|
FAB.setVisible(false);
|
||||||
messagesCollection.clearActive();
|
if (messagesCollection != null)
|
||||||
|
messagesCollection.clearActive();
|
||||||
scrollerPanel.clear();
|
scrollerPanel.clear();
|
||||||
scrollerPanel.add(newMessageDisplay);
|
scrollerPanel.add(newMessageDisplay);
|
||||||
newMessageDisplay.setFocusOnUsersInput();
|
newMessageDisplay.setFocusOnUsersInput();
|
||||||
|
@ -334,7 +335,10 @@ public class ApplicationView extends Composite {
|
||||||
private void prepareNewMessageForSendTo(String[] usernamesToSendTo) {
|
private void prepareNewMessageForSendTo(String[] usernamesToSendTo) {
|
||||||
newMessageDisplay = new WriteMessage(convService, this);
|
newMessageDisplay = new WriteMessage(convService, this);
|
||||||
newMessageDisplay.setNewMessageForSendTo(usernamesToSendTo);
|
newMessageDisplay.setNewMessageForSendTo(usernamesToSendTo);
|
||||||
|
GWT.log("setNewMessageForSendTo - Done");
|
||||||
displayNewOrReplyMessage();
|
displayNewOrReplyMessage();
|
||||||
|
GWT.log("displayNewOrReplyMessage - Done");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@UiHandler("newMessage")
|
@UiHandler("newMessage")
|
||||||
|
|
|
@ -59,8 +59,8 @@ public class WriteMessage extends Composite {
|
||||||
@UiField MaterialAutoComplete acModal;
|
@UiField MaterialAutoComplete acModal;
|
||||||
@UiField MaterialButton btnSendModal, btnCloseModal;
|
@UiField MaterialButton btnSendModal, btnCloseModal;
|
||||||
@UiField MaterialPanel modalContent, sendingLoader;
|
@UiField MaterialPanel modalContent, sendingLoader;
|
||||||
// @UiField MaterialRow attachmentsRow;
|
@UiField MaterialRow attachmentsRow;
|
||||||
// @UiField MaterialLink attachButton;
|
@UiField MaterialLink attachButton;
|
||||||
@UiField MaterialLabel sendingFeedback;
|
@UiField MaterialLabel sendingFeedback;
|
||||||
@UiField MaterialPreLoader sendingSpinner;
|
@UiField MaterialPreLoader sendingSpinner;
|
||||||
@UiField MaterialTextArea txtArea;
|
@UiField MaterialTextArea txtArea;
|
||||||
|
@ -83,7 +83,7 @@ public class WriteMessage extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNewMessageForSendTo(String[] usernames) {
|
public void setNewMessageForSendTo(String[] usernames) {
|
||||||
GWT.log("her add the users");
|
GWT.log("setNewMessageForSendTo - here add the users");
|
||||||
convService.getUsersInfo(usernames, new AsyncCallback<ArrayList<WSUser>>() {
|
convService.getUsersInfo(usernames, new AsyncCallback<ArrayList<WSUser>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
@ -91,7 +91,7 @@ public class WriteMessage extends Composite {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ArrayList<WSUser> result) {
|
public void onSuccess(ArrayList<WSUser> result) {
|
||||||
for (WSUser user : result) {
|
for (WSUser user : result) {
|
||||||
acModal.addItem(new UserSuggestion(user));
|
acModal.addItem(new UserSuggestion(user));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -205,39 +205,39 @@ public class WriteMessage extends Composite {
|
||||||
toReturn.add(new WSUser("testing", "username testing", "Andrea testing", "@gmail.com"));
|
toReturn.add(new WSUser("testing", "username testing", "Andrea testing", "@gmail.com"));
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
// @UiHandler("attachButton")
|
@UiHandler("attachButton")
|
||||||
// void onAttach(ClickEvent e) {
|
void onAttach(ClickEvent e) {
|
||||||
// List<ItemType> types = new ArrayList<>();
|
List<ItemType> types = new ArrayList<>();
|
||||||
// ItemType[] theTypes = ItemType.values();
|
ItemType[] theTypes = ItemType.values();
|
||||||
// for (int i = 0; i < theTypes.length; i++) {
|
for (int i = 0; i < theTypes.length; i++) {
|
||||||
// if (theTypes[i] != ItemType.FOLDER)
|
if (theTypes[i] != ItemType.FOLDER)
|
||||||
// types.add(theTypes[i]);
|
types.add(theTypes[i]);
|
||||||
// }
|
}
|
||||||
// FilterCriteria criteria = null;
|
FilterCriteria criteria = null;
|
||||||
// final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select an item", criteria, types);
|
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select an item", criteria, types);
|
||||||
// wpTreepopup.setId(Utils.ID_MODALBOOTSTRAP);
|
wpTreepopup.setId(Utils.ID_MODALBOOTSTRAP);
|
||||||
// wpTreepopup.getElement().getStyle().setLeft(50, Unit.PCT);
|
wpTreepopup.getElement().getStyle().setLeft(50, Unit.PCT);
|
||||||
// wpTreepopup.setZIndex(10010);
|
wpTreepopup.setZIndex(10010);
|
||||||
// WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
|
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
// @Override
|
@Override
|
||||||
// public void onSelectedItem(Item item) {
|
public void onSelectedItem(Item item) {
|
||||||
// attachmentsRow.add(getChip(item.getId(), item.getName(), item.isFolder(), true));
|
attachmentsRow.add(getChip(item.getId(), item.getName(), item.isFolder(), true));
|
||||||
// wpTreepopup.hide();
|
wpTreepopup.hide();
|
||||||
// }
|
}
|
||||||
// @Override
|
@Override
|
||||||
// public void onFailed(Throwable throwable) {
|
public void onFailed(Throwable throwable) {
|
||||||
// Window.alert("There are networks problem, please check your connection.");
|
Window.alert("There are networks problem, please check your connection.");
|
||||||
// }
|
}
|
||||||
// @Override
|
@Override
|
||||||
// public void onAborted() {}
|
public void onAborted() {}
|
||||||
// @Override
|
@Override
|
||||||
// public void onNotValidSelection() {
|
public void onNotValidSelection() {
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
//
|
|
||||||
// wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
|
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
|
||||||
// wpTreepopup.show();
|
wpTreepopup.show();
|
||||||
// }
|
}
|
||||||
|
|
||||||
//for the attachments we distinguish between folder and files
|
//for the attachments we distinguish between folder and files
|
||||||
private MaterialChip getChip(String itemId, String itemName, boolean isFolder, boolean deletable) {
|
private MaterialChip getChip(String itemId, String itemName, boolean isFolder, boolean deletable) {
|
||||||
|
@ -263,13 +263,13 @@ public class WriteMessage extends Composite {
|
||||||
|
|
||||||
private ArrayList<String> getSelectedFilesAndFoldersId() {
|
private ArrayList<String> getSelectedFilesAndFoldersId() {
|
||||||
ArrayList<String> toReturn = new ArrayList<>();
|
ArrayList<String> toReturn = new ArrayList<>();
|
||||||
// int n = attachmentsRow.getWidgetCount();
|
int n = attachmentsRow.getWidgetCount();
|
||||||
// for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
// Widget w = attachmentsRow.getWidget(i);
|
Widget w = attachmentsRow.getWidget(i);
|
||||||
// if (w instanceof MaterialChip) {
|
if (w instanceof MaterialChip) {
|
||||||
// toReturn.add(((MaterialChip) w).getId());
|
toReturn.add(((MaterialChip) w).getId());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,6 +297,7 @@ public class WriteMessage extends Composite {
|
||||||
txtArea.reset();
|
txtArea.reset();
|
||||||
}
|
}
|
||||||
GWT.log(getSelectedUsers()+"");
|
GWT.log(getSelectedUsers()+"");
|
||||||
|
GWT.log(getSelectedFilesAndFoldersId()+"");
|
||||||
ArrayList<String> recipientIds = new ArrayList<>();
|
ArrayList<String> recipientIds = new ArrayList<>();
|
||||||
for (WSUser u : getSelectedUsers()) {
|
for (WSUser u : getSelectedUsers()) {
|
||||||
recipientIds.add(u.getScreenname());
|
recipientIds.add(u.getScreenname());
|
||||||
|
|
|
@ -44,12 +44,12 @@
|
||||||
<m:MaterialTextBox label="Subject" ui:field="txtBoxSubject"
|
<m:MaterialTextBox label="Subject" ui:field="txtBoxSubject"
|
||||||
marginBottom="0" />
|
marginBottom="0" />
|
||||||
</m:MaterialRow>
|
</m:MaterialRow>
|
||||||
<!-- <m:MaterialRow marginBottom="0"> -->
|
<m:MaterialRow marginBottom="0">
|
||||||
<!-- <m:MaterialLink href="#attach" text="Select files to attach" -->
|
<m:MaterialLink href="#attach" text="Select files to attach"
|
||||||
<!-- textColor="BLACK" iconType="ATTACHMENT" iconPosition="LEFT" -->
|
textColor="BLACK" iconType="ATTACHMENT" iconPosition="LEFT"
|
||||||
<!-- ui:field="attachButton" /> -->
|
ui:field="attachButton" />
|
||||||
<!-- </m:MaterialRow> -->
|
</m:MaterialRow>
|
||||||
<!-- <m:MaterialRow ui:field="attachmentsRow" marginBottom="0" /> -->
|
<m:MaterialRow ui:field="attachmentsRow" marginBottom="0" />
|
||||||
<m:MaterialRow>
|
<m:MaterialRow>
|
||||||
<m:MaterialTextArea ui:field="txtArea" label="Body" resizeRule="AUTO"/>
|
<m:MaterialTextArea ui:field="txtArea" label="Body" resizeRule="AUTO"/>
|
||||||
</m:MaterialRow>
|
</m:MaterialRow>
|
||||||
|
|
|
@ -13,10 +13,13 @@ import org.gcube.applicationsupportlayer.social.shared.SocialNetworkingUser;
|
||||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||||
import org.gcube.common.portal.PortalContext;
|
import org.gcube.common.portal.PortalContext;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
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.FileContainer;
|
||||||
|
import org.gcube.common.storagehub.client.dsl.OpenResolver;
|
||||||
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
|
||||||
import org.gcube.common.storagehub.client.plugins.AbstractPlugin;
|
import org.gcube.common.storagehub.client.plugins.AbstractPlugin;
|
||||||
import org.gcube.common.storagehub.client.proxies.MessageManagerClient;
|
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.FolderItem;
|
||||||
import org.gcube.common.storagehub.model.items.Item;
|
import org.gcube.common.storagehub.model.items.Item;
|
||||||
import org.gcube.common.storagehub.model.messages.Message;
|
import org.gcube.common.storagehub.model.messages.Message;
|
||||||
|
@ -368,12 +371,12 @@ public class ConvServiceImpl implements MessageService {
|
||||||
String checkedBody = body;
|
String checkedBody = body;
|
||||||
String messageId = client.sendMessage(recipientIds, checkedSubject, checkedBody, listAttachmentsId);
|
String messageId = client.sendMessage(recipientIds, checkedSubject, checkedBody, listAttachmentsId);
|
||||||
|
|
||||||
/*try {
|
try {
|
||||||
body += getPublicLinksForAttachs(listAttachmentsId);
|
body += getPublicLinksForAttachs(listAttachmentsId);
|
||||||
|
}
|
||||||
catch (StorageHubException e) {
|
catch (Exception e) {
|
||||||
_log.error("Ops, could not generate publick link for some of the attachments");
|
_log.error("Ops, could not generate publick link for some of the attachments");
|
||||||
}*/
|
}
|
||||||
_log.debug("Sending message notification to: " + recipientIds.toString());
|
_log.debug("Sending message notification to: " + recipientIds.toString());
|
||||||
|
|
||||||
List<GenericItemBean> recipients = getUsersbyUserId(recipientIds);
|
List<GenericItemBean> recipients = getUsersbyUserId(recipientIds);
|
||||||
|
@ -432,10 +435,8 @@ public class ConvServiceImpl implements MessageService {
|
||||||
* @throws ItemNotFoundException
|
* @throws ItemNotFoundException
|
||||||
* @throws InternalErrorException
|
* @throws InternalErrorException
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
private String getPublicLinksForAttachs(ArrayList<String> listAttachments) {
|
private String getPublicLinksForAttachs(ArrayList<String> listAttachments) {
|
||||||
|
|
||||||
|
|
||||||
if (listAttachments != null && (!listAttachments.isEmpty()) ) {
|
if (listAttachments != null && (!listAttachments.isEmpty()) ) {
|
||||||
StorageHubClient client = new StorageHubClient();
|
StorageHubClient client = new StorageHubClient();
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
@ -447,24 +448,22 @@ public class ConvServiceImpl implements MessageService {
|
||||||
try {
|
try {
|
||||||
OpenResolver openResolver = client.open(itemId);
|
OpenResolver openResolver = client.open(itemId);
|
||||||
|
|
||||||
if(openResolver.asItem().getType()==ContainerType.FOLDER) {
|
if(openResolver.resolve().getType()==ContainerType.FILE) {
|
||||||
|
String publicLink = openResolver.asFile().getPublicLink().toString();
|
||||||
String publicLink = openResolver.getPublickLink(itemId).toString();;
|
String itemName = openResolver.asFile().get().getTitle();
|
||||||
String itemName = item.getTitle();
|
|
||||||
|
|
||||||
builder.append(itemName + " ("+publicLink+")");
|
builder.append(itemName + " ("+publicLink+")");
|
||||||
builder.append("\n");
|
builder.append("\n");
|
||||||
}catch (StorageHubException e) {
|
}
|
||||||
_log.error("While reading attachments");
|
} catch (StorageHubException e) {
|
||||||
|
_log.error("While reading attachments", e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_log.debug("returning public links: "+builder.toString());
|
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
else return "";
|
return "";
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue