@PostConstruct public void configureUsers() { for (int i = 0; i < 200; i++) { UserModel user = new UserModel(); user.setPath("geofence/resources/images/userChoose.jpg"); user.setName("TEST" + i); user.setFullName("profile" + i); user.setPassword("password" + i); user.setEmailAddress("profile" + i + "@test.it"); this.users.add(user); } }
UserModel user = new UserModel(); user.setName(userName); user.setPassword(password); user.setGrantedAuthorizations(guiAuths);
/** * Instantiates a new user. */ public UserModel() { setPath("geofence/resources/images/userChoose.jpg"); }
/** * Sets the email address. * * @param emailAddress * the new email address */ public void setEmailAddress(String emailAddress) { this.emailAddress = emailAddress; set(BeanKeyValue.EMAIL.getValue(), emailAddress); }
@Override public void componentSelected(ButtonEvent ce) { Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE, new String[] { "Delete User", "Delete User button pressed." }); MessageBox.confirm("Delete User", "Are you sure to delete profile " + getModel().getName() + " ?", new Listener<MessageBoxEvent>() { public void handleEvent(MessageBoxEvent be) { Button btn = be.getButtonClicked(); if (btn.getText().equalsIgnoreCase("YES")) { Dispatcher.forwardEvent(GeofenceEvents.DELETE_USER, getModel()); } } }); } });
/** * Sets the enabled. * * @param enabled * the new enabled */ public void setEnabled(boolean enabled) { this.enabled = enabled; set(BeanKeyValue.USER_ENABLED.getValue(), enabled); }
/** * Sets the name. * * @param name * the new name */ public void setName(String name) { this.name = name; set(BeanKeyValue.USER_NAME.getValue(), this.name); }
/** * Sets the date creation. * * @param dateCreation * the new date creation */ public void setDateCreation(Date dateCreation) { this.dateCreation = dateCreation; set(BeanKeyValue.DATE_CREATION.getValue(), dateCreation); }
/** * Sets the full name. * * @param fullName * the new full name */ public void setFullName(String fullName) { this.fullName = fullName; set(BeanKeyValue.FULL_NAME.getValue(), fullName); }
/** * Sets the path. * * @param path * the new path */ public void setPath(String path) { this.path = path; set(BeanKeyValue.PATH.getValue(), this.path); }