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=14576883733d5c2b9a1deb98698d52a5df99f7a3;p=jjobs-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/jjobs/beans/contact/JobsContactWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestBean.java index 833e3cae..930e3d09 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestBean.java @@ -347,7 +347,7 @@ public class JobsContactWebRequestBean extends BaseJobsBean implements JobsConta 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/jjobs/beans/contact/mobile/JobsAdminContactMobileWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/contact/mobile/JobsAdminContactMobileWebRequestBean.java index a82512b2..2022839b 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/mobile/JobsAdminContactMobileWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/mobile/JobsAdminContactMobileWebRequestBean.java @@ -330,7 +330,7 @@ public class JobsAdminContactMobileWebRequestBean extends BaseJobsBean implement 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 JobsAdminContactMobileWebRequestBean extends BaseJobsBean implement 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/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java index 23a1b1c1..08845db4 100644 --- a/src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/contact/phone/JobsAdminContactPhoneWebRequestBean.java @@ -43,7 +43,6 @@ import org.mxchange.jcontacts.model.contact.Contact; import org.mxchange.jcontacts.model.phone.AdminContactsPhoneSessionBeanRemote; import org.mxchange.jcountry.model.data.Country; import org.mxchange.jjobs.beans.BaseJobsBean; -import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController; import org.mxchange.jphone.events.fax.created.ObservableCreatedFaxNumberEvent; import org.mxchange.jphone.events.landline.created.ObservableCreatedLandLineNumberEvent; import org.mxchange.jphone.exceptions.phone.PhoneNumberAlreadyLinkedException; @@ -93,12 +92,6 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements @Any private Event adminLinkedLandLineNumberEvent; - /** - * Administrative phone controller - */ - @Inject - private JobsAdminPhoneWebRequestController adminPhoneController; - /** * Contact instance */ @@ -424,7 +417,7 @@ public class JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements 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 JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements 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 JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements 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 JobsAdminContactPhoneWebRequestBean extends BaseJobsBean implements 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/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java index 3ede39cb..353a7a6a 100644 --- a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java @@ -110,7 +110,7 @@ public class JobsAdminMobileProviderWebRequestBean extends BaseJobsBean implemen // 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/jjobs/beans/user/email_address/JobsEmailChangeWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/email_address/JobsEmailChangeWebRequestBean.java index de2aacea..6dca57bd 100644 --- a/src/java/org/mxchange/jjobs/beans/user/email_address/JobsEmailChangeWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/email_address/JobsEmailChangeWebRequestBean.java @@ -115,7 +115,7 @@ public class JobsEmailChangeWebRequestBean extends BaseJobsBean implements JobsE 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/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java index 40c1247d..bcaec1b5 100644 --- a/src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java @@ -152,7 +152,7 @@ public class JobsResendLinkWebRequestBean extends BaseJobsBean implements JobsRe 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 }