This repository has been archived by the owner on Apr 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
105 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 23 additions & 23 deletions
46
portal/ui/src/main/java/org/gatein/portal/ui/register/Flash.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
package org.gatein.portal.ui.register; | ||
|
||
import juzu.FlashScoped; | ||
|
||
import javax.inject.Named; | ||
|
||
import juzu.FlashScoped; | ||
|
||
@Named("flash") | ||
@FlashScoped | ||
public class Flash { | ||
|
||
private String success = ""; | ||
private String success = ""; | ||
|
||
private String error = ""; | ||
private String error = ""; | ||
|
||
private String userName = ""; | ||
private String userName = ""; | ||
|
||
public String getSuccess() { | ||
return success; | ||
} | ||
public String getSuccess() { | ||
return success; | ||
} | ||
|
||
public void setSuccess(String success) { | ||
this.success = success; | ||
} | ||
public void setSuccess(String success) { | ||
this.success = success; | ||
} | ||
|
||
public String getError() { | ||
return error; | ||
} | ||
public String getError() { | ||
return error; | ||
} | ||
|
||
public void setError(String error) { | ||
this.error = error; | ||
} | ||
public void setError(String error) { | ||
this.error = error; | ||
} | ||
|
||
public String getUserName() { | ||
return userName; | ||
} | ||
public String getUserName() { | ||
return userName; | ||
} | ||
|
||
public void setUserName(String userName) { | ||
this.userName = userName; | ||
} | ||
public void setUserName(String userName) { | ||
this.userName = userName; | ||
} | ||
|
||
} |
60 changes: 30 additions & 30 deletions
60
portal/ui/src/main/java/org/gatein/portal/ui/register/User.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
package org.gatein.portal.ui.register; | ||
|
||
import juzu.Mapped; | ||
|
||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
|
||
import juzu.Mapped; | ||
|
||
@Mapped | ||
public class User { | ||
public String userName; | ||
public String userName; | ||
|
||
public String password; | ||
public String password; | ||
|
||
public String firstName; | ||
public String firstName; | ||
|
||
public String lastName; | ||
public String lastName; | ||
|
||
public String displayName; | ||
public String displayName; | ||
|
||
public String emailAddress; | ||
public String emailAddress; | ||
|
||
private static final Map<String, User> users = new LinkedHashMap<String, User>(); | ||
private static final Map<String, User> users = new LinkedHashMap<String, User>(); | ||
|
||
public User() { | ||
} | ||
public User() { | ||
} | ||
|
||
public User(String userName, String password, String firstName, String lastName, String displayName, | ||
String emailAddress) { | ||
this.userName = userName; | ||
this.password = password; | ||
this.firstName = firstName; | ||
this.lastName = lastName; | ||
this.displayName = displayName; | ||
this.emailAddress = emailAddress; | ||
} | ||
public User(String userName, String password, String firstName, String lastName, String displayName, | ||
String emailAddress) { | ||
this.userName = userName; | ||
this.password = password; | ||
this.firstName = firstName; | ||
this.lastName = lastName; | ||
this.displayName = displayName; | ||
this.emailAddress = emailAddress; | ||
} | ||
|
||
public static void saveUser(User user) { | ||
System.out.println("save " + user.toString()); | ||
users.put(user.userName, user); | ||
} | ||
public static void saveUser(User user) { | ||
System.out.println("save " + user.toString()); | ||
users.put(user.userName, user); | ||
} | ||
|
||
public static User getUser(String userName) { | ||
return users.get(userName); | ||
} | ||
public static User getUser(String userName) { | ||
return users.get(userName); | ||
} | ||
|
||
public String toString() { | ||
return "User (userName = " + this.userName + ")"; | ||
} | ||
public String toString() { | ||
return "User (userName = " + this.userName + ")"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters