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"?>
|
||||
<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>
|
||||
<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">
|
||||
<classpathentry excluding="**" kind="src" output="target/messages-2.5.3-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -30,11 +30,11 @@
|
|||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</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>
|
||||
<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"/>
|
||||
<classpathentry kind="output" path="target/messages-2.5.3-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?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">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -17,7 +27,12 @@
|
|||
|
||||
|
||||
<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"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -35,7 +55,12 @@
|
|||
|
||||
|
||||
<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="/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"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -67,7 +100,12 @@
|
|||
|
||||
|
||||
<property name="context-root" value="messages"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -76,7 +114,12 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -4,7 +4,21 @@
|
|||
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.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
|
||||
|
||||
|
@ -12,7 +26,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
- 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
|
||||
|
||||
|
|
15
README.md
15
README.md
|
@ -20,29 +20,20 @@ See [Releases](https://code-repo.d4science.org/gCubeSystem/Messages/releases).
|
|||
|
||||
## 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
|
||||
|
||||
* **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
|
||||
|
||||
This project is licensed under the EUPL V.1.1 License - see the [LICENSE.md](LICENSE.md) file for details.
|
||||
|
||||
|
||||
## 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 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);
|
||||
|
||||
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)
|
16
pom.xml
16
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<groupId>org.gcube.portets.user</groupId>
|
||||
<artifactId>messages</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.5.0</version>
|
||||
<version>2.6.0</version>
|
||||
<description>
|
||||
gCube Messages Portlet for exchanging messages with other users.
|
||||
</description>
|
||||
|
@ -25,11 +25,7 @@
|
|||
|
||||
<properties>
|
||||
<!-- Convenience property to set the 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.version>2.9.0</gwt.version>
|
||||
<gwt-material.version>2.0.1</gwt-material.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
@ -39,7 +35,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<version>3.6.4</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -102,6 +98,12 @@
|
|||
<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>
|
||||
|
|
|
@ -323,7 +323,8 @@ public class ApplicationView extends Composite {
|
|||
private void displayNewOrReplyMessage() {
|
||||
WRITING_MESSAGE = true;
|
||||
FAB.setVisible(false);
|
||||
messagesCollection.clearActive();
|
||||
if (messagesCollection != null)
|
||||
messagesCollection.clearActive();
|
||||
scrollerPanel.clear();
|
||||
scrollerPanel.add(newMessageDisplay);
|
||||
newMessageDisplay.setFocusOnUsersInput();
|
||||
|
@ -334,7 +335,10 @@ 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")
|
||||
|
|
|
@ -59,8 +59,8 @@ public class WriteMessage extends Composite {
|
|||
@UiField MaterialAutoComplete acModal;
|
||||
@UiField MaterialButton btnSendModal, btnCloseModal;
|
||||
@UiField MaterialPanel modalContent, sendingLoader;
|
||||
// @UiField MaterialRow attachmentsRow;
|
||||
// @UiField MaterialLink attachButton;
|
||||
@UiField MaterialRow attachmentsRow;
|
||||
@UiField MaterialLink attachButton;
|
||||
@UiField MaterialLabel sendingFeedback;
|
||||
@UiField MaterialPreLoader sendingSpinner;
|
||||
@UiField MaterialTextArea txtArea;
|
||||
|
@ -83,7 +83,7 @@ public class WriteMessage extends Composite {
|
|||
}
|
||||
|
||||
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>>() {
|
||||
@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));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -205,39 +205,39 @@ public class WriteMessage extends Composite {
|
|||
toReturn.add(new WSUser("testing", "username testing", "Andrea testing", "@gmail.com"));
|
||||
return toReturn;
|
||||
}
|
||||
// @UiHandler("attachButton")
|
||||
// void onAttach(ClickEvent e) {
|
||||
// List<ItemType> types = new ArrayList<>();
|
||||
// ItemType[] theTypes = ItemType.values();
|
||||
// for (int i = 0; i < theTypes.length; i++) {
|
||||
// if (theTypes[i] != ItemType.FOLDER)
|
||||
// types.add(theTypes[i]);
|
||||
// }
|
||||
// FilterCriteria criteria = null;
|
||||
// final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select an item", criteria, types);
|
||||
// wpTreepopup.setId(Utils.ID_MODALBOOTSTRAP);
|
||||
// wpTreepopup.getElement().getStyle().setLeft(50, Unit.PCT);
|
||||
// wpTreepopup.setZIndex(10010);
|
||||
// WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
// @Override
|
||||
// public void onSelectedItem(Item item) {
|
||||
// attachmentsRow.add(getChip(item.getId(), item.getName(), item.isFolder(), true));
|
||||
// wpTreepopup.hide();
|
||||
// }
|
||||
// @Override
|
||||
// public void onFailed(Throwable throwable) {
|
||||
// Window.alert("There are networks problem, please check your connection.");
|
||||
// }
|
||||
// @Override
|
||||
// public void onAborted() {}
|
||||
// @Override
|
||||
// public void onNotValidSelection() {
|
||||
// }
|
||||
// };
|
||||
//
|
||||
// wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
|
||||
// wpTreepopup.show();
|
||||
// }
|
||||
@UiHandler("attachButton")
|
||||
void onAttach(ClickEvent e) {
|
||||
List<ItemType> types = new ArrayList<>();
|
||||
ItemType[] theTypes = ItemType.values();
|
||||
for (int i = 0; i < theTypes.length; i++) {
|
||||
if (theTypes[i] != ItemType.FOLDER)
|
||||
types.add(theTypes[i]);
|
||||
}
|
||||
FilterCriteria criteria = null;
|
||||
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select an item", criteria, types);
|
||||
wpTreepopup.setId(Utils.ID_MODALBOOTSTRAP);
|
||||
wpTreepopup.getElement().getStyle().setLeft(50, Unit.PCT);
|
||||
wpTreepopup.setZIndex(10010);
|
||||
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
@Override
|
||||
public void onSelectedItem(Item item) {
|
||||
attachmentsRow.add(getChip(item.getId(), item.getName(), item.isFolder(), true));
|
||||
wpTreepopup.hide();
|
||||
}
|
||||
@Override
|
||||
public void onFailed(Throwable throwable) {
|
||||
Window.alert("There are networks problem, please check your connection.");
|
||||
}
|
||||
@Override
|
||||
public void onAborted() {}
|
||||
@Override
|
||||
public void onNotValidSelection() {
|
||||
}
|
||||
};
|
||||
|
||||
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
|
||||
wpTreepopup.show();
|
||||
}
|
||||
|
||||
//for the attachments we distinguish between folder and files
|
||||
private MaterialChip getChip(String itemId, String itemName, boolean isFolder, boolean deletable) {
|
||||
|
@ -263,13 +263,13 @@ public class WriteMessage extends Composite {
|
|||
|
||||
private ArrayList<String> getSelectedFilesAndFoldersId() {
|
||||
ArrayList<String> toReturn = new ArrayList<>();
|
||||
// int n = attachmentsRow.getWidgetCount();
|
||||
// for (int i = 0; i < n; i++) {
|
||||
// Widget w = attachmentsRow.getWidget(i);
|
||||
// if (w instanceof MaterialChip) {
|
||||
// toReturn.add(((MaterialChip) w).getId());
|
||||
// }
|
||||
// }
|
||||
int n = attachmentsRow.getWidgetCount();
|
||||
for (int i = 0; i < n; i++) {
|
||||
Widget w = attachmentsRow.getWidget(i);
|
||||
if (w instanceof MaterialChip) {
|
||||
toReturn.add(((MaterialChip) w).getId());
|
||||
}
|
||||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
@ -297,6 +297,7 @@ public class WriteMessage extends Composite {
|
|||
txtArea.reset();
|
||||
}
|
||||
GWT.log(getSelectedUsers()+"");
|
||||
GWT.log(getSelectedFilesAndFoldersId()+"");
|
||||
ArrayList<String> recipientIds = new ArrayList<>();
|
||||
for (WSUser u : getSelectedUsers()) {
|
||||
recipientIds.add(u.getScreenname());
|
||||
|
|
|
@ -44,12 +44,12 @@
|
|||
<m:MaterialTextBox label="Subject" ui:field="txtBoxSubject"
|
||||
marginBottom="0" />
|
||||
</m:MaterialRow>
|
||||
<!-- <m:MaterialRow marginBottom="0"> -->
|
||||
<!-- <m:MaterialLink href="#attach" text="Select files to attach" -->
|
||||
<!-- textColor="BLACK" iconType="ATTACHMENT" iconPosition="LEFT" -->
|
||||
<!-- ui:field="attachButton" /> -->
|
||||
<!-- </m:MaterialRow> -->
|
||||
<!-- <m:MaterialRow ui:field="attachmentsRow" marginBottom="0" /> -->
|
||||
<m:MaterialRow marginBottom="0">
|
||||
<m:MaterialLink href="#attach" text="Select files to attach"
|
||||
textColor="BLACK" iconType="ATTACHMENT" iconPosition="LEFT"
|
||||
ui:field="attachButton" />
|
||||
</m:MaterialRow>
|
||||
<m:MaterialRow ui:field="attachmentsRow" marginBottom="0" />
|
||||
<m:MaterialRow>
|
||||
<m:MaterialTextArea ui:field="txtArea" label="Body" resizeRule="AUTO"/>
|
||||
</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.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;
|
||||
|
@ -368,12 +371,12 @@ public class ConvServiceImpl implements MessageService {
|
|||
String checkedBody = body;
|
||||
String messageId = client.sendMessage(recipientIds, checkedSubject, checkedBody, listAttachmentsId);
|
||||
|
||||
/*try {
|
||||
try {
|
||||
body += getPublicLinksForAttachs(listAttachmentsId);
|
||||
|
||||
catch (StorageHubException e) {
|
||||
}
|
||||
catch (Exception 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);
|
||||
|
@ -432,10 +435,8 @@ 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();
|
||||
|
@ -447,24 +448,22 @@ public class ConvServiceImpl implements MessageService {
|
|||
try {
|
||||
OpenResolver openResolver = client.open(itemId);
|
||||
|
||||
if(openResolver.asItem().getType()==ContainerType.FOLDER) {
|
||||
|
||||
String publicLink = openResolver.getPublickLink(itemId).toString();;
|
||||
String itemName = item.getTitle();
|
||||
if(openResolver.resolve().getType()==ContainerType.FILE) {
|
||||
String publicLink = openResolver.asFile().getPublicLink().toString();
|
||||
String itemName = openResolver.asFile().get().getTitle();
|
||||
|
||||
builder.append(itemName + " ("+publicLink+")");
|
||||
builder.append("\n");
|
||||
}catch (StorageHubException e) {
|
||||
_log.error("While reading attachments");
|
||||
}
|
||||
} catch (StorageHubException e) {
|
||||
_log.error("While reading attachments", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_log.debug("returning public links: "+builder.toString());
|
||||
return builder.toString();
|
||||
}
|
||||
else return "";
|
||||
}*/
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue