Replaced the HTML code in the POST_MESSAGE

Replaced citation with @username 
Updated pom version at 1.4.1

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/grsf-manage-widget@181849 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-09-25 09:14:35 +00:00
parent 2998e258e7
commit b11949fba3
3 changed files with 17 additions and 6 deletions

View File

@ -1,9 +1,16 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset
component="org.gcube.portlets-widgets.grsf-manage-widget.1-4-1"
date="${buildDate}">
<Change>[Feature #17576] Modify grsf-manage-widget posts to cite people with @username
</Change>
</Changeset>
<Changeset <Changeset
component="org.gcube.portlets-widgets.grsf-manage-widget.1-4-0" component="org.gcube.portlets-widgets.grsf-manage-widget.1-4-0"
date="${buildDate}"> date="${buildDate}">
<Change>[Feature #16312] Report the name of the editor as tag in the <Change>[Feature #16312] Report the name of the editor as tag in the
published feed</Change> published feed
</Change>
</Changeset> </Changeset>
<Changeset <Changeset
component="org.gcube.portlets-widgets.grsf-manage-widget.1-3-3" component="org.gcube.portlets-widgets.grsf-manage-widget.1-3-3"

View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.widgets</groupId> <groupId>org.gcube.portlets.widgets</groupId>
<artifactId>grsf-manage-widget</artifactId> <artifactId>grsf-manage-widget</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.1-SNAPSHOT</version>
<name>gCube GRSF Manage widget</name> <name>gCube GRSF Manage widget</name>
<scm> <scm>

View File

@ -72,8 +72,8 @@ public class SocialCommunications {
// emails to be sent to editors and reviewers and post to be written into the grsf admin vre // emails to be sent to editors and reviewers and post to be written into the grsf admin vre
private static final String POST_MESSAGE = "Dear members," private static final String POST_MESSAGE = "Dear members,"
+ "<br>The record 'PRODUCT_TITLE' has been just updated by USER_FULLNAME." + "\nThe record 'PRODUCT_TITLE' has been just updated by USER_FULLNAME."
+ "<br>You can inspect it here: LINK_RECORD."; + "\nYou can inspect it here: LINK_RECORD.";
private static final String EMAIL_MESSAGE_REVIEWER = "Dear GRSF Reviewer," private static final String EMAIL_MESSAGE_REVIEWER = "Dear GRSF Reviewer,"
+ "<br>an update on the record named 'PRODUCT_TITLE' has been requested by USER_FULLNAME." + "<br>an update on the record named 'PRODUCT_TITLE' has been requested by USER_FULLNAME."
@ -311,12 +311,16 @@ public class SocialCommunications {
// require url // require url
String applicationToken = requireApplicationToken(serviceUrl); String applicationToken = requireApplicationToken(serviceUrl);
final String profilePageURL = GCubePortalConstants.PREFIX_GROUP_URL + extractOrgFriendlyURL(userCurrentUrl) + GCubePortalConstants.USER_PROFILE_FRIENDLY_URL; //see Feature #17576 Updated by Francesco
/*final String profilePageURL = GCubePortalConstants.PREFIX_GROUP_URL + extractOrgFriendlyURL(userCurrentUrl) + GCubePortalConstants.USER_PROFILE_FRIENDLY_URL;
String userFullNameHighlighted = "<a class=\"link\" href=\"" + profilePageURL + "?"+ String userFullNameHighlighted = "<a class=\"link\" href=\"" + profilePageURL + "?"+
Base64.getEncoder().encodeToString(USER_PROFILE_OID.getBytes())+"="+ Base64.getEncoder().encodeToString(USER_PROFILE_OID.getBytes())+"="+
Base64.getEncoder().encodeToString(username.getBytes())+"\">"+fullName+ Base64.getEncoder().encodeToString(username.getBytes())+"\">"+fullName+
"</a> "; "</a> ";
*/
String userFullNameHighlighted = "@"+username;
// replace // replace
String message = POST_MESSAGE.replace("PRODUCT_TITLE", bean.getTitle()).replace("LINK_RECORD", bean.getUrl()). String message = POST_MESSAGE.replace("PRODUCT_TITLE", bean.getTitle()).replace("LINK_RECORD", bean.getUrl()).