]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Rewrite continued:
authorRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:34 +0000 (23:43 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 26 Jun 2017 21:43:34 +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/pizzaapplication/beans/BasePizzaController.java
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaCustomerWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/resendlink/PizzaResendLinkWebSessionBean.java

index 08c63e25734d83cf249651f7bde4b63c603588c9..a8efc2c9178ffe3a3b943e1ed7e154aec01b184f 100644 (file)
  */
 package org.mxchange.pizzaapplication.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 BasePizzaController extends BaseBean implements Serializable {
+public abstract class BasePizzaController extends BaseFacesBean {
 
        /**
         * Serial number
@@ -38,28 +38,13 @@ public abstract class BasePizzaController extends BaseBean implements Serializab
        protected BasePizzaController () {
        }
 
-       /**
-        * 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 b1923b55c0bec773dbb60b9f88f83c1efeb6b488..7512bd4e5a39c9a57f121327ce50c3413b9d8b5d 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.jcontacts.exceptions.ContactNotFoundException;
index 127c44f6748876766f96aa248b170dfc735dffea..58b7560249127f05e2ac079f7bac7c2d8ccf2efc 100644 (file)
@@ -339,7 +339,7 @@ public class PizzaContactPhoneWebSessionBean extends BasePizzaController impleme
         * Clears this bean
         */
        private void clear () {
-               // Clear all data
+               // @TODO Clear all data
        }
 
 }
index 69a6f35dda1752419654645e7b9837f80b2853e9..3cf3633d6bc98d8c60b25e5ca830fcade309b6a8 100644 (file)
@@ -32,12 +32,12 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
+import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
+import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent;
 import org.mxchange.jcustomercore.model.customer.Customer;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaAdminContactWebRequestController;
 import org.mxchange.pizzaapplication.model.customer.PizzaAdminCustomerSessionBeanRemote;
-import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
-import org.mxchange.jcustomercore.events.customer.added.ObservableAdminAddedCustomerEvent;
 
 /**
  * A customer bean which hides the customer instance
index 620fd9239fe389f08266201ee18633cb9e22ad35..0f247b71f6999ac89197743feceec250c717df9a 100644 (file)
@@ -32,8 +32,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;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.login.user.PizzaUserLoginWebSessionController;
index d21076b208268d9ceed1707aa2c5a98646c1109d..7538e39844f93c49da59a8219b61fdd6a11181df 100644 (file)
@@ -33,8 +33,8 @@ import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
-import org.mxchange.jusercore.model.user.resendlink.ResendLinkSessionBeanRemote;
 import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.resendlink.ResendLinkSessionBeanRemote;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController;