fixed bug on UserAcceptingInvite not reporting the invite date

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/email-templates-library@148974 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2017-05-24 13:43:30 +00:00
parent a45eb56706
commit a7dc9f6a4c
2 changed files with 11 additions and 7 deletions

View File

@ -20,7 +20,7 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>

View File

@ -1,6 +1,7 @@
package org.gcube.portal.mailing.templates;
import java.util.Base64;
import java.util.Date;
import org.gcube.common.portal.mailing.templates.AbstractTemplate;
import org.gcube.common.portal.mailing.templates.Template;
@ -19,6 +20,7 @@ public class TemplateUserAcceptedInvite extends AbstractTemplate implements Temp
private String theUserWhoInvitedFullname;
private String theUserWhoInvitedUsername;
private String theVREName;
private Date inviteDate;
/**
*
* @param theRegisteredUser
@ -27,12 +29,13 @@ public class TemplateUserAcceptedInvite extends AbstractTemplate implements Temp
* @param gatewayName
* @param gatewayURL
*/
public TemplateUserAcceptedInvite(GCubeUser theAcceptingUser, String theVREName, String theUserWhoInvitedFullname, String theUserWhoInvitedUsername, String gatewayName, String gatewayURL) {
public TemplateUserAcceptedInvite(GCubeUser theAcceptingUser, String theVREName, String theUserWhoInvitedFullname, String theUserWhoInvitedUsername, Date inviteDate, String gatewayName, String gatewayURL) {
super(gatewayName, gatewayURL);
this.theAcceptingUser = theAcceptingUser;
this.theVREName = theVREName;
this.theUserWhoInvitedFullname = theUserWhoInvitedFullname;
this.theUserWhoInvitedUsername = theUserWhoInvitedUsername;
this.inviteDate = inviteDate;
}
@Override
@ -49,7 +52,8 @@ public class TemplateUserAcceptedInvite extends AbstractTemplate implements Temp
.replace("{{GATEWAY_NAME}}", getGatewayName())
.replace("{{USER_EMAIL}}", theAcceptingUser.getEmail())
.replace("{{USER_ID}}", theAcceptingUser.getUsername())
.replace("{{USER_FULLNAME}}", theAcceptingUser.getFullname());
.replace("{{USER_FULLNAME}}", theAcceptingUser.getFullname()
.replace("{{INVITE_DATE}}", this.inviteDate.toString()));
}
@Override