Guest User

Untitled

a guest
Nov 26th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. package id.swhp.javaee.soteria.presentation;
  2.  
  3. import static org.omnifaces.util.Messages.addGlobalInfo;
  4.  
  5. import id.swhp.javaee.soteria.business.account.boundary.AccountStore;
  6. import javax.enterprise.inject.Model;
  7. import javax.inject.Inject;
  8.  
  9. /**
  10. *
  11. * @author Sukma Wardana
  12. * @since 1.0
  13. */
  14. @Model
  15. public class Register {
  16.  
  17. private String username;
  18. private String password;
  19. private String email;
  20.  
  21. @Inject
  22. AccountStore accountStore;
  23.  
  24. public void submit() {
  25. this.accountStore.registerAccount(username, email, password);
  26. addGlobalInfo("register.message.success");
  27. }
  28.  
  29. public String getUsername() {
  30. return username;
  31. }
  32.  
  33. public void setUsername(String username) {
  34. this.username = username;
  35. }
  36.  
  37. public String getPassword() {
  38. return password;
  39. }
  40.  
  41. public void setPassword(String password) {
  42. this.password = password;
  43. }
  44.  
  45. public String getEmail() {
  46. return email;
  47. }
  48.  
  49. public void setEmail(String email) {
  50. this.email = email;
  51. }
  52. }
Add Comment
Please, Sign In to add comment