Subversion Repository Public Repository

litesoft

Diff Revisions 948 vs 950 for /trunk/Java/DATT/src/org/litesoft/datt/server/pos/User.java

Diff revisions: vs.
  @@ -1,9 +1,9 @@
1 1 package org.litesoft.datt.server.pos;
2 2
3 3 import org.litesoft.codec.*;
4 + import org.litesoft.commonfoundation.base.*;
4 5 import org.litesoft.commonfoundation.exceptions.*;
5 6 import org.litesoft.commonfoundation.typeutils.*;
6 - import org.litesoft.commonfoundation.typeutils.Objects;
7 7 import org.litesoft.core.simpletypes.*;
8 8 import org.litesoft.core.util.*;
9 9 import org.litesoft.datt.client.support.*;
  @@ -60,7 +60,7 @@
60 60
61 61 @Override
62 62 public String getFullName() {
63 - return ((Strings.deNull( getFirstName() ) + " " + Strings.deNull( getMiddleInitial() )).trim() + " " + Strings.deNull( getLastName() )).trim();
63 + return ((ConstrainTo.notNull( getFirstName() ) + " " + ConstrainTo.notNull( getMiddleInitial() )).trim() + " " + ConstrainTo.notNull( getLastName() )).trim();
64 64 }
65 65
66 66 @Override
  @@ -128,7 +128,7 @@
128 128 }
129 129
130 130 public UserRestrictedResourcePair loginToRestrictedResourceIfAcceptable( RestrictedResource pRestrictedResource ) {
131 - Objects.assertNotNull( "RestrictedResource", pRestrictedResource );
131 + Confirm.isNotNull( "RestrictedResource", pRestrictedResource );
132 132 Object o = attemptRestrictedResourceLink( pRestrictedResource );
133 133 if ( o instanceof UserRestrictedResourcePair ) {
134 134 return (UserRestrictedResourcePair) o;
  @@ -187,7 +187,7 @@
187 187 public String acceptablePassword( String pPassword ) {
188 188 if ( !isDemo() ) {
189 189 if ( pPassword.length() < 8 ) {
190 - String zCurrentPassword = Strings.noEmpty( getPassword() );
190 + String zCurrentPassword = ConstrainTo.significantOrNull( getPassword() );
191 191 if ( (zCurrentPassword == null) || (pPassword.length() < zCurrentPassword.length()) ) {
192 192 return "Unacceptable New Password - Too Short";
193 193 }
  @@ -197,7 +197,7 @@
197 197 }
198 198
199 199 public boolean validatePassword( String pPassword ) {
200 - return isDemo() || Strings.deNull( pPassword ).trim().equals( getPassword() );
200 + return isDemo() || ConstrainTo.notNull( pPassword ).trim().equals( getPassword() );
201 201 }
202 202
203 203 public RestrictedResource[] getAlternateRestrictedResourceOptions( RestrictedResource pRestrictedResource ) {