From: Roland Häder Date: Sun, 22 Jan 2023 05:51:00 +0000 (+0100) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e77a12bee81f7f8fb33387e85cc983ec89c0ce2f;p=addressbook-war.git Please cherry-pick: - jcoree.jar has changed, so showFacesException() is now the new name as this method shows a message from a thrown exception --- diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebRequestBean.java index e7aca702..88ed5603 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebRequestBean.java @@ -347,7 +347,7 @@ public class AddressbookContactWebRequestBean extends BaseAddressbookBean implem throw new FacesException("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()), FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_login_change_personal:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()), FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N } diff --git a/src/java/org/mxchange/addressbook/beans/contact/mobile/AddressbookAdminContactMobileWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/mobile/AddressbookAdminContactMobileWebRequestBean.java index c4b5af81..db79d3df 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/mobile/AddressbookAdminContactMobileWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/mobile/AddressbookAdminContactMobileWebRequestBean.java @@ -330,7 +330,7 @@ public class AddressbookAdminContactMobileWebRequestBean extends BaseAddressbook updatedContact = this.adminContactMobileBean.linkNewMobileNumberWithContact(targetContact, number); } catch (final MobileNumberAlreadyLinkedException | ContactNotFoundException ex) { // Throw again as cause - this.showFacesMessage("form_add_contact_mobile:mobileNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_add_contact_mobile:mobileNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N } @@ -466,7 +466,7 @@ public class AddressbookAdminContactMobileWebRequestBean extends BaseAddressbook updatedContact = this.adminContactMobileBean.unlinkMobileDataFromContact(this.getContact(), number); } catch (final MobileNumberNotLinkedException | ContactNotFoundException ex) { // Did not work - this.showFacesMessage("form_unlink_contact_mobile:mobileNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_unlink_contact_mobile:mobileNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N } diff --git a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java index e3a6d0c2..787909a9 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/phone/AddressbookAdminContactPhoneWebRequestBean.java @@ -27,7 +27,6 @@ import javax.faces.application.FacesMessage; import javax.inject.Inject; import javax.inject.Named; import org.mxchange.addressbook.beans.BaseAddressbookBean; -import org.mxchange.addressbook.beans.phone.AddressbookAdminPhoneWebRequestController; import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent; import org.mxchange.jcontacts.events.contact.created.ObservableCreatedContactEvent; import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent; @@ -93,12 +92,6 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookB @Any private Event adminLinkedLandLineNumberEvent; - /** - * Administrative phone controller - */ - @Inject - private AddressbookAdminPhoneWebRequestController adminPhoneController; - /** * Contact instance */ @@ -424,7 +417,7 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookB updatedContact = this.adminContactPhoneBean.linkNewFaxNumberWithContact(targetContact, number); } catch (final PhoneNumberAlreadyLinkedException | ContactNotFoundException ex) { // Throw again as cause - this.showFacesMessage("form_add_contact_fax:faxNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_add_contact_fax:faxNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N } @@ -488,7 +481,7 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookB updatedContact = this.adminContactPhoneBean.linkNewLandLineNumberWithContact(targetContact, number); } catch (final PhoneNumberAlreadyLinkedException | ContactNotFoundException ex) { // Throw again as cause - this.showFacesMessage("form_add_contact_landLine:landLineNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_add_contact_landLine:landLineNumber", ex, FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N } @@ -687,7 +680,7 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookB updatedContact = this.adminContactPhoneBean.unlinkFaxDataFromContact(this.getContact(), number); } catch (final PhoneNumberNotLinkedException | ContactNotFoundException ex) { // Did not work - this.showFacesMessage("form_unlink_contact_fax:faxNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_unlink_contact_fax:faxNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N } @@ -742,7 +735,7 @@ public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookB updatedContact = this.adminContactPhoneBean.unlinkLandLineDataFromContact(this.getContact(), number); } catch (final PhoneNumberNotLinkedException | ContactNotFoundException ex) { // Did not work - this.showFacesMessage("form_unlink_contact_landLine:landLineNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_unlink_contact_landLine:landLineNumberId", ex, FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N } diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java index ca9a4beb..34864ad2 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java @@ -110,7 +110,7 @@ public class AddressbookAdminMobileProviderWebRequestBean extends BaseAddressboo // Is the provider already created? if (this.isMobileProviderCreated(mobileProvider)) { // Then throw exception - this.showFacesMessage("form_add_mobile_provider:providerDialPrefix", new MobileProviderAlreadyAddedException(mobileProvider), FacesMessage.SEVERITY_WARN); //NOI18N + this.showFacesException("form_add_mobile_provider:providerDialPrefix", new MobileProviderAlreadyAddedException(mobileProvider), FacesMessage.SEVERITY_WARN); //NOI18N return; } diff --git a/src/java/org/mxchange/addressbook/beans/user/email_address/AddressbookEmailChangeWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/email_address/AddressbookEmailChangeWebRequestBean.java index cea25978..9499e49d 100644 --- a/src/java/org/mxchange/addressbook/beans/user/email_address/AddressbookEmailChangeWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/email_address/AddressbookEmailChangeWebRequestBean.java @@ -115,7 +115,7 @@ public class AddressbookEmailChangeWebRequestBean extends BaseAddressbookBean im return ""; //NOI18N } else if (!this.userLoginController.ifCurrentPasswordMatches()) { // Password not matching - this.showFacesMessage("form_login_user_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()), FacesMessage.SEVERITY_WARN); //NOI18N + this.showFacesException("form_login_user_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()), FacesMessage.SEVERITY_WARN); //NOI18N return ""; //NOI18N } diff --git a/src/java/org/mxchange/addressbook/beans/user/resendlink/AddressbookResendLinkWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/resendlink/AddressbookResendLinkWebRequestBean.java index 3650dcba..62c27eda 100644 --- a/src/java/org/mxchange/addressbook/beans/user/resendlink/AddressbookResendLinkWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/resendlink/AddressbookResendLinkWebRequestBean.java @@ -152,7 +152,7 @@ public class AddressbookResendLinkWebRequestBean extends BaseAddressbookBean imp return ""; //NOI18N } catch (final UserStatusLockedException | UserStatusConfirmedException ex) { // Output message, this should not happen as the confirmation key is being removed - this.showFacesMessage("form_resend_link:resendEmailAddress", ex, FacesMessage.SEVERITY_ERROR); //NOI18N + this.showFacesException("form_resend_link:resendEmailAddress", ex, FacesMessage.SEVERITY_ERROR); //NOI18N return ""; //NOI18N }