Start supporting user deletion and the possibility to resend the welcome email notification
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/create-users@125785 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a2a5e8c3c7
commit
b7d038c670
15
pom.xml
15
pom.xml
|
@ -59,6 +59,16 @@
|
|||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common.portal</groupId>
|
||||
<artifactId>portal-manager</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
|
@ -127,11 +137,6 @@
|
|||
<artifactId>home-library-model</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm-all</artifactId>
|
||||
<version>[5.0.0-SNAPSHOT, 6.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>home-library</artifactId>
|
||||
|
|
|
@ -11,8 +11,11 @@ import com.github.gwtbootstrap.client.ui.TabPane;
|
|||
import com.github.gwtbootstrap.client.ui.TabPanel;
|
||||
import com.github.gwtbootstrap.client.ui.constants.AlertType;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.shared.HandlerManager;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Button;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
|
||||
|
@ -33,6 +36,9 @@ public class CreateUsersPanel extends Composite {
|
|||
|
||||
// registered users subpanel
|
||||
private TabPane registeredUsersSubPanel = new TabPane("Already Created Users") ;
|
||||
|
||||
// TODO remove
|
||||
private TabPane sendMailTabPane = new TabPane("Send Mail");
|
||||
|
||||
// Create a remote service proxy to talk to the server-side user manager service.
|
||||
private final HandleUsersServiceAsync userServices = GWT.create(HandleUsersService.class);
|
||||
|
@ -56,6 +62,32 @@ public class CreateUsersPanel extends Composite {
|
|||
LoadingText loader = new LoadingText();
|
||||
loader.setVisible(true);
|
||||
registeredUsersSubPanel.add(loader);
|
||||
|
||||
// TODO remove
|
||||
Button sendMail = new Button("Test send email");
|
||||
sendMail.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
GWT.log("send email requested");
|
||||
userServices.sendEmailToUser("costantino.perciante@isti.cnr.it", new AsyncCallback<Void>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
// TODO Auto-generated method stub
|
||||
GWT.log("ok");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
// TODO Auto-generated method stub
|
||||
GWT.log("not ok");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
sendMailTabPane.add(sendMail);
|
||||
navTabs.add(sendMailTabPane);
|
||||
|
||||
// add stuff to the main panel
|
||||
navTabs.add(addUserSubPanel);
|
||||
|
|
|
@ -16,18 +16,30 @@ public interface HandleUsersService extends RemoteService {
|
|||
* Register this user to the current vre.
|
||||
* @param name
|
||||
* @param surname
|
||||
* @param company
|
||||
* @param institution/organization
|
||||
* @param email
|
||||
* @param sendEmail
|
||||
* @param isMale
|
||||
* @return the registered user information or null if the registration failed
|
||||
*/
|
||||
VreUserBean register(String name, String surname, String company, String email, boolean sendEmail, boolean isMale);
|
||||
VreUserBean register(String name, String surname, String institution, String email, boolean sendEmail, boolean isMale);
|
||||
|
||||
/**
|
||||
* Retrieve the list of already registered users.
|
||||
* @return a list of already registered users or null in case of error
|
||||
*/
|
||||
List<VreUserBean> getAlreadyRegisterdUsers();
|
||||
|
||||
/**
|
||||
* Delete an already invited user that didn't change his password.
|
||||
* @param email
|
||||
*/
|
||||
public boolean deleteInvitedUser(String email);
|
||||
|
||||
/**
|
||||
* Send the registration email to this user
|
||||
* @param email
|
||||
*/
|
||||
public void sendEmailToUser(String email);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@ public interface HandleUsersServiceAsync {
|
|||
|
||||
void getAlreadyRegisterdUsers(AsyncCallback<List<VreUserBean>> callback);
|
||||
|
||||
void register(String name, String surname, String company, String email,
|
||||
void register(String name, String surname, String institution, String email,
|
||||
boolean sendEmail, boolean isMale, AsyncCallback<VreUserBean> callback);
|
||||
|
||||
void deleteInvitedUser(String email, AsyncCallback<Boolean> callback);
|
||||
|
||||
void sendEmailToUser(String email, AsyncCallback<Void> callback);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package org.gcube.portlets.admin.createusers.client.ui;
|
||||
|
||||
import com.google.gwt.user.client.ui.PopupPanel;
|
||||
|
||||
public class PopupPanelExtended extends PopupPanel {
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -7,6 +7,7 @@ import org.gcube.portlets.admin.createusers.client.event.AddUserEvent;
|
|||
import org.gcube.portlets.admin.createusers.client.event.AddUserEventHandler;
|
||||
import org.gcube.portlets.admin.createusers.shared.VreUserBean;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.CellTable;
|
||||
import com.google.gwt.cell.client.Cell;
|
||||
import com.google.gwt.cell.client.TextCell;
|
||||
|
@ -17,6 +18,9 @@ import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
|||
import com.google.gwt.user.cellview.client.Column;
|
||||
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
|
||||
import com.google.gwt.user.client.ui.Composite;
|
||||
import com.google.gwt.user.client.ui.PopupPanel;
|
||||
import com.google.gwt.view.client.CellPreviewEvent;
|
||||
import com.google.gwt.view.client.CellPreviewEvent.Handler;
|
||||
import com.google.gwt.view.client.ListDataProvider;
|
||||
import com.google.gwt.view.client.Range;
|
||||
|
||||
|
@ -113,26 +117,26 @@ public class RegisteredUsersTable extends Composite {
|
|||
surnameCol.setDefaultSortAscending(false);
|
||||
table.addColumnSortHandler(surnameColHandler);
|
||||
|
||||
// company and handler for sorting
|
||||
Column<VreUserBean, String> companyCol = getColumn(new TextCell(), new GetValue<String>() {
|
||||
// institution/organization and handler for sorting
|
||||
Column<VreUserBean, String> institutionCol = getColumn(new TextCell(), new GetValue<String>() {
|
||||
@Override
|
||||
public String getValue(VreUserBean user) {
|
||||
return user.getCompany();
|
||||
return user.getInstitution();
|
||||
}
|
||||
});
|
||||
|
||||
ListHandler<VreUserBean> companyColHandler = new ListHandler<VreUserBean>(dataProvider.getList());
|
||||
companyColHandler.setComparator(companyCol, new Comparator<VreUserBean>() {
|
||||
ListHandler<VreUserBean> institutionColHandler = new ListHandler<VreUserBean>(dataProvider.getList());
|
||||
institutionColHandler.setComparator(institutionCol, new Comparator<VreUserBean>() {
|
||||
@Override
|
||||
public int compare(VreUserBean o1, VreUserBean o2) {
|
||||
|
||||
return o1.getCompany().compareTo(o2.getCompany());
|
||||
return o1.getInstitution().compareTo(o2.getInstitution());
|
||||
|
||||
}
|
||||
});
|
||||
companyCol.setSortable(true);
|
||||
companyCol.setDefaultSortAscending(false);
|
||||
table.addColumnSortHandler(companyColHandler);
|
||||
institutionCol.setSortable(true);
|
||||
institutionCol.setDefaultSortAscending(false);
|
||||
table.addColumnSortHandler(institutionColHandler);
|
||||
|
||||
// password and handler for sorting
|
||||
Column<VreUserBean, String> passwordChanged = getColumn(new TextCell(), new GetValue<String>() {
|
||||
|
@ -178,6 +182,42 @@ public class RegisteredUsersTable extends Composite {
|
|||
table.addColumnSortHandler(registrationDateColHandler);
|
||||
table.getColumnSortList().push(registrationDate);
|
||||
|
||||
// add row click handler
|
||||
table.addCellPreviewHandler(new Handler<VreUserBean>() {
|
||||
|
||||
@Override
|
||||
public void onCellPreview(CellPreviewEvent<VreUserBean> event) {
|
||||
boolean isClick = "click".equals(event.getNativeEvent().getType());
|
||||
if(isClick){
|
||||
|
||||
int rowIndex = event.getIndex();
|
||||
PopupPanel drop = new PopupPanel();
|
||||
drop.setGlassEnabled(true);
|
||||
|
||||
// add buttons and events
|
||||
VreUserBean rowBean = dataProvider.getList().get(rowIndex);
|
||||
|
||||
Button deleteUserButton = new Button("Delete User");
|
||||
Button sendWelcomeButton = new Button("Send Email");
|
||||
|
||||
|
||||
if(!rowBean.isPasswordChanged())
|
||||
deleteUserButton.setEnabled(false);
|
||||
|
||||
// add to drop
|
||||
drop.add(deleteUserButton);
|
||||
drop.add(sendWelcomeButton);
|
||||
|
||||
// position and show
|
||||
int left = table.getRowElement(rowIndex).getAbsoluteLeft();
|
||||
int top = table.getRowElement(rowIndex).getAbsoluteTop();
|
||||
drop.setPopupPosition(left, top);
|
||||
drop.show();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// add columns
|
||||
SafeHtmlBuilder builder = new SafeHtmlBuilder();
|
||||
builder.appendHtmlConstant("<span title=\"" + "Registered user's email"+ "\">");
|
||||
|
@ -195,10 +235,10 @@ public class RegisteredUsersTable extends Composite {
|
|||
builder.appendHtmlConstant("</span>");
|
||||
table.addColumn(surnameCol, builder.toSafeHtml());
|
||||
builder = new SafeHtmlBuilder();
|
||||
builder.appendHtmlConstant("<span title=\"" + "Registered user's company"+ "\">");
|
||||
builder.appendEscaped("Company");
|
||||
builder.appendHtmlConstant("<span title=\"" + "Registered user's institution/organization"+ "\">");
|
||||
builder.appendEscaped("Institution / Organisation");
|
||||
builder.appendHtmlConstant("</span>");
|
||||
table.addColumn(companyCol, builder.toSafeHtml());
|
||||
table.addColumn(institutionCol, builder.toSafeHtml());
|
||||
builder = new SafeHtmlBuilder();
|
||||
builder.appendHtmlConstant("<span title=\"" + "Did he/she change the default password?"+ "\">");
|
||||
builder.appendEscaped("Password Changed");
|
||||
|
|
|
@ -9,13 +9,18 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.mail.internet.InternetAddress;
|
||||
|
||||
import org.gcube.application.framework.core.session.ASLSession;
|
||||
import org.gcube.application.framework.core.session.SessionManager;
|
||||
import org.gcube.common.homelibrary.home.HomeLibrary;
|
||||
import org.gcube.common.portal.PortalContext;
|
||||
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
|
||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
import org.gcube.portlets.admin.createusers.client.HandleUsersService;
|
||||
import org.gcube.portlets.admin.createusers.shared.VreUserBean;
|
||||
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementPortalException;
|
||||
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayGroupManager;
|
||||
import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager;
|
||||
|
@ -24,8 +29,13 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
|
||||
import com.liferay.mail.service.MailServiceUtil;
|
||||
import com.liferay.portal.kernel.dao.jdbc.DataAccess;
|
||||
import com.liferay.portal.kernel.exception.PortalException;
|
||||
import com.liferay.portal.kernel.exception.SystemException;
|
||||
import com.liferay.portal.kernel.mail.MailMessage;
|
||||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
import com.liferay.portal.util.PortalUtil;
|
||||
|
||||
/**
|
||||
* The server side implementation of the RPC service.
|
||||
|
@ -47,7 +57,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
private static final String FIELD_EMAIL = "email";
|
||||
private static final String FIELD_NAME = "name";
|
||||
private static final String FIELD_SURNAME = "surname";
|
||||
private static final String FIELD_COMPANY = "company";
|
||||
private static final String FIELD_INSTITUTION = "institution_organization";
|
||||
private static final String FIELD_REGISTRATION_DATE = "registration_date";
|
||||
private static final String FIELD_VRE = "vre";
|
||||
|
||||
|
@ -105,7 +115,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
+ "email varchar(255) NOT NULL, "
|
||||
+ "name" + " varchar(255) NOT NULL, "
|
||||
+ "surname" + " varchar(255) NOT NULL, "
|
||||
+ "company" + " varchar(255) DEFAULT NULL, "
|
||||
+ "institution_organization" + " varchar(255) DEFAULT NULL, "
|
||||
+ "vre" + " varchar(255) NOT NULL, "
|
||||
+ "registration_date" + " TIMESTAMP NOT NULL)");
|
||||
|
||||
|
@ -167,16 +177,74 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
return user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteInvitedUser(String email) {
|
||||
|
||||
try{
|
||||
|
||||
Connection con = DataAccess.getConnection();
|
||||
boolean deletedLiferay = deleteUserFromLiferay(email);
|
||||
boolean deletedTable = deleteUserFromTable(email, con);
|
||||
return deletedLiferay && deletedTable;
|
||||
|
||||
}catch(SQLException e){
|
||||
logger.debug("Error while trying to delete user with email = " + email, e);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VreUserBean register(String name, String surname, String company,
|
||||
public void sendEmailToUser(String email) {
|
||||
|
||||
logger.debug("Sending welcome message to user with email " + email);
|
||||
try{
|
||||
|
||||
PortalContext context = PortalContext.getConfiguration();
|
||||
String gatewayName = context.getGatewayName();
|
||||
String emailSender = context.getSenderEmail();
|
||||
|
||||
InternetAddress to = new InternetAddress(email);
|
||||
InternetAddress from = new InternetAddress(emailSender);
|
||||
|
||||
LiferayUserManager userManager = new LiferayUserManager();
|
||||
String portalUrl = PortalUtil.getPortalURL(OrganizationsUtil.getCompany().getVirtualHostname(), 443, true);
|
||||
String username = userManager.getFullNameFromEmail(email);
|
||||
|
||||
MailMessage mailMessage = new MailMessage();
|
||||
mailMessage.setFrom(from);
|
||||
mailMessage.setTo(to);
|
||||
|
||||
String body = "<p>Dear " + username + ",<br />" + "<br />" +
|
||||
"Welcome! You recently created an account at http:// " + portalUrl + ". Your password is not sent by email for security purposes.<br />" +
|
||||
"<br />" + "Sincerely,<br />" +
|
||||
gatewayName + "<br />" +
|
||||
emailSender + "<br />" + portalUrl;
|
||||
String subject = "http://" + portalUrl + ": Your New Account was created successfully!";
|
||||
|
||||
logger.debug("Body is " + body);
|
||||
logger.debug("Subject is " + subject);
|
||||
|
||||
mailMessage.setBody(body);
|
||||
mailMessage.setSubject(subject);
|
||||
mailMessage.setHTMLFormat(true);
|
||||
MailServiceUtil.sendEmail(mailMessage);
|
||||
}catch(Exception e){
|
||||
logger.error("Error while sending email to user " + email, e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VreUserBean register(String name, String surname, String institution,
|
||||
String email, boolean sendEmail, boolean isMale) {
|
||||
|
||||
// if in dev mode return ok
|
||||
if (!isWithinPortal()) {
|
||||
|
||||
logger.debug("In dev mode.");
|
||||
return new VreUserBean(name, surname, company, email, false, System.currentTimeMillis(), isMale);
|
||||
return new VreUserBean(name, surname, institution, email, false, System.currentTimeMillis(), isMale);
|
||||
|
||||
}else{
|
||||
|
||||
|
@ -205,7 +273,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
}
|
||||
else{
|
||||
|
||||
logger.debug("Trying to add user: " + name + ", " + surname + ", " + email + ", " + company);
|
||||
logger.debug("Trying to add user: " + name + ", " + surname + ", " + email + ", " + institution);
|
||||
Connection con = null;
|
||||
try{
|
||||
|
||||
|
@ -214,7 +282,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
"("+ FIELD_EMAIL + ","
|
||||
+ FIELD_NAME +","
|
||||
+ FIELD_SURNAME + ","
|
||||
+ FIELD_COMPANY + ","
|
||||
+ FIELD_INSTITUTION + ","
|
||||
+ FIELD_REGISTRATION_DATE + ","
|
||||
+ FIELD_VRE
|
||||
+ ") values(?, ?, ?, ?, ?, ?)";
|
||||
|
@ -224,7 +292,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
statement.setString(1, email);
|
||||
statement.setString(2, name);
|
||||
statement.setString(3, surname);
|
||||
statement.setString(4, company);
|
||||
statement.setString(4, institution);
|
||||
statement.setTimestamp(5, new Timestamp(timestamp));
|
||||
statement.setString(6, vre);
|
||||
int res = statement.executeUpdate();
|
||||
|
@ -242,7 +310,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
name,
|
||||
"",
|
||||
surname,
|
||||
company,
|
||||
institution,
|
||||
"",
|
||||
isMale,
|
||||
null,
|
||||
|
@ -283,7 +351,7 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
}
|
||||
}
|
||||
|
||||
return new VreUserBean(name, surname, company, email, false, timestamp, isMale);
|
||||
return new VreUserBean(name, surname, institution, email, false, timestamp, isMale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -330,15 +398,15 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
|
||||
String name = rs.getString(FIELD_NAME);
|
||||
String surname = rs.getString(FIELD_SURNAME);
|
||||
String company = rs.getString(FIELD_COMPANY);
|
||||
String institution = rs.getString(FIELD_INSTITUTION);
|
||||
String email = rs.getString(FIELD_EMAIL);
|
||||
long registrationDate = rs.getTimestamp(FIELD_REGISTRATION_DATE).getTime();
|
||||
|
||||
// check if the password has been changed or not wrt the default one
|
||||
boolean passwordChanged = userManager.isPasswordChanged(email);
|
||||
|
||||
// the gender information is useless (set to false)
|
||||
toReturn.add(new VreUserBean(name, surname, company, email, passwordChanged, registrationDate, false));
|
||||
|
||||
toReturn.add(new VreUserBean(name, surname, institution, email, passwordChanged, registrationDate, false));
|
||||
|
||||
}
|
||||
|
||||
|
@ -379,21 +447,44 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|||
* @param email
|
||||
* @param con
|
||||
*/
|
||||
private void deleteUserFromTable(String email, Connection con) {
|
||||
private boolean deleteUserFromTable(String email, Connection con) {
|
||||
|
||||
try{
|
||||
|
||||
logger.debug("Going to delete user with email " + email);
|
||||
|
||||
|
||||
String remove = "DELETE FROM " + REGISTERED_USERS_TABLE + " WHERE " + FIELD_EMAIL + "= ?";
|
||||
PreparedStatement statementDelete = con.prepareStatement(remove);
|
||||
statementDelete.setString(1, email);
|
||||
statementDelete.executeUpdate();
|
||||
int res = statementDelete.executeUpdate();
|
||||
|
||||
if(res == 1)
|
||||
return true;
|
||||
|
||||
}catch(Exception e){
|
||||
|
||||
logger.error("Error while deleting user=" + email + "from the table");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user from liferay
|
||||
* @param email
|
||||
*/
|
||||
private boolean deleteUserFromLiferay(String email) {
|
||||
|
||||
LiferayUserManager userManager = new LiferayUserManager();
|
||||
try {
|
||||
userManager.deleteUserByEMail(email);
|
||||
return true;
|
||||
} catch (PortalException | SystemException
|
||||
| UserManagementSystemException | UserManagementPortalException e) {
|
||||
logger.error("Unable to delete user from liferay", e);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,10 +10,9 @@ public class VreUserBean implements Serializable{
|
|||
|
||||
private static final long serialVersionUID = -8674087530839002999L;
|
||||
|
||||
|
||||
private String name;
|
||||
private String surname;
|
||||
private String company;
|
||||
private String institution;
|
||||
private String email;
|
||||
private boolean passwordChanged;
|
||||
private long regisrationDate;
|
||||
|
@ -30,18 +29,18 @@ public class VreUserBean implements Serializable{
|
|||
* Build a user bean object.
|
||||
* @param name
|
||||
* @param surname
|
||||
* @param company
|
||||
* @param institution
|
||||
* @param email
|
||||
* @param passwordChanged
|
||||
* @param registrationDate
|
||||
* @param isMale
|
||||
*/
|
||||
public VreUserBean(String name, String surname, String company,
|
||||
public VreUserBean(String name, String surname, String institution,
|
||||
String email, boolean passwordChanged, long registrationDate, boolean isMale) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.surname = surname;
|
||||
this.company = company;
|
||||
this.institution = institution;
|
||||
this.email = email;
|
||||
this.passwordChanged = passwordChanged;
|
||||
this.regisrationDate = registrationDate;
|
||||
|
@ -64,12 +63,12 @@ public class VreUserBean implements Serializable{
|
|||
this.surname = surname;
|
||||
}
|
||||
|
||||
public String getCompany() {
|
||||
return company;
|
||||
public String getInstitution() {
|
||||
return institution;
|
||||
}
|
||||
|
||||
public void setCompany(String company) {
|
||||
this.company = company;
|
||||
public void setInstitution(String institution) {
|
||||
this.institution = institution;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
|
@ -109,9 +108,8 @@ public class VreUserBean implements Serializable{
|
|||
@Override
|
||||
public String toString() {
|
||||
return "VreUserBean [name=" + name + ", surname=" + surname
|
||||
+ ", company=" + company + ", email=" + email
|
||||
+ ", institution=" + institution + ", email=" + email
|
||||
+ ", passwordChanged=" + passwordChanged + ", regisrationDate="
|
||||
+ regisrationDate + ", isMale=" + isMale + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue