litesoft
Diff Revisions
949
vs
950
for /trunk/GWT_Sandbox/InitFrom/src/org/litesoft/initfrom/server/boviews/podataproviders/UserViewPoServerVoDataProvider.java
|
@@ -3,9 +3,8 @@ |
3 |
3 |
|
import org.litesoft.bo.views.*; |
4 |
4 |
|
import org.litesoft.bo.views.communication.*; |
5 |
5 |
|
import org.litesoft.bo.views.server.*; |
|
6 |
+ |
import org.litesoft.commonfoundation.base.*; |
6 |
7 |
|
import org.litesoft.commonfoundation.exceptions.*; |
7 |
|
- |
import org.litesoft.commonfoundation.typeutils.Objects; |
8 |
|
- |
import org.litesoft.commonfoundation.typeutils.*; |
9 |
8 |
|
import org.litesoft.core.*; |
10 |
9 |
|
import org.litesoft.initfrom.client.boviews.*; |
11 |
10 |
|
import org.litesoft.initfrom.server.*; |
|
@@ -20,7 +19,7 @@ |
20 |
19 |
|
import java.util.*; |
21 |
20 |
|
|
22 |
21 |
|
public class UserViewPoServerVoDataProvider extends PoServerVoDataProvider<UserView> implements UserViewNames { |
23 |
|
- |
private String mDefaultUserLoginEmail = Strings.noEmpty( System.getProperty( "User" ) ); |
|
22 |
+ |
private String mDefaultUserLoginEmail = ConstrainTo.significantOrNull( System.getProperty( "User" ) ); |
24 |
23 |
|
|
25 |
24 |
|
private String getDefaultUserLoginEmail() { |
26 |
25 |
|
String zInitialUserEmail = mDefaultUserLoginEmail; |
|
@@ -54,8 +53,8 @@ |
54 |
53 |
|
public SCresult changePassword( UserView pUserView ) { |
55 |
54 |
|
String zLogonEmail = pUserView.getLogonEmail(); |
56 |
55 |
|
String zCurrentPassword = pUserView.getCurrentPassword(); |
57 |
|
- |
String zNewPassword = Strings.noEmpty( pUserView.getNewPassword() ); |
58 |
|
- |
String zConfirmPassword = Strings.noEmpty( pUserView.getConfirmPassword() ); |
|
56 |
+ |
String zNewPassword = ConstrainTo.significantOrNull( pUserView.getNewPassword() ); |
|
57 |
+ |
String zConfirmPassword = ConstrainTo.significantOrNull( pUserView.getConfirmPassword() ); |
59 |
58 |
|
|
60 |
59 |
|
String zError = cursoryPasswordCheck( zCurrentPassword, aCurrentPassword ); |
61 |
60 |
|
if ( null == zError ) { |
|
@@ -160,7 +159,7 @@ |
160 |
159 |
|
initializeRealDB(); |
161 |
160 |
|
} else { |
162 |
161 |
|
initializeDemoDB(); |
163 |
|
- |
Objects.assertNotNull( "Demo User Refreshed", pUser = getUserByEmailFromCurrentDS( pUser.getLogonEmail() ) ); |
|
162 |
+ |
Confirm.isNotNull( "Demo User Refreshed", pUser = getUserByEmailFromCurrentDS( pUser.getLogonEmail() ) ); |
164 |
163 |
|
} |
165 |
164 |
|
return finiUserLogin( pUser ); |
166 |
165 |
|
} |
|
@@ -267,7 +266,7 @@ |
267 |
266 |
|
} |
268 |
267 |
|
|
269 |
268 |
|
private boolean isUserDemo( User pUser ) { |
270 |
|
- |
return ((pUser != null) && DEMO_USERS_EMAIL_SET.contains( Strings.deNull( pUser.getLogonEmail() ).toLowerCase() )); |
|
269 |
+ |
return ((pUser != null) && DEMO_USERS_EMAIL_SET.contains( ConstrainTo.notNull( pUser.getLogonEmail() ).toLowerCase() )); |
271 |
270 |
|
} |
272 |
271 |
|
|
273 |
272 |
|
private int findCurrentDemoIndex( UserView pUser ) { |