]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Rewrite continued:
authorRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:28 +0000 (23:43 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:28 +0000 (23:43 +0200)
- Now all project-specific abstract web beans (controllers) inherit from BaseFacesBean to have these nice showFacesMessage() methods.
- Also all project-specific abstract EJBs inherit now only BaseDataBean (one was missing in an old project)
- So, if you have a WAR project, inherit from BaseFacesBean, if you have an EJB project, inherit from BaseDatabaseBean

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/BaseFinancialsController.java
src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/user/email_address/FinancialsEmailChangeWebSessionBean.java

index 6ecb7e3ee65d4723723015f08d495e141e60475b..13d77f5a2b9b9e8a0c8c7337fcf8293af5c5c510 100644 (file)
  */
 package org.mxchange.jfinancials.beans;
 
-import java.io.Serializable;
-import org.mxchange.jcoreee.bean.BaseBean;
-import org.mxchange.jusercore.model.user.UserUtils;
+import java.util.Locale;
+import java.util.ResourceBundle;
+import org.mxchange.jcoreee.bean.faces.BaseFacesBean;
 
 /**
  * A general controller
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
-public abstract class BaseFinancialsController extends BaseBean implements Serializable {
+public abstract class BaseFinancialsController extends BaseFacesBean {
 
        /**
         * Serial number
@@ -38,28 +38,13 @@ public abstract class BaseFinancialsController extends BaseBean implements Seria
        protected BaseFinancialsController () {
        }
 
-       /**
-        * Checks if given password is to weak to be used
-        * <p>
-        * @param password Clear-text password
-        * <p>
-        * @return Whether the entered password is to weak
-        */
-       protected boolean isWeakPassword (final String password) {
-               // Is parameter set?
-               if (null == password) {
-                       // Throw NPE
-                       throw new NullPointerException("password is null"); //NOI18N
-               }
-
-               // Get score value
-               double passwordScore = UserUtils.calculatePasswordScore(password);
-
-               // Is the score within range?
-               boolean isWeak = (passwordScore <= this.getIntegerContextParameter("min_user_password_score")); //NOI18N
+       @Override
+       protected ResourceBundle loadResourceBundle (final Locale locale) {
+               // Load resource bundle
+               ResourceBundle bundle = ResourceBundle.getBundle("org.mxchange.localization.bundle", locale);
 
                // Return it
-               return isWeak;
+               return bundle;
        }
 
 }
index 5ee4988532a849ee376083a9d226e2c26c18fd88..f536a8c7be661f9290f8f6038ab1826e8ac2ded6 100644 (file)
@@ -34,9 +34,9 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
+import org.mxchange.jcontacts.contact.ContactUtils;
 import org.mxchange.jcontacts.contact.UserContact;
 import org.mxchange.jcontacts.contact.title.PersonalTitle;
-import org.mxchange.jcontacts.contact.ContactUtils;
 import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
 import org.mxchange.jcontactsbusiness.exceptions.BusinessContactNotFoundException;
index baf1885c2fb517ddbe2d2efe1c0fb85879306c24..5b6125dd3e576b72b2f8eb59cde7213ef80c49f4 100644 (file)
@@ -35,8 +35,8 @@ import org.mxchange.jfinancials.beans.login.user.FinancialsUserLoginWebSessionCo
 import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.model.email_address.ChangeableEmailAddress;
 import org.mxchange.jusercore.model.email_address.EmailAddressChange;
-import org.mxchange.jusercore.model.user.email_address.UserEmailChangeSessionBeanRemote;
 import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.email_address.UserEmailChangeSessionBeanRemote;
 
 /**
  * A web session-scoped bean for changing email addresses