*/
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 constructor
*/
protected BasePizzaController () {
+ // 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;
}
}