Skip to content

Commit 3b7cd6c

Browse files
committed
migrate spring-boot
1 parent 41edd49 commit 3b7cd6c

File tree

8 files changed

+82
-83
lines changed

8 files changed

+82
-83
lines changed

etc/serialversions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ org.woehlke.simpleworklist.oodm.entities.UserPasswordRecovery: private static
1515
org.woehlke.simpleworklist.oodm.entities.UserRegistration: private static final long serialVersionUID = -1955967514018161878L;
1616
org.woehlke.simpleworklist.breadcrumb.BreadcrumbItem: private static final long serialVersionUID = 8276819198016077167L;
1717
org.woehlke.simpleworklist.breadcrumb.Breadcrumb: private static final long serialVersionUID = 7932703111140692689L;
18-
org.woehlke.simpleworklist.model.beans.LoginForm: private static final long serialVersionUID = 5936886560348238355L;
18+
org.woehlke.simpleworklist.user.login.LoginForm: private static final long serialVersionUID = 5936886560348238355L;
1919
org.woehlke.simpleworklist.model.beans.NewContextForm: private static final long serialVersionUID = -937143305653156981L;
2020
org.woehlke.simpleworklist.model.beans.NewUser2UserMessage: private static final long serialVersionUID = 1576610181966480168L;
2121
org.woehlke.simpleworklist.model.beans.SearchResult: private static final long serialVersionUID = 1682809351146047764L;

getserialversionid.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ serialver org.woehlke.simpleworklist.oodm.entities.UserPasswordRecovery >> ..\.
3232
serialver org.woehlke.simpleworklist.oodm.entities.UserRegistration >> ..\..\etc\serialversions.txt
3333
serialver org.woehlke.simpleworklist.breadcrumb.BreadcrumbItem >> ..\..\etc\serialversions.txt
3434
serialver org.woehlke.simpleworklist.breadcrumb.Breadcrumb >> ..\..\etc\serialversions.txt
35-
serialver org.woehlke.simpleworklist.model.beans.LoginForm >> ..\..\etc\serialversions.txt
35+
serialver org.woehlke.simpleworklist.user.login.LoginForm >> ..\..\etc\serialversions.txt
3636
serialver org.woehlke.simpleworklist.model.beans.NewContextForm >> ..\..\etc\serialversions.txt
3737
serialver org.woehlke.simpleworklist.model.beans.NewUser2UserMessage >> ..\..\etc\serialversions.txt
3838
serialver org.woehlke.simpleworklist.model.beans.SearchResult >> ..\..\etc\serialversions.txt

getserialversionid.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ serialver org.woehlke.simpleworklist.oodm.entities.UserPasswordRecovery >> $SER
4444
serialver org.woehlke.simpleworklist.oodm.entities.UserRegistration >> $SERIALVERSIONS_FILE
4545
serialver org.woehlke.simpleworklist.breadcrumb.BreadcrumbItem >> $SERIALVERSIONS_FILE
4646
serialver org.woehlke.simpleworklist.breadcrumb.Breadcrumb >> $SERIALVERSIONS_FILE
47-
serialver org.woehlke.simpleworklist.model.beans.LoginForm >> $SERIALVERSIONS_FILE
47+
serialver org.woehlke.simpleworklist.user.login.LoginForm >> $SERIALVERSIONS_FILE
4848
serialver org.woehlke.simpleworklist.model.beans.NewContextForm >> $SERIALVERSIONS_FILE
4949
serialver org.woehlke.simpleworklist.model.beans.NewUser2UserMessage >> $SERIALVERSIONS_FILE
5050
serialver org.woehlke.simpleworklist.model.beans.SearchResult >> $SERIALVERSIONS_FILE

src/main/java/org/woehlke/simpleworklist/user/UserAccountAccessService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.woehlke.simpleworklist.model.beans.UserChangePasswordForm;
44
import org.woehlke.simpleworklist.oodm.entities.UserAccount;
5-
import org.woehlke.simpleworklist.model.beans.LoginForm;
5+
import org.woehlke.simpleworklist.user.login.LoginForm;
66

77
public interface UserAccountAccessService {
88

src/main/java/org/woehlke/simpleworklist/user/UserAccountAccessServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import org.springframework.transaction.annotation.Propagation;
1313
import org.springframework.transaction.annotation.Transactional;
1414
import org.woehlke.simpleworklist.oodm.entities.UserAccount;
15-
import org.woehlke.simpleworklist.model.beans.LoginForm;
15+
import org.woehlke.simpleworklist.user.login.LoginForm;
1616
import org.woehlke.simpleworklist.model.beans.UserChangePasswordForm;
1717
import org.woehlke.simpleworklist.oodm.repository.UserAccountRepository;
1818

Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
1-
package org.woehlke.simpleworklist.model.beans;
2-
3-
import javax.validation.constraints.NotNull;
4-
5-
import javax.validation.constraints.Email;
6-
import javax.validation.constraints.NotBlank;
7-
import org.hibernate.validator.constraints.SafeHtml;
8-
9-
import java.io.Serializable;
10-
11-
public class LoginForm implements Serializable {
12-
13-
private static final long serialVersionUID = 5936886560348238355L;
14-
15-
//TODO: Messages i18n
16-
@NotNull(message = "Email Address is compulsory")
17-
@NotBlank(message = "Email Address is compulsory")
18-
@Email(message = "Email Address is not a valid format")
19-
private String userEmail;
20-
21-
//TODO: Messages i18n
22-
@SafeHtml(whitelistType= SafeHtml.WhiteListType.NONE)
23-
@NotNull(message = "Password is compulsory")
24-
@NotBlank(message = "Password is compulsory")
25-
private String userPassword;
26-
27-
public String getUserEmail() {
28-
return userEmail;
29-
}
30-
31-
public void setUserEmail(String userEmail) {
32-
this.userEmail = userEmail;
33-
}
34-
35-
public String getUserPassword() {
36-
return userPassword;
37-
}
38-
39-
public void setUserPassword(String userPassword) {
40-
this.userPassword = userPassword;
41-
}
42-
43-
@Override
44-
public int hashCode() {
45-
final int prime = 31;
46-
int result = 1;
47-
result = prime * result
48-
+ ((userEmail == null) ? 0 : userEmail.hashCode());
49-
result = prime * result
50-
+ ((userPassword == null) ? 0 : userPassword.hashCode());
51-
return result;
52-
}
53-
54-
@Override
55-
public boolean equals(Object obj) {
56-
if (this == obj)
57-
return true;
58-
if (obj == null)
59-
return false;
60-
if (getClass() != obj.getClass())
61-
return false;
62-
LoginForm other = (LoginForm) obj;
63-
if (userEmail == null) {
64-
if (other.userEmail != null)
65-
return false;
66-
} else if (!userEmail.equals(other.userEmail))
67-
return false;
68-
if (userPassword == null) {
69-
if (other.userPassword != null)
70-
return false;
71-
} else if (!userPassword.equals(other.userPassword))
72-
return false;
73-
return true;
74-
}
75-
76-
}
1+
package org.woehlke.simpleworklist.user.login;
2+
3+
import javax.validation.constraints.NotNull;
4+
5+
import javax.validation.constraints.Email;
6+
import javax.validation.constraints.NotBlank;
7+
import org.hibernate.validator.constraints.SafeHtml;
8+
9+
import java.io.Serializable;
10+
11+
public class LoginForm implements Serializable {
12+
13+
private static final long serialVersionUID = 5936886560348238355L;
14+
15+
//TODO: Messages i18n
16+
@NotNull(message = "Email Address is compulsory")
17+
@NotBlank(message = "Email Address is compulsory")
18+
@Email(message = "Email Address is not a valid format")
19+
private String userEmail;
20+
21+
//TODO: Messages i18n
22+
@SafeHtml(whitelistType= SafeHtml.WhiteListType.NONE)
23+
@NotNull(message = "Password is compulsory")
24+
@NotBlank(message = "Password is compulsory")
25+
private String userPassword;
26+
27+
public String getUserEmail() {
28+
return userEmail;
29+
}
30+
31+
public void setUserEmail(String userEmail) {
32+
this.userEmail = userEmail;
33+
}
34+
35+
public String getUserPassword() {
36+
return userPassword;
37+
}
38+
39+
public void setUserPassword(String userPassword) {
40+
this.userPassword = userPassword;
41+
}
42+
43+
@Override
44+
public int hashCode() {
45+
final int prime = 31;
46+
int result = 1;
47+
result = prime * result
48+
+ ((userEmail == null) ? 0 : userEmail.hashCode());
49+
result = prime * result
50+
+ ((userPassword == null) ? 0 : userPassword.hashCode());
51+
return result;
52+
}
53+
54+
@Override
55+
public boolean equals(Object obj) {
56+
if (this == obj)
57+
return true;
58+
if (obj == null)
59+
return false;
60+
if (getClass() != obj.getClass())
61+
return false;
62+
LoginForm other = (LoginForm) obj;
63+
if (userEmail == null) {
64+
if (other.userEmail != null)
65+
return false;
66+
} else if (!userEmail.equals(other.userEmail))
67+
return false;
68+
if (userPassword == null) {
69+
if (other.userPassword != null)
70+
return false;
71+
} else if (!userPassword.equals(other.userPassword))
72+
return false;
73+
return true;
74+
}
75+
76+
}

src/main/java/org/woehlke/simpleworklist/user/login/UserLoginController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import org.springframework.web.bind.annotation.RequestMapping;
1818
import org.springframework.web.bind.annotation.RequestMethod;
1919
import org.springframework.web.bind.support.SessionStatus;
20-
import org.woehlke.simpleworklist.model.beans.LoginForm;
2120
import org.woehlke.simpleworklist.oodm.entities.UserAccount;
2221
import org.woehlke.simpleworklist.user.UserAccountAccessService;
2322

src/test/java/org/woehlke/simpleworklist/model/services/impl/UserAccountServiceImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import org.woehlke.simpleworklist.AbstractTest;
1414
import org.woehlke.simpleworklist.oodm.services.UserPasswordRecoveryService;
1515
import org.woehlke.simpleworklist.oodm.services.UserRegistrationService;
16-
import org.woehlke.simpleworklist.model.beans.LoginForm;
16+
import org.woehlke.simpleworklist.user.login.LoginForm;
1717
import org.woehlke.simpleworklist.model.beans.UserAccountForm;
1818
import org.woehlke.simpleworklist.oodm.entities.UserAccount;
1919

0 commit comments

Comments
 (0)