]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued with i18n: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Fri, 12 Aug 2016 08:43:16 +0000 (10:43 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 19 Aug 2016 21:05:10 +0000 (23:05 +0200)
- now these messages from managed beans can be localized

Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
src/java/de/chotime/landingpage/beans/phone/JobsPhoneWebApplicationBean.java [new file with mode: 0644]
src/java/de/chotime/landingpage/beans/phone/JobsPhoneWebApplicationController.java [new file with mode: 0644]
src/java/de/chotime/landingpage/beans/phone/LandingPhoneWebApplicationBean.java [deleted file]
src/java/de/chotime/landingpage/beans/phone/LandingPhoneWebApplicationController.java [deleted file]
src/java/org/mxchange/jjobs/beans/BaseJobsController.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/email_address/JobsEmailChangeWebSessionBean.java
src/java/org/mxchange/jjobs/beans/login/JobsUserLoginWebSessionBean.java
src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/resendlink/JobsResendLinkWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/password/JobsUserPasswordWebRequestBean.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl
web/WEB-INF/templates/login/user/user_enter_current_password.tpl

diff --git a/src/java/de/chotime/landingpage/beans/phone/JobsPhoneWebApplicationBean.java b/src/java/de/chotime/landingpage/beans/phone/JobsPhoneWebApplicationBean.java
new file mode 100644 (file)
index 0000000..148f855
--- /dev/null
@@ -0,0 +1,349 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.chotime.landingpage.beans.phone;
+
+import java.text.MessageFormat;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
+import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
+import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
+import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
+
+/**
+ * Regular controller (bean) for phone numbers
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("phoneController")
+@ApplicationScoped
+public class JobsPhoneWebApplicationBean extends BaseJobsController implements JobsPhoneWebApplicationController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 491_058_674_675_690_105L;
+
+       /**
+        * All cell phone numbers
+        */
+       private final List<DialableCellphoneNumber> cellphoneNumbers;
+
+       /**
+        * All fax numbers
+        */
+       private final List<DialableFaxNumber> faxNumbers;
+
+       /**
+        * All land-line numbers
+        */
+       private final List<DialableLandLineNumber> landLineNumbers;
+
+       /**
+        * General EJB for phone numbers
+        */
+       private PhoneSessionBeanRemote phoneBean;
+
+       /**
+        * Default constructor
+        */
+       public JobsPhoneWebApplicationBean () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup the beans
+                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw it again
+                       throw new FaceletException(e);
+               }
+
+               // Init all lists
+               this.cellphoneNumbers = new LinkedList<>();
+               this.faxNumbers = new LinkedList<>();
+               this.landLineNumbers = new LinkedList<>();
+       }
+
+       @Override
+       public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) {
+               // The event must be valid
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getAddedContact() == null) {
+                       // Throw again ...
+                       throw new NullPointerException("event.addedContact is null"); //NOI18N
+               } else if (event.getAddedContact().getContactId() == null) {
+                       // ... and again
+                       throw new NullPointerException("event.addedContact.contactId is null"); //NOI18N
+               } else if (event.getAddedContact().getContactId() < 1) {
+                       // Not valid
+                       throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N //NOI18N
+               }
+
+               // Update contact's cellphone, land-line and fax number
+               this.updateContactPhoneNumbers(event.getAddedContact());
+
+               // Clear this bean
+               this.clear();
+       }
+
+       @Override
+       public void afterAdminAddedUserEvent (@Observes final AdminAddedUserEvent event) {
+               // event should not be null
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getAddedUser() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("event.addedUser is null"); //NOI18N
+               } else if (event.getAddedUser().getUserId() == null) {
+                       // userId is null
+                       throw new NullPointerException("event.addedUser.userId is null"); //NOI18N
+               } else if (event.getAddedUser().getUserId() < 1) {
+                       // Not avalid id
+                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getAddedUser(), event.getAddedUser().getUserId())); //NOI18N
+               }
+
+               // Update contact's cellphone, land-line and fax number
+               this.updateContactPhoneNumbers(event.getAddedUser().getUserContact());
+
+               // Clear all data
+               this.clear();
+       }
+
+       @Override
+       public void afterAdminUpdatedContactDataEvent (@Observes final AdminUpdatedContactEvent event) {
+               // event should not be null
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getUpdatedContact() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("event.updatedContact is null"); //NOI18N
+               } else if (event.getUpdatedContact().getContactId() == null) {
+                       // userId is null
+                       throw new NullPointerException("event.updatedContact.contactId is null"); //NOI18N
+               } else if (event.getUpdatedContact().getContactId() < 1) {
+                       // Not avalid id
+                       throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
+               }
+
+               // Update contact's cellphone, land-line and fax number
+               this.updateContactPhoneNumbers(event.getUpdatedContact());
+
+               // Clear all data
+               this.clear();
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<DialableCellphoneNumber> allCellphoneNumbers () {
+               return this.cellphoneNumbers;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<DialableFaxNumber> allFaxNumbers () {
+               return this.faxNumbers;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<DialableLandLineNumber> allLandLineNumbers () {
+               return this.landLineNumbers;
+       }
+
+       /**
+        * Post-construction method
+        */
+       @PostConstruct
+       public void init () {
+               // All phone numbers
+               this.cellphoneNumbers.addAll(this.phoneBean.allCellphoneNumbers());
+               this.faxNumbers.addAll(this.phoneBean.allFaxNumbers());
+               this.landLineNumbers.addAll(this.phoneBean.allLandLineNumbers());
+       }
+
+       /**
+        * Clears this bean
+        */
+       private void clear () {
+               // Clear all data
+       }
+
+       /**
+        * Uniquely add given cellphone number to this bean's list. First remove the
+        * old instance (by id number), then re-add it again.
+        * <p>
+        * @param cellphoneNumber Cellphone number to add
+        */
+       private void uniqueAddCellphoneNumber (final DialableCellphoneNumber cellphoneNumber) {
+               // Make sure the parameter is valid
+               if (null == cellphoneNumber) {
+                       // Throw NPE
+                       throw new NullPointerException("cellphoneNumber is null");
+               } else if (cellphoneNumber.getPhoneId() == null) {
+                       // Throw again ...
+                       throw new NullPointerException("cellphoneNumber.phoneId is null");
+               } else if (cellphoneNumber.getPhoneId() < 1) {
+                       // Not valid
+                       throw new IllegalArgumentException(MessageFormat.format("cellphoneNumber.phoneId={0} is not valid.", cellphoneNumber.getPhoneId()));
+               }
+
+               // First remove it by object
+               if (!this.cellphoneNumbers.remove(cellphoneNumber)) {
+                       // Did not work, try by id number
+                       for (final DialableCellphoneNumber cell : this.cellphoneNumbers) {
+                               // Is id number the same?
+                               if (Objects.equals(cell.getPhoneId(), cellphoneNumber.getPhoneId())) {
+                                       // Found it
+                                       this.cellphoneNumbers.remove(cell);
+                                       break;
+                               }
+                       }
+               }
+
+               // ... then add it
+               this.cellphoneNumbers.add(cellphoneNumber);
+       }
+
+       /**
+        * Uniquely add given fax number to this bean's list. First remove the old
+        * instance (by id number), then re-add it again.
+        * <p>
+        * @param faxNumber number to add
+        */
+       private void uniqueAddFaxNumber (final DialableFaxNumber faxNumber) {
+               // Make sure the parameter is valid
+               if (null == faxNumber) {
+                       // Throw NPE
+                       throw new NullPointerException("faxNumber is null");
+               } else if (faxNumber.getPhoneId() == null) {
+                       // Throw again ...
+                       throw new NullPointerException("faxNumber.phoneId is null");
+               } else if (faxNumber.getPhoneId() < 1) {
+                       // Not valid
+                       throw new IllegalArgumentException(MessageFormat.format("faxNumber.phoneId={0} is not valid.", faxNumber.getPhoneId()));
+               }
+
+               // First remove it
+               if (!this.faxNumbers.remove(faxNumber)) {
+                       // Did not work, try by id number
+                       for (final DialableFaxNumber fax : this.faxNumbers) {
+                               // Is id number the same?
+                               if (Objects.equals(fax.getPhoneId(), faxNumber.getPhoneId())) {
+                                       // Found it
+                                       this.faxNumbers.remove(fax);
+                                       break;
+                               }
+                       }
+               }
+
+               // ... then add it
+               this.faxNumbers.add(faxNumber);
+       }
+
+       /**
+        * Uniquely add given land-line number to this bean's list. First remove the
+        * old instance (by id number), then re-add it again.
+        * <p>
+        * @param landLineNumber Land-line number to add
+        */
+       private void uniqueAddLandLineNumber (final DialableLandLineNumber landLineNumber) {
+               // Make sure the parameter is valid
+               if (null == landLineNumber) {
+                       // Throw NPE
+                       throw new NullPointerException("landLineNumber is null");
+               } else if (landLineNumber.getPhoneId() == null) {
+                       // Throw again ...
+                       throw new NullPointerException("landLineNumber.phoneId is null");
+               } else if (landLineNumber.getPhoneId() < 1) {
+                       // Not valid
+                       throw new IllegalArgumentException(MessageFormat.format("landLineNumber.phoneId={0} is not valid.", landLineNumber.getPhoneId()));
+               }
+
+               // First remove it
+               if (!this.landLineNumbers.remove(landLineNumber)) {
+                       // Did not work, try by id number
+                       for (final DialableLandLineNumber landLine : this.landLineNumbers) {
+                               // Is id number the same?
+                               if (Objects.equals(landLine.getPhoneId(), landLineNumber.getPhoneId())) {
+                                       // Found it
+                                       this.landLineNumbers.remove(landLine);
+                                       break;
+                               }
+                       }
+               }
+
+               // ... then add it
+               this.landLineNumbers.add(landLineNumber);
+       }
+
+       /**
+        * Updates given contact's cellphone, land-line and fax number
+        * <p>
+        * @param contact Contact instance
+        */
+       private void updateContactPhoneNumbers (final Contact contact) {
+               // Parameter must be valid
+               if (null == contact) {
+                       // Throw NPE
+                       throw new NullPointerException("contact is null");
+               } else if (contact.getContactId() == null) {
+                       // Throw again
+                       throw new NullPointerException("contact.contactId is null");
+               } else if (contact.getContactId() < 1) {
+                       // Id number is not valid
+               }
+
+               // Is cellphone set?
+               if (contact.getContactCellphoneNumber() instanceof DialableCellphoneNumber) {
+                       // Unique-add it
+                       this.uniqueAddCellphoneNumber(contact.getContactCellphoneNumber());
+               }
+
+               // Is land-line set?
+               if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
+                       // Unique-add it
+                       this.uniqueAddLandLineNumber(contact.getContactLandLineNumber());
+               }
+
+               // Is fax set?
+               if (contact.getContactFaxNumber() instanceof DialableFaxNumber) {
+                       // Unique-add it
+                       this.uniqueAddFaxNumber(contact.getContactFaxNumber());
+               }
+       }
+
+}
diff --git a/src/java/de/chotime/landingpage/beans/phone/JobsPhoneWebApplicationController.java b/src/java/de/chotime/landingpage/beans/phone/JobsPhoneWebApplicationController.java
new file mode 100644 (file)
index 0000000..c99b942
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.chotime.landingpage.beans.phone;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Local;
+import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
+import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
+
+/**
+ * An interface for a request web controller (bean) for administrative phone
+ * number purposes.
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Local
+public interface JobsPhoneWebApplicationController extends Serializable {
+
+       /**
+        * Event observer for newly added users by administrator
+        * <p>
+        * @param event Event being fired
+        */
+       void afterAdminAddedUserEvent (final AdminAddedUserEvent event);
+
+       /**
+        * Observes events being fired when an administrator has added a new
+        * contact.
+        * <p>
+        * @param event Event being fired
+        */
+       void afterAdminAddedContact (final AdminAddedContactEvent event);
+
+       /**
+        * Event observer for updated contact data by administrators
+        * <p>
+        * @param event Updated contact data event
+        */
+       void afterAdminUpdatedContactDataEvent (final AdminUpdatedContactEvent event);
+
+       /**
+        * Returns a list of all cellphone numbers. For performance reasons, the
+        * controller (bean) should be application-scoped as from user to user
+        * nothing changes. And the controller's post-construct method should load
+        * all numbers and cache it in the controller.
+        * <p>
+        * @return List of all cell phone numbers
+        */
+       List<DialableCellphoneNumber> allCellphoneNumbers ();
+
+       /**
+        * Returns a list of all fax numbers. For performance reasons, the
+        * controller (bean) should be application-scoped as from user to user
+        * nothing changes. And the controller's post-construct method should load
+        * all numbers and cache it in the controller.
+        * <p>
+        * @return List of all fax numbers
+        */
+       List<DialableFaxNumber> allFaxNumbers ();
+
+       /**
+        * Returns a list of all land-line numbers. For performance reasons, the
+        * controller (bean) should be application-scoped as from user to user
+        * nothing changes. And the controller's post-construct method should load
+        * all numbers and cache it in the controller.
+        * <p>
+        * @return List of all land-line numbers
+        */
+       List<DialableLandLineNumber> allLandLineNumbers ();
+
+}
diff --git a/src/java/de/chotime/landingpage/beans/phone/LandingPhoneWebApplicationBean.java b/src/java/de/chotime/landingpage/beans/phone/LandingPhoneWebApplicationBean.java
deleted file mode 100644 (file)
index d881bdb..0000000
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * Copyright (C) 2016 Cho-Time GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.chotime.landingpage.beans.phone;
-
-import de.chotime.landingpage.beans.BaseLandingController;
-import java.text.MessageFormat;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Objects;
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.faces.view.facelets.FaceletException;
-import javax.inject.Named;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
-import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote;
-import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
-
-/**
- * Regular controller (bean) for phone numbers
- * <p>
- * @author Roland Haeder<rhaeder@cho-time.de>
- */
-@Named ("phoneController")
-@ApplicationScoped
-public class LandingPhoneWebApplicationBean extends BaseLandingController implements LandingPhoneWebApplicationController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 491_058_674_675_690_105L;
-
-       /**
-        * All cell phone numbers
-        */
-       private final List<DialableCellphoneNumber> cellphoneNumbers;
-
-       /**
-        * All fax numbers
-        */
-       private final List<DialableFaxNumber> faxNumbers;
-
-       /**
-        * All land-line numbers
-        */
-       private final List<DialableLandLineNumber> landLineNumbers;
-
-       /**
-        * General EJB for phone numbers
-        */
-       private PhoneSessionBeanRemote phoneBean;
-
-       /**
-        * Default constructor
-        */
-       public LandingPhoneWebApplicationBean () {
-               // Try it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Try to lookup the beans
-                       this.phoneBean = (PhoneSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/phone!org.mxchange.jphone.phonenumbers.phone.PhoneSessionBeanRemote"); //NOI18N
-               } catch (final NamingException e) {
-                       // Throw it again
-                       throw new FaceletException(e);
-               }
-
-               // Init all lists
-               this.cellphoneNumbers = new LinkedList<>();
-               this.faxNumbers = new LinkedList<>();
-               this.landLineNumbers = new LinkedList<>();
-       }
-
-       @Override
-       public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) {
-               // The event must be valid
-               if (null == event) {
-                       // Throw NPE
-                       throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getAddedContact() == null) {
-                       // Throw again ...
-                       throw new NullPointerException("event.addedContact is null"); //NOI18N
-               } else if (event.getAddedContact().getContactId() == null) {
-                       // ... and again
-                       throw new NullPointerException("event.addedContact.contactId is null"); //NOI18N
-               } else if (event.getAddedContact().getContactId() < 1) {
-                       // Not valid
-                       throw new IllegalArgumentException(MessageFormat.format("event.addedContact.contactId={0} is not valid", event.getAddedContact().getContactId())); //NOI18N //NOI18N
-               }
-
-               // Update contact's cellphone, land-line and fax number
-               this.updateContactPhoneNumbers(event.getAddedContact());
-
-               // Clear this bean
-               this.clear();
-       }
-
-       @Override
-       public void afterAdminAddedUserEvent (@Observes final AdminAddedUserEvent event) {
-               // event should not be null
-               if (null == event) {
-                       // Throw NPE
-                       throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getAddedUser() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("event.addedUser is null"); //NOI18N
-               } else if (event.getAddedUser().getUserId() == null) {
-                       // userId is null
-                       throw new NullPointerException("event.addedUser.userId is null"); //NOI18N
-               } else if (event.getAddedUser().getUserId() < 1) {
-                       // Not avalid id
-                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getAddedUser(), event.getAddedUser().getUserId())); //NOI18N
-               }
-
-               // Update contact's cellphone, land-line and fax number
-               this.updateContactPhoneNumbers(event.getAddedUser().getUserContact());
-
-               // Clear all data
-               this.clear();
-       }
-
-       @Override
-       public void afterAdminUpdatedContactDataEvent (@Observes final AdminUpdatedContactEvent event) {
-               // event should not be null
-               if (null == event) {
-                       // Throw NPE
-                       throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getUpdatedContact() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("event.updatedContact is null"); //NOI18N
-               } else if (event.getUpdatedContact().getContactId() == null) {
-                       // userId is null
-                       throw new NullPointerException("event.updatedContact.contactId is null"); //NOI18N
-               } else if (event.getUpdatedContact().getContactId() < 1) {
-                       // Not avalid id
-                       throw new IllegalArgumentException(MessageFormat.format("contactId of contact={0} is not valid: {1}", event.getUpdatedContact(), event.getUpdatedContact().getContactId())); //NOI18N
-               }
-
-               // Update contact's cellphone, land-line and fax number
-               this.updateContactPhoneNumbers(event.getUpdatedContact());
-
-               // Clear all data
-               this.clear();
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<DialableCellphoneNumber> allCellphoneNumbers () {
-               return this.cellphoneNumbers;
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<DialableFaxNumber> allFaxNumbers () {
-               return this.faxNumbers;
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<DialableLandLineNumber> allLandLineNumbers () {
-               return this.landLineNumbers;
-       }
-
-       /**
-        * Post-construction method
-        */
-       @PostConstruct
-       public void init () {
-               // All phone numbers
-               this.cellphoneNumbers.addAll(this.phoneBean.allCellphoneNumbers());
-               this.faxNumbers.addAll(this.phoneBean.allFaxNumbers());
-               this.landLineNumbers.addAll(this.phoneBean.allLandLineNumbers());
-       }
-
-       /**
-        * Clears this bean
-        */
-       private void clear () {
-               // Clear all data
-       }
-
-       /**
-        * Uniquely add given cellphone number to this bean's list. First remove the
-        * old instance (by id number), then re-add it again.
-        * <p>
-        * @param cellphoneNumber Cellphone number to add
-        */
-       private void uniqueAddCellphoneNumber (final DialableCellphoneNumber cellphoneNumber) {
-               // Make sure the parameter is valid
-               if (null == cellphoneNumber) {
-                       // Throw NPE
-                       throw new NullPointerException("cellphoneNumber is null");
-               } else if (cellphoneNumber.getPhoneId() == null) {
-                       // Throw again ...
-                       throw new NullPointerException("cellphoneNumber.phoneId is null");
-               } else if (cellphoneNumber.getPhoneId() < 1) {
-                       // Not valid
-                       throw new IllegalArgumentException(MessageFormat.format("cellphoneNumber.phoneId={0} is not valid.", cellphoneNumber.getPhoneId()));
-               }
-
-               // First remove it by object
-               if (!this.cellphoneNumbers.remove(cellphoneNumber)) {
-                       // Did not work, try by id number
-                       for (final DialableCellphoneNumber cell : this.cellphoneNumbers) {
-                               // Is id number the same?
-                               if (Objects.equals(cell.getPhoneId(), cellphoneNumber.getPhoneId())) {
-                                       // Found it
-                                       this.cellphoneNumbers.remove(cell);
-                                       break;
-                               }
-                       }
-               }
-
-               // ... then add it
-               this.cellphoneNumbers.add(cellphoneNumber);
-       }
-
-       /**
-        * Uniquely add given fax number to this bean's list. First remove the old
-        * instance (by id number), then re-add it again.
-        * <p>
-        * @param faxNumber number to add
-        */
-       private void uniqueAddFaxNumber (final DialableFaxNumber faxNumber) {
-               // Make sure the parameter is valid
-               if (null == faxNumber) {
-                       // Throw NPE
-                       throw new NullPointerException("faxNumber is null");
-               } else if (faxNumber.getPhoneId() == null) {
-                       // Throw again ...
-                       throw new NullPointerException("faxNumber.phoneId is null");
-               } else if (faxNumber.getPhoneId() < 1) {
-                       // Not valid
-                       throw new IllegalArgumentException(MessageFormat.format("faxNumber.phoneId={0} is not valid.", faxNumber.getPhoneId()));
-               }
-
-               // First remove it
-               if (!this.faxNumbers.remove(faxNumber)) {
-                       // Did not work, try by id number
-                       for (final DialableFaxNumber fax : this.faxNumbers) {
-                               // Is id number the same?
-                               if (Objects.equals(fax.getPhoneId(), faxNumber.getPhoneId())) {
-                                       // Found it
-                                       this.faxNumbers.remove(fax);
-                                       break;
-                               }
-                       }
-               }
-
-               // ... then add it
-               this.faxNumbers.add(faxNumber);
-       }
-
-       /**
-        * Uniquely add given land-line number to this bean's list. First remove the
-        * old instance (by id number), then re-add it again.
-        * <p>
-        * @param landLineNumber Land-line number to add
-        */
-       private void uniqueAddLandLineNumber (final DialableLandLineNumber landLineNumber) {
-               // Make sure the parameter is valid
-               if (null == landLineNumber) {
-                       // Throw NPE
-                       throw new NullPointerException("landLineNumber is null");
-               } else if (landLineNumber.getPhoneId() == null) {
-                       // Throw again ...
-                       throw new NullPointerException("landLineNumber.phoneId is null");
-               } else if (landLineNumber.getPhoneId() < 1) {
-                       // Not valid
-                       throw new IllegalArgumentException(MessageFormat.format("landLineNumber.phoneId={0} is not valid.", landLineNumber.getPhoneId()));
-               }
-
-               // First remove it
-               if (!this.landLineNumbers.remove(landLineNumber)) {
-                       // Did not work, try by id number
-                       for (final DialableLandLineNumber landLine : this.landLineNumbers) {
-                               // Is id number the same?
-                               if (Objects.equals(landLine.getPhoneId(), landLineNumber.getPhoneId())) {
-                                       // Found it
-                                       this.landLineNumbers.remove(landLine);
-                                       break;
-                               }
-                       }
-               }
-
-               // ... then add it
-               this.landLineNumbers.add(landLineNumber);
-       }
-
-       /**
-        * Updates given contact's cellphone, land-line and fax number
-        * <p>
-        * @param contact Contact instance
-        */
-       private void updateContactPhoneNumbers (final Contact contact) {
-               // Parameter must be valid
-               if (null == contact) {
-                       // Throw NPE
-                       throw new NullPointerException("contact is null");
-               } else if (contact.getContactId() == null) {
-                       // Throw again
-                       throw new NullPointerException("contact.contactId is null");
-               } else if (contact.getContactId() < 1) {
-                       // Id number is not valid
-               }
-
-               // Is cellphone set?
-               if (contact.getContactCellphoneNumber() instanceof DialableCellphoneNumber) {
-                       // Unique-add it
-                       this.uniqueAddCellphoneNumber(contact.getContactCellphoneNumber());
-               }
-
-               // Is land-line set?
-               if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
-                       // Unique-add it
-                       this.uniqueAddLandLineNumber(contact.getContactLandLineNumber());
-               }
-
-               // Is fax set?
-               if (contact.getContactFaxNumber() instanceof DialableFaxNumber) {
-                       // Unique-add it
-                       this.uniqueAddFaxNumber(contact.getContactFaxNumber());
-               }
-       }
-
-}
diff --git a/src/java/de/chotime/landingpage/beans/phone/LandingPhoneWebApplicationController.java b/src/java/de/chotime/landingpage/beans/phone/LandingPhoneWebApplicationController.java
deleted file mode 100644 (file)
index d835888..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2016 Cho-Time GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.chotime.landingpage.beans.phone;
-
-import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Local;
-import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
-import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
-
-/**
- * An interface for a request web controller (bean) for administrative phone
- * number purposes.
- * <p>
- * @author Roland Haeder<rhaeder@cho-time.de>
- */
-@Local
-public interface LandingPhoneWebApplicationController extends Serializable {
-
-       /**
-        * Event observer for newly added users by adminstrator
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedUserEvent (final AdminAddedUserEvent event);
-
-       /**
-        * Observes events being fired when an administrator has added a new
-        * contact.
-        * <p>
-        * @param event Event being fired
-        */
-       void afterAdminAddedContact (final AdminAddedContactEvent event);
-
-       /**
-        * Event observer for updated contact data by administrators
-        * <p>
-        * @param event Updated contact data event
-        */
-       void afterAdminUpdatedContactDataEvent (final AdminUpdatedContactEvent event);
-
-       /**
-        * Returns a list of all cellphone numbers. For performance reasons, the
-        * controller (bean) should be application-scoped as from user to user
-        * nothing changes. And the controller's post-construct method should load
-        * all numbers and cache it in the controller.
-        * <p>
-        * @return List of all cell phone numbers
-        */
-       List<DialableCellphoneNumber> allCellphoneNumbers ();
-
-       /**
-        * Returns a list of all fax numbers. For performance reasons, the
-        * controller (bean) should be application-scoped as from user to user
-        * nothing changes. And the controller's post-construct method should load
-        * all numbers and cache it in the controller.
-        * <p>
-        * @return List of all fax numbers
-        */
-       List<DialableFaxNumber> allFaxNumbers ();
-
-       /**
-        * Returns a list of all land-line numbers. For performance reasons, the
-        * controller (bean) should be application-scoped as from user to user
-        * nothing changes. And the controller's post-construct method should load
-        * all numbers and cache it in the controller.
-        * <p>
-        * @return List of all land-line numbers
-        */
-       List<DialableLandLineNumber> allLandLineNumbers ();
-
-}
index 2a4a4ebb4077a8ea5ade5c19ec5ab17eb2163276..adc9ec6b0c6dc74d19362301a17cad7e2e3a2cf1 100644 (file)
@@ -18,6 +18,9 @@ package org.mxchange.jjobs.beans;
 
 import java.io.Serializable;
 import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 import javax.faces.application.FacesMessage;
 import javax.faces.context.FacesContext;
 
@@ -117,14 +120,38 @@ public abstract class BaseJobsController implements Serializable {
        }
 
        /**
-        * Shows a faces message with given message.
+        * Shows a faces message with given message (i18n) key.
         * <p>
         * @param clientId Client id to send message to
-        * @param message  Causing exception
+        * @param i18nKey  Message key
         */
-       protected void showFacesMessage (final String clientId, final String message) {
+       protected void showFacesMessage (final String clientId, final String i18nKey) {
+               // Get faces context
+               FacesContext context = FacesContext.getCurrentInstance();
+
+               // Get bundle name
+               String messageBundleName = context.getApplication().getMessageBundle();
+
+               // Get locale
+               Locale locale = context.getViewRoot().getLocale();
+
+               // Init bundle variable
+               ResourceBundle bundle;
+
+               try {
+                       // Get bundle
+                       bundle = ResourceBundle.getBundle(messageBundleName, locale);
+               } catch (final MissingResourceException ex) {
+                       // Call other method
+                       this.showFacesMessage(clientId, ex);
+                       return;
+               }
+
+               // Get message
+               String message = bundle.getString(i18nKey);
+
                // Get context and add message
-               FacesContext.getCurrentInstance().addMessage(clientId, new FacesMessage(message));
+               context.addMessage(clientId, new FacesMessage(message));
        }
 
 }
index b774c37d0ea40b28fcea66b242ac627b1a8a6b54..c3807eda577036c37d2435b10e6d1a932f2eaf8a 100644 (file)
@@ -56,7 +56,6 @@ import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
 import org.mxchange.jusercore.events.user.linked.AdminLinkedUserEvent;
-import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -539,7 +538,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                        throw new FaceletException("Not all required fields are set."); //NOI18N
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       this.showFacesMessage("form_login_change_personal:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
+                       this.showFacesMessage("form_login_change_personal:currentPassword", "ERROR_USER_CURRENT_PASSWORD_MISMATCHING"); //NOI18N
                        return ""; //NOI18N
                }
 
index e69d52ae3ccfa5ec0d76e2225a73eb8be9746996..7fd0d3e867232d601e4906674ebc023b9f00c125 100644 (file)
@@ -31,7 +31,6 @@ import org.mxchange.jcoreee.utils.FacesUtils;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
-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.email_address.EmailChangeSessionBeanRemote;
@@ -117,7 +116,7 @@ public class JobsEmailChangeWebSessionBean extends BaseJobsController implements
                        throw new FaceletException("Email address 1/2 are mismatching."); //NOI18N
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       this.showFacesMessage("form_login_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
+                       this.showFacesMessage("form_login_change_email_address:currentPassword", "ERROR_USER_CURRENT_PASSWORD_MISMATCHING"); //NOI18N
                        return ""; //NOI18N
                } else if (!this.featureController.isFeatureEnabled("edit_user_data")) { //NOI18N
                        // Editing is not allowed
index 9bf9bb7cc6da0513b64e2f1b0c20bce23367a4b9..0f28b52667ad0017a34509e4cb86a9fd0ad53d2a 100644 (file)
@@ -229,13 +229,19 @@ public class JobsUserLoginWebSessionBean extends BaseJobsController implements J
 
                        // All fine
                        return "login"; //NOI18N
-               } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException ex) {
+               } catch (final UserNotFoundException ex) {
                        // Show JSF message
-                       this.showFacesMessage("form_user_login:userName", ex); //NOI18N
+                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_NOT_FOUND"); //NOI18N
+                       return ""; //NOI18N
+               } catch (final UserStatusLockedException ex) {
+                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_STATUS_LOCKED"); //NOI18N
+                       return ""; //NOI18N
+               } catch (final UserStatusUnconfirmedException ex) {
+                       this.showFacesMessage("form_user_login:userName", "ERROR_USER_STATUS_UNCONFIRMED"); //NOI18N
                        return ""; //NOI18N
                } catch (final UserPasswordMismatchException ex) {
                        // Show JSF message
-                       this.showFacesMessage("form_user_login:userPassword", ex); //NOI18N
+                       this.showFacesMessage("form_user_login:userPassword", "ERROR_USER_PASSWORD_MISMATCH"); //NOI18N
                        return ""; //NOI18N
                }
        }
index 326835962f33b495420dfc8a365da664cf962caf..c89479b853df44070cd05a157d72b0b691407dca 100644 (file)
@@ -114,7 +114,7 @@ public class JobsAdminMobileProviderWebRequestBean extends BaseJobsController im
                // Is the provider already created?
                if (this.isMobileProviderCreated(mobileProvider)) {
                        // Then throw exception
-                       this.showFacesMessage("form_add_mobile_provider:providerDialPrefix", new MobileProviderAlreadyAddedException(mobileProvider)); //NOI18N
+                       this.showFacesMessage("form_add_mobile_provider:providerDialPrefix", "ERROR_ADMIN_MOBILE_PROVIDER_ALREADY_ADDED"); //NOI18N
                        return ""; //NOI18N
                }
 
index 1b1ae2407d18d0074792113215504e75c9bdf032..1249feabab9a98594eb4d7fca6a0f829475b1ca1 100644 (file)
@@ -171,7 +171,7 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                        throw new NullPointerException(MessageFormat.format("this.beanHelper.cellphoneNumber.phoneNumber={0} is not valid.", this.beanHelper.getCellPhoneNumber().getPhoneNumber())); //NOI18N
                } else if (this.getCellphoneProvider() == null) {
                        // Not provided
-                       this.showFacesMessage("form_edit_cellphone:cellphoneProvider", "No mobile provider selected"); //NOI18N
+                       this.showFacesMessage("form_edit_cellphone:cellphoneProvider", "ERROR_ADMIN_NO_MOBILE_PROVIDER_SELECTED"); //NOI18N
                        return ""; //NOI18N
                } else if (this.getCellphoneProvider().getProviderId() == null) {
                        // Throw NPE again ...
@@ -181,7 +181,7 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsController implements
                        throw new IllegalArgumentException(MessageFormat.format("this.cellphoneProvider.providerId={0} is not valid.", this.getCellphoneProvider().getProviderId())); //NOI18N
                } else if (this.getPhoneNumber() == null) {
                        // Not provided
-                       this.showFacesMessage("form_edit_cellphone:cellphoneNumber", "No cell phone number selected"); //NOI18N
+                       this.showFacesMessage("form_edit_cellphone:cellphoneNumber", "ERROR_ADMIN_EMPTY_MOBILE_NUMBER"); //NOI18N
                        return ""; //NOI18N
                }
 
index 43073468bd88a5834a797890d8c6c9dc613c99f2..90a725d1294f07d76c8e76e4abe1584c3ef5ce62 100644 (file)
@@ -29,8 +29,6 @@ import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.localization.JobsLocalizationSessionController;
 import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
 import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
-import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
-import org.mxchange.jusercore.exceptions.UserStatusLockedException;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 
@@ -115,14 +113,14 @@ public class JobsResendLinkWebSessionBean extends BaseJobsController implements
                        this.clear();
 
                        // Then abort here
-                       this.showFacesMessage("form_resend_link:resendEmailAddress", new UserStatusConfirmedException(user)); //NOI18N
+                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_STATUS_ALREADY_CONFIRMED"); //NOI18N
                        return ""; //NOI18N
                } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
                        // Always clear bean
                        this.clear();
 
                        // User account is locked
-                       this.showFacesMessage("form_resend_link:resendEmailAddress", new UserStatusLockedException(user)); //NOI18N
+                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_STATUS_LOCKED"); //NOI18N
                        return ""; //NOI18N
                } else if (user.getUserConfirmKey() == null) {
                        // Status is UNCONFIRMED but confirmation key is NULL
index e9dc864679d3589797f9be1f91e6ce5d8702bf53..ae3eafc453b6104e946af3df8b703fc7256b322a 100644 (file)
@@ -127,7 +127,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsController implement
                        throw new IllegalStateException("User tried to change password."); //NOI18N
                } else if (!UserUtils.ifPasswordMatches(this.getUserCurrentPassword(), this.userLoginController.getLoggedInUser())) {
                        // Password mismatches
-                       this.showFacesMessage("form_user_change_password:userCurrentPassword", "Entered current password does not matched stored password."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userCurrentPassword", "ERROR_USER_CURRENT_PASSWORD_MISMATCHING"); //NOI18N
 
                        // Clear bean
                        this.clear();
@@ -136,7 +136,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsController implement
                        return ""; //NOI18N
                } else if (!Objects.equals(this.getUserPassword(), this.getUserPasswordRepeat())) {
                        // Both entered passwords don't match
-                       this.showFacesMessage("form_user_change_password:userPasswordRepeat", "Entered new passwords mismatch."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userPasswordRepeat", "ERROR_USER_NEW_PASSWORDS_MISMATCH"); //NOI18N
 
                        // Clear bean
                        this.clear();
@@ -145,7 +145,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsController implement
                        return ""; //NOI18N
                } else if (Objects.equals(this.getUserCurrentPassword(), this.getUserPassword())) {
                        // New password matches current
-                       this.showFacesMessage("form_user_change_password:userPassword", "Entered new password is same as current password."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userPassword", "ERROR_USER_NEW_PASSWORD_SAME_AS_CURRENT"); //NOI18N
 
                        // Clear bean
                        this.clear();
@@ -154,7 +154,7 @@ public class JobsUserPasswordWebRequestBean extends BaseJobsController implement
                        return ""; //NOI18N
                } else if (this.userLoginController.isPasswordInHistory(this.getUserPassword())) {
                        // Is already in list (to old passwords are ignored)
-                       this.showFacesMessage("form_user_change_password:userPassword", "Entered new password is has already been used some time ago."); //NOI18N
+                       this.showFacesMessage("form_user_change_password:userPassword", "ERROR_USER_NEW_PASSWORD_ALREADY_ENTERED"); //NOI18N
 
                        // Clear bean
                        this.clear();
index 17e8ad9cc3525f619f69db7dddc9128e9a5fdede..2f7f09f9b9830b34a95b848a7e2f74a24b3a1581 100644 (file)
@@ -203,7 +203,7 @@ LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND_TITLE=Bitte geben Sie ihr derze
 LOGIN_ENTER_CURRENT_PASSWORD_CONFIRM=Derzeitiges Passwort:
 BUTTON_CHANGE_PERSONAL_DATA=Pers\u00f6nliche Daten \u00e4ndern
 LOGIN_CHANGE_PERSONAL_DATA_TITLE=Pers\u00f6nliche Daten \u00e4ndern:
-ERROR_CURRENT_PASSWORD_MISMATCHING=Ihr eingegebenes Passwort entspricht nicht dem aktuell gespeicherten Passwort.
+ERROR_USER_CURRENT_PASSWORD_MISMATCHING=Fehler: Ihr eingegebenes Passwort entspricht nicht dem aktuell gespeicherten Passwort.
 MESSAGE_BOX_TITLE=Hinweis:
 MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY=Fehler: Parameter "message" nicht gesetzt.
 LOGIN_MESSAGE_DATA_SAVED=Daten wurden gespeichert.
@@ -626,3 +626,14 @@ BUTTON_ADMIN_UNLINK_CONTACT_CELLPHONE=Mobilfunknummer vom Kontakt abtrennen
 ADMIN_LOCK_USER_TITLE=Wollen Sie diesen Benutzer wirklich sperren?
 ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNLOCKED=Kann den Benutzer {0} ({1}) nicht entsperren, da er bereits entsperrt ist.
 ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_LOCKED=Kann den Benutzer {0} ({1}) nicht sperren, da er bereits gesperrt ist.
+ERROR_ADMIN_MOBILE_PROVIDER_ALREADY_ADDED=Fehler: Mobilfunkanbieter existiert bereits
+ERROR_ADMIN_NO_MOBILE_PROVIDER_SELECTED=Fehler: Kein Mobilfunkanbieter ausgew\u00e4hlt.
+ERROR_ADMIN_EMPTY_MOBILE_NUMBER=Fehler: Keine Mobilfunknummer eingegeben.
+ERROR_USER_STATUS_ALREADY_CONFIRMED=Sie haben bereits Ihren Benutzeraccount best\u00e4tigt und k\u00f6nnen diesen ab sofort benutzen.
+ERROR_USER_STATUS_LOCKED=Ihr Benutzeraccount wurde gesperrt. Bitte melden Sie sich beim Webmaster.
+ERROR_USER_NEW_PASSWORDS_MISMATCH=Ihre eingebenen Passw\u00f6rter (Wiederholung) stimmen nicht \u00fcberein.
+ERROR_USER_NEW_PASSWORD_SAME_AS_CURRENT=Das eingegebene neue Passwort muss sich von Ihrem aktuellen Passwort unterscheiden.
+ERROR_USER_NEW_PASSWORD_ALREADY_ENTERED=Sie hatten vor kurzem das Passwort bereits eingegeben.
+ERROR_USER_NOT_FOUND=Benutzeraccount nicht gefunden.
+ERROR_USER_STATUS_UNCONFIRMED=Sie haben noch nicht Ihren Benutzeraccount best\u00e4tigt.
+ERROR_USER_PASSWORD_MISMATCH=Ihr eingegebenes Passwort ist falsch.
index 8adbf5c6a0a820db3d11d11296a105d62d55efdd..6723b59b4d012c9de4afcc4c49108abeb57fd64e 100644 (file)
@@ -205,7 +205,7 @@ LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND_TITLE=Please enter your current
 LOGIN_ENTER_CURRENT_PASSWORD_CONFIRM=Current password:
 BUTTON_CHANGE_PERSONAL_DATA=Change personal data
 LOGIN_CHANGE_PERSONAL_DATA_TITLE=Change personal data:
-ERROR_CURRENT_PASSWORD_MISMATCHING=Your entered password doesn't match the currently stored one.
+ERROR_USER_CURRENT_PASSWORD_MISMATCHING=Error: Your entered password doesn't match the currently stored one.
 MESSAGE_BOX_TITLE=Notice:
 MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY=Error: Parameter "message" not set.
 LOGIN_MESSAGE_DATA_SAVED=Data has been saved.
@@ -626,3 +626,14 @@ BUTTON_ADMIN_UNLINK_CONTACT_CELLPHONE=Unlink cell phone number from contact
 ADMIN_LOCK_USER_TITLE=Do You really want to lock this user?
 ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNLOCKED=Cannot unlock user {0} ({1}) because he is already unlocked.
 ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_LOCKED=Cannot lock user {0} ({1}) because he is already locked.
+ERROR_ADMIN_MOBILE_PROVIDER_ALREADY_ADDED=Error: Mobile provider does already exist.
+ERROR_ADMIN_NO_MOBILE_PROVIDER_SELECTED=Error: No mobile provider selected.
+ERROR_ADMIN_EMPTY_MOBILE_NUMBER=Error: No mobile phone number provided.
+ERROR_USER_STATUS_ALREADY_CONFIRMED=You have already confirmed your user account and use it right away.
+ERROR_USER_STATUS_LOCKED=Your user account has been locked. Please contact the webmaster.
+ERROR_USER_NEW_PASSWORDS_MISMATCH=Your entered passwords (repeated) does not match.
+ERROR_USER_NEW_PASSWORD_SAME_AS_CURRENT=Your entered password must be different to your current password.
+ERROR_USER_NEW_PASSWORD_ALREADY_ENTERED=You have already entered this password some time ago.
+ERROR_USER_NOT_FOUND=User account not found.
+ERROR_USER_STATUS_UNCONFIRMED=You have not yet confirmed your user account.
+ERROR_USER_PASSWORD_MISMATCH=You have entered a wrong password.
index 357f9157dd26d9f4b25d3c8737f701818e0816c1..7a2df7556bfb57bfcef1ff0a8b6e44b2c1820120 100644 (file)
@@ -7,12 +7,12 @@
        >
 
        <div class="table_row">
-               <div class="table_left">
+               <div class="table_left_medium">
                        <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL}" />
                </div>
 
-               <div class="table_right">
-                       <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{contactController.emailAddress}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_NOT_ENTERED}">
+               <div class="table_right_medium">
+                       <h:inputText styleClass="input" id="emailAddress" size="30" maxlength="255" value="#{contactController.emailAddress}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_NOT_ENTERED}">
                                <f:validator validatorId="EmailAddressValidator" />
                        </h:inputText>
                </div>
        </div>
 
        <div class="table_row">
-               <div class="table_left">
+               <div class="table_left_medium">
                        <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL_REPEAT}" />
                </div>
 
-               <div class="table_right">
-                       <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_REPEAT_NOT_ENTERED}" />
+               <div class="table_right_medium">
+                       <h:inputText styleClass="input" id="emailAddressRepeat" size="30" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" requiredMessage="#{msg.EMAIL_ADDRESS_REPEAT_NOT_ENTERED}" />
                </div>
 
                <div class="clear"></div>
index 5fe1205556b05e1674a69cd566940950e803491d..5d499c2ab380d0ad50c9c6fc3d32014bc42a906f 100644 (file)
@@ -17,9 +17,8 @@
                                </div>
 
                                <div class="table_right">
-                                       <h:inputSecret styleClass="input" id="currentPassword" size="10" maxlength="255" value="#{userLoginController.currentPassword}" required="true" validatorMessage="#{msg.ERROR_CURRENT_PASSWORD_MISMATCHING}">
-                                               <h:message for="currentPassword" styleClass="errors" />
-                                               <!-- <f:validator for="currentPassword" validatorId="UserPasswordValidator" /> //-->
+                                       <h:inputSecret styleClass="input" id="currentPassword" size="10" maxlength="255" value="#{userLoginController.currentPassword}" required="true" validatorMessage="#{msg.ERROR_USER_CURRENT_PASSWORD_MISMATCHING}">
+                                               <!-- <f:validator for="currentPassword" validatorId="RecruiterUserPasswordValidator" /> //-->
                                        </h:inputSecret>
                                </div>