- 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>
*/
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
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;
}
}
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;
* Clears this bean
*/
private void clear () {
- // Clear all data
+ // @TODO Clear all data
}
}
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
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;
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;