*/
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
* 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;
}
}
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;
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;
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