litesoft
Diff Revisions
949
vs
950
for /trunk/Java/GWT/Server/src/org/litesoft/security/SecurityUserViewPoServerVoDataProvider.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.orsup.*; |
11 |
10 |
|
import org.litesoft.orsup.base.*; |
|
@@ -18,7 +17,7 @@ |
18 |
17 |
|
public abstract class SecurityUserViewPoServerVoDataProvider<VO extends SecurityUserView<VO>, PO extends SecurityUser<PO>, |
19 |
18 |
|
RRPO extends SecurityRestrictedResource<RRPO>> |
20 |
19 |
|
extends PoServerVoDataProvider<VO> { |
21 |
|
- |
private String mDefaultUserLoginEmail = Strings.noEmpty( System.getProperty( "User" ) ); |
|
20 |
+ |
private String mDefaultUserLoginEmail = ConstrainTo.significantOrNull( System.getProperty( "User" ) ); |
22 |
21 |
|
|
23 |
22 |
|
protected String getDefaultUserLoginEmail() { |
24 |
23 |
|
String zInitialUserEmail = mDefaultUserLoginEmail; |
|
@@ -51,8 +50,8 @@ |
51 |
50 |
|
public SCresult changePassword( SecurityUserView pUserView ) { |
52 |
51 |
|
String zLogonEmail = pUserView.getLogonEmail(); |
53 |
52 |
|
String zCurrentPassword = pUserView.getCurrentPassword(); |
54 |
|
- |
String zNewPassword = Strings.noEmpty( pUserView.getNewPassword() ); |
55 |
|
- |
String zConfirmPassword = Strings.noEmpty( pUserView.getConfirmPassword() ); |
|
53 |
+ |
String zNewPassword = ConstrainTo.significantOrNull( pUserView.getNewPassword() ); |
|
54 |
+ |
String zConfirmPassword = ConstrainTo.significantOrNull( pUserView.getConfirmPassword() ); |
56 |
55 |
|
|
57 |
56 |
|
String zError = cursoryPasswordCheck( zCurrentPassword, SecurityUserViewNames.aCurrentPassword ); |
58 |
57 |
|
if ( null == zError ) { |
|
@@ -147,7 +146,7 @@ |
147 |
146 |
|
initializeRealDB(); |
148 |
147 |
|
} else { |
149 |
148 |
|
initializeDemoDB(); |
150 |
|
- |
Objects.assertNotNull( "Demo User Refreshed", pUser = getUserByEmailFromCurrentDS( pUser.getLogonEmail() ) ); |
|
149 |
+ |
Confirm.isNotNull( "Demo User Refreshed", pUser = getUserByEmailFromCurrentDS( pUser.getLogonEmail() ) ); |
151 |
150 |
|
} |
152 |
151 |
|
return finiUserLogin( pUser ); |
153 |
152 |
|
} |
|
@@ -204,7 +203,7 @@ |
204 |
203 |
|
} |
205 |
204 |
|
|
206 |
205 |
|
private boolean isUserDemo( SecurityUser<PO> pUser ) { |
207 |
|
- |
return ((pUser != null) && mSetOfDemoUserEmails.contains( Strings.deNull( pUser.getLogonEmail() ).toLowerCase() )); |
|
206 |
+ |
return ((pUser != null) && mSetOfDemoUserEmails.contains( ConstrainTo.notNull( pUser.getLogonEmail() ).toLowerCase() )); |
208 |
207 |
|
} |
209 |
208 |
|
|
210 |
209 |
|
private int findCurrentDemoIndex( SecurityUserView pUser ) { |