]> git.mxchange.org Git - addressbook-war.git/commitdiff
Rewrite continued:
authorRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:31 +0000 (23:43 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:31 +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/addressbook/beans/BaseAddressbookController.java
src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java
src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java
src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java
src/java/org/mxchange/addressbook/beans/user/email_address/AddressbookEmailChangeWebSessionBean.java

index 709014428ea85aa5406e5dd8e6d78c6636e2ff6e..9707462ddeb239cc84fc6325f1a3129bccf85d2f 100644 (file)
  */
 package org.mxchange.addressbook.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 BaseAddressbookController extends BaseBean implements Serializable {
+public abstract class BaseAddressbookController extends BaseFacesBean {
 
        /**
         * Serial number
@@ -36,30 +36,17 @@ public abstract class BaseAddressbookController extends BaseBean implements Seri
         * Protected constructor
         */
        protected BaseAddressbookController () {
+               // Call super constructor
+               super();
        }
 
-       /**
-        * 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 3d95cba496e64fbb46e51081b93a9046ef1ac61c..873ff7a8b01fe3a2c543c84972aea7f65e8a3981 100644 (file)
@@ -35,9 +35,9 @@ import org.mxchange.addressbook.beans.helper.AddressbookWebRequestHelperControll
 import org.mxchange.jcontacts.contact.AdminContactSessionBeanRemote;
 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.AdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
index b23b6d1760c820273ea27765b767f51d9c78f967..954840459b5cc94a26523cafe39bf81f7d10b2e8 100644 (file)
@@ -37,9 +37,9 @@ import org.mxchange.addressbook.beans.login.user.AddressbookUserLoginWebSessionC
 import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
 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.jcontacts.exceptions.ContactNotFoundException;
index a650688e3114f05324ec27cf3f7580e1df45f20a..76f8d90478d9825c507b30dddae2f948913483ab 100644 (file)
@@ -581,7 +581,7 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookC
         * Clears this bean
         */
        private void clear () {
-               // Clear all data
+               // @TODO Clear all data
        }
 
 }
index ca732f4b3da96d28b740c43d30dc2009af29e8b9..af3dca3df92232b731c71c4f5aa1600a1e765d42 100644 (file)
@@ -35,8 +35,8 @@ import org.mxchange.jcoreee.utils.FacesUtils;
 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