Index: JLoginUser.java =================================================================== RCS file: /home/cvspublic/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLoginUser.java,v retrieving revision 1.33 diff -u -r1.33 JLoginUser.java --- JLoginUser.java 7 Apr 2003 19:46:27 -0000 1.33 +++ JLoginUser.java 20 May 2003 08:46:21 -0000 @@ -66,7 +66,6 @@ import org.apache.velocity.context.Context; import org.apache.turbine.TurbineConstants; import org.apache.turbine.modules.ActionEvent; -import org.apache.turbine.services.localization.Localization; import org.apache.turbine.services.velocity.TurbineVelocity; import org.apache.turbine.services.template.TurbineTemplate; import org.apache.turbine.util.Log; @@ -77,7 +76,6 @@ import org.apache.jetspeed.om.security.JetspeedUser; - import org.apache.jetspeed.services.rundata.JetspeedRunData; import org.apache.jetspeed.services.resources.JetspeedResources; import org.apache.jetspeed.services.JetspeedSecurity; @@ -86,6 +84,7 @@ import org.apache.jetspeed.services.security.FailedLoginException; import org.apache.jetspeed.services.security.CredentialExpiredException; import org.apache.jetspeed.services.security.AccountExpiredException; +import org.apache.jetspeed.services.customlocalization.CustomLocalization; /** This class is responsible for logging a user into the system. It is also @@ -117,9 +116,9 @@ if (user == null) { data.setScreenTemplate("LoginHelp"); - data.setMessage(Localization.getString("JLOGINUSER_PASSWORDREMINDER_INVALIDUSER")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_PASSWORDREMINDER_INVALIDUSER", rundata)); if (Log.getLogger().isDebugEnabled()) - Log.debug(Localization.getString("JLOGINUSER_PASSWORDREMINDER_INVALIDUSER")); + Log.debug(CustomLocalization.getString("JLOGINUSER_PASSWORDREMINDER_INVALIDUSER", rundata)); return; } @@ -163,13 +162,13 @@ se.send(); - data.setMessage (Localization.getString("JLOGINUSER_PASSWORDREMINDER_SENT")); + data.setMessage (CustomLocalization.getString("JLOGINUSER_PASSWORDREMINDER_SENT", rundata)); Log.info( "Password for user " + user.getUserName() + " was sent to " + user.getEmail()); - Log.info(Localization.getString("JLOGINUSER_PASSWORDREMINDER_SENT")); + Log.info(CustomLocalization.getString("JLOGINUSER_PASSWORDREMINDER_SENT", rundata)); data.setScreenTemplate("Login"); } catch ( Exception e ) { data.setScreenTemplate("LoginHelp"); - String errorTitle = Localization.getString("JLOGINUSER_PASSWORDREMINDER_ERROR") ; + String errorTitle = CustomLocalization.getString("JLOGINUSER_PASSWORDREMINDER_ERROR", rundata); String errorMessage = errorTitle + e.toString(); Log.warn( errorMessage, e ); @@ -214,7 +213,7 @@ { if ( newUserApproval ) { - data.setMessage(Localization.getString("JLOGINUSER_KEYNOTVALID")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_KEYNOTVALID", rundata)); data.setScreenTemplate("NewUserAwaitingAcceptance"); return; } @@ -222,13 +221,13 @@ { if ( user.getConfirmed().equals(JetspeedResources.CONFIRM_VALUE_REJECTED)) { - data.setMessage(Localization.getString("JLOGINUSER_KEYNOTVALID")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_KEYNOTVALID", rundata)); data.setScreenTemplate("NewUserRejected"); return; } else { - data.setMessage(Localization.getString("JLOGINUSER_KEYNOTVALID")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_KEYNOTVALID", rundata)); data.setScreenTemplate("ConfirmRegistration"); return; } @@ -236,7 +235,7 @@ } user.setConfirmed( JetspeedResources.CONFIRM_VALUE ); - data.setMessage (Localization.getString("JLOGINUSER_WELCOME")); + data.setMessage (CustomLocalization.getString("JLOGINUSER_WELCOME", rundata)); } JetspeedUser user = null; @@ -256,7 +255,7 @@ if (e instanceof FailedLoginException) { Log.info("JLoginUser: Credential Failure on login for user: " + username); - data.setMessage(Localization.getString("PASSWORDFORM_FAILED_MSG")); + data.setMessage(CustomLocalization.getString("PASSWORDFORM_FAILED_MSG", rundata)); } else if (e instanceof AccountExpiredException) { @@ -268,7 +267,7 @@ data.setScreenTemplate( JetspeedResources.getString(JetspeedResources.CHANGE_PASSWORD_TEMPLATE, "ChangePassword") ); - data.setMessage(Localization.getString("PASSWORDFORM_EXPIRED_MSG")); + data.setMessage(CustomLocalization.getString("PASSWORDFORM_EXPIRED_MSG", rundata)); data.getParameters().setString("username", username); } @@ -277,7 +276,7 @@ if (user.getDisabled()) { - data.setMessage(Localization.getString("JLOGINUSER_ACCOUNT_DISABLED")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_ACCOUNT_DISABLED", rundata)); data.setScreenTemplate(JetspeedResources.getString("logon.disabled.form")); data.getUser().setHasLoggedIn(new Boolean (false) ); return; @@ -298,14 +297,14 @@ { if (confirmed != null && confirmed.equals(JetspeedResources.CONFIRM_VALUE_REJECTED)) { - data.setMessage(Localization.getString("JLOGINUSER_KEYNOTVALID")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_KEYNOTVALID", rundata)); data.setScreenTemplate("NewUserRejected"); data.getUser().setHasLoggedIn(new Boolean (false) ); return; } else { - data.setMessage(Localization.getString("JLOGINUSER_CONFIRMFIRST")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_CONFIRMFIRST", rundata)); data.setScreenTemplate("ConfirmRegistration"); data.getUser().setHasLoggedIn(new Boolean (false) ); return; @@ -381,7 +380,7 @@ boolean disabled = JetspeedSecurity.checkDisableAccount(data.getParameters().getString("username", "")); if (disabled) { - data.setMessage(Localization.getString("JLOGINUSER_ACCOUNT_DISABLED")); + data.setMessage(CustomLocalization.getString("JLOGINUSER_ACCOUNT_DISABLED", rundata)); data.setScreenTemplate(JetspeedResources.getString("logon.disabled.form")); data.getUser().setHasLoggedIn(new Boolean (false) ); }