]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Sat, 3 Jun 2017 16:19:24 +0000 (18:19 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 3 Jun 2017 16:19:35 +0000 (18:19 +0200)
- created controller for financial (maybe will be splitted later?) + template
- remote interface for resending confirmation link is now genweric in juser-lib
- updated method as checked exceptions are thrown
- updated copyright
- updated jar(s)

Signed-off-by: Roland Häder <roland@mxchange.org>
82 files changed:
lib/jcontacts-business-core.jar
lib/jcontacts-core.jar
lib/jcontacts-lib.jar
lib/jcore-logger-lib.jar
lib/jcoreee.jar
lib/jcountry-core.jar
lib/jcountry-lib.jar
lib/jphone-core.jar
lib/jphone-lib.jar
lib/jproduct-core.jar
lib/juser-core.jar
lib/juser-lib.jar
src/java/log4j2.xml
src/java/org/mxchange/jfinancials/beans/BaseFinancialsController.java
src/java/org/mxchange/jfinancials/beans/confirmlink/FinancialsConfirmationLinkWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/confirmlink/FinancialsConfirmationLinkWebRequestController.java
src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/contact/FinancialsAdminContactWebRequestController.java
src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/contact/FinancialsContactWebSessionController.java
src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsAdminContactPhoneWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsAdminContactPhoneWebRequestController.java
src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsContactPhoneWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/contact/phone/FinancialsContactPhoneWebSessionController.java
src/java/org/mxchange/jfinancials/beans/country/FinancialsAdminCountryWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/country/FinancialsAdminCountryWebRequestController.java
src/java/org/mxchange/jfinancials/beans/country/FinancialsCountryWebApplicationBean.java
src/java/org/mxchange/jfinancials/beans/country/FinancialsCountryWebApplicationController.java
src/java/org/mxchange/jfinancials/beans/email_address/FinancialsEmailChangeWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/email_address/FinancialsEmailChangeWebSessionController.java
src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java
src/java/org/mxchange/jfinancials/beans/features/FinancialsFeaturesWebApplicationController.java
src/java/org/mxchange/jfinancials/beans/financial/FinancialsAdminFinancialWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/beans/financial/FinancialsAdminFinancialWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/beans/gender/FinancialsGenderWebApplicationBean.java
src/java/org/mxchange/jfinancials/beans/gender/FinancialsGenderWebApplicationController.java
src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperBean.java
src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperController.java
src/java/org/mxchange/jfinancials/beans/localization/FinancialsLocalizationSessionBean.java
src/java/org/mxchange/jfinancials/beans/localization/FinancialsLocalizationSessionController.java
src/java/org/mxchange/jfinancials/beans/login/user/FinancialsUserLoginWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/login/user/FinancialsUserLoginWebSessionController.java
src/java/org/mxchange/jfinancials/beans/mobileprovider/FinancialsAdminMobileProviderWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/mobileprovider/FinancialsAdminMobileProviderWebRequestController.java
src/java/org/mxchange/jfinancials/beans/mobileprovider/FinancialsMobileProviderWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/mobileprovider/FinancialsMobileProviderWebRequestController.java
src/java/org/mxchange/jfinancials/beans/phone/FinancialsAdminPhoneWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/phone/FinancialsAdminPhoneWebRequestController.java
src/java/org/mxchange/jfinancials/beans/phone/FinancialsPhoneWebApplicationBean.java
src/java/org/mxchange/jfinancials/beans/phone/FinancialsPhoneWebApplicationController.java
src/java/org/mxchange/jfinancials/beans/profile/FinancialsUserProfileWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/profile/FinancialsUserProfileWebRequestController.java
src/java/org/mxchange/jfinancials/beans/profilemode/FinancialsProfileModeWebApplicationBean.java
src/java/org/mxchange/jfinancials/beans/profilemode/FinancialsProfileModeWebApplicationController.java
src/java/org/mxchange/jfinancials/beans/register/FinancialsUserRegisterWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/register/FinancialsUserRegisterWebSessionController.java
src/java/org/mxchange/jfinancials/beans/resendlink/FinancialsResendLinkWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/resendlink/FinancialsResendLinkWebSessionController.java
src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestController.java
src/java/org/mxchange/jfinancials/beans/user/FinancialsUserWebSessionBean.java
src/java/org/mxchange/jfinancials/beans/user/FinancialsUserWebSessionController.java
src/java/org/mxchange/jfinancials/beans/user/password/FinancialsUserPasswordWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/user/password/FinancialsUserPasswordWebRequestController.java
src/java/org/mxchange/jfinancials/converter/contact/FinancialsContactConverter.java
src/java/org/mxchange/jfinancials/converter/country/FinancialsCountryConverter.java
src/java/org/mxchange/jfinancials/converter/mobile/FinancialsMobileConverter.java
src/java/org/mxchange/jfinancials/converter/mobileprovider/FinancialsMobileProviderConverter.java
src/java/org/mxchange/jfinancials/converter/user/FinancialsUserConverter.java
src/java/org/mxchange/jfinancials/validator/birthday/FinancialsBirthdayValidator.java
src/java/org/mxchange/jfinancials/validator/emailaddress/FinancialsEmailAddressValidator.java
src/java/org/mxchange/jfinancials/validator/names/FinancialsNameValidator.java
src/java/org/mxchange/jfinancials/validator/password/FinancialsUserPasswordValidator.java
src/java/org/mxchange/jfinancials/validator/phone/abroad/FinancialsAbroadDialValidator.java
src/java/org/mxchange/jfinancials/validator/phone/number/FinancialsPhoneNumberValidator.java
src/java/org/mxchange/jfinancials/validator/privacy_terms/FinancialsPrivacyTermsCheckboxValidator.java
src/java/org/mxchange/jfinancials/validator/user/FinancialsUserIdValidator.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/login/user/user_footer.tpl
web/user/financials/login_financials_add_income.xhtml [new file with mode: 0644]
web/user/financials/login_financials_overview.xhtml

index a0ca53b9d02f36e1d30269cefd780f092ac072e0..6de90379984e4536915f0abf67334246fccec75a 100644 (file)
Binary files a/lib/jcontacts-business-core.jar and b/lib/jcontacts-business-core.jar differ
index eaa2463471426757016ba6786661d4a7b471c087..54a8731c3ecc2973c6f9286a08706a16c4a442ab 100644 (file)
Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ
index 7baf796e4bd5f98534e20916a8329df0cebeaf71..a60343d14a5d410602d777851ed25dc714469436 100644 (file)
Binary files a/lib/jcontacts-lib.jar and b/lib/jcontacts-lib.jar differ
index c8046481dc6d1d52e4cec0137a3fb47448a8f795..3e757cdc2af9b522811655bbbacd2cd6dce2cba9 100644 (file)
Binary files a/lib/jcore-logger-lib.jar and b/lib/jcore-logger-lib.jar differ
index 7f47a54432a763f3d0b883e7cec8d940444c27c1..1c4dbecc0ac4e4d62ad903e93f26d31c47b8ae2e 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 5cbad453c2f8698f9ab16791a4e97baef7fa6686..e91ed0ad88c8635e2a9fccb45c289eefa8d2f943 100644 (file)
Binary files a/lib/jcountry-core.jar and b/lib/jcountry-core.jar differ
index 066e9a10de897adc8457948e4449c71d31e5329e..d3f45e10d9cdf026834a75ecb1186027469f96da 100644 (file)
Binary files a/lib/jcountry-lib.jar and b/lib/jcountry-lib.jar differ
index 9587335f2376f8ddf1f9275c0ec27c454450b266..6f596cc999fe3f3bcc5ecb56de3a09ef90910f9f 100644 (file)
Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ
index 3c22799492f7a2d81213e1003191b44d016579ff..aa0c7b7f7f079149bf1cf52e6aa554e546a71dd7 100644 (file)
Binary files a/lib/jphone-lib.jar and b/lib/jphone-lib.jar differ
index 081cf1fc5285da28641848b97101a71eb8ae1b58..58afdc537b85c6c7de127b2b27f86ec60a4ed6fd 100644 (file)
Binary files a/lib/jproduct-core.jar and b/lib/jproduct-core.jar differ
index aa8a72393fba606d8e39c915068e9ea7ca5faf74..fd411f914c67a74da6daa0cce6a4534883b0b9ca 100644 (file)
Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ
index e845d87ba2337996bcc8aef68c5b14cfb6c6e763..38a2d3739dc9a9b584d39e9fe49980aec684bac3 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index 3741761ae97430f8041162218c6ba1b02c14a39e..98e9a65f642174f1e53f38823251423cf6e9f0d3 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright (C) 2016 Roland Häder
+Copyright (C) 2016, 2017 Roland Häder
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as
index 28adbde78d70dc3c34771f7a26560d0759da37f8..c18c2ee878f733f2a1a75695e6c4227293779e5a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 35d8f270d70da9e9618198f5905d4a34bc77788b..28491ff6876565e4c5f30217ea29ff78d4180b6e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 3051e932db446b22666d91ff5e0e7c410486b159..8f50673f58b6f8081427ad1a8678305f26305972 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 3eb02b0b319f9bae7e95ed9b103dce4893799172..f6616125f1cf01b6f038945dafa72a8a95125a67 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 25c7153dd868cf5f90103cf6fbd4cfc84e8a26a8..ab80a8da674e16657cba2c25bb55fa3c0b19e78b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 66d1fbabd9d85bd5b96067feb66fc747cbb0ef0d..b7d84b406d17dcd29514a2c0729241e1abbdf101 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 35910f565d648b6ee01d71aeef0d354e15e754ae..ec63e3afe3c3a64db7c8ee6a17c4f43944aff72f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index cf05d40849f043673da400adf150834a9123e1dd..6c42dac884a74a6c45d90f8eb0ea1a78116bfc31 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 13dd2fdc205bd2a922153333966d7c28b58328b3..b31f30ce141dbecea3d1d25a87393135ff114c98 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index eddc4dc7c99201dfd8d16fcb365bcc7472f22844..e33f0ecb212bc6a13309e643f0292827e65e4c4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 3cdb8c75264b8d20e6d388c8c2c111df3c979635..65189bb653c83879f863657af6b0f29024eed54f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index f7447ff683e1ce3ef79b430233836113f942b8ac..f275a9b26b9f15ff79e62512f245eea2de1f5d89 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 3b28164a7a57ab86edd249cda6506521c761768e..cbba1f69cb4e3915f4fbef559ef0a6b38f1bd126 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index cea6d8c29ccf3268124a194ac685c609902b3e78..5511c9cdc7841e317fefc828aae42a49270e6ede 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 9605ecf7be7ad44d9b0f8341e856d4ab99934ac7..98737e0d39671a8fd8abbff3c0862d9ca6541e33 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index ded705f142b0564c246417e1605a48218dc5f420..da10877acf6fd9abc7f2de96fa30528e76152044 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index ea4bc682f6322ce719c02b60769f98f28aab4129..4c3727660917855d0256f241ceb9dad8767ae475 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 4fda84bec67a42f6e1edc5db6d6e95da55d8e0cf..362c541f2b846ca40c538c5222ee4a30a7e5d7a6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 238eeff18fba93ba78d3cc4f1f203a4a9273bcef..908603965340ec15ac143ddd0bc150002cdd378d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
diff --git a/src/java/org/mxchange/jfinancials/beans/financial/FinancialsAdminFinancialWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/financial/FinancialsAdminFinancialWebRequestBean.java
new file mode 100644 (file)
index 0000000..5907473
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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 org.mxchange.jfinancials.beans.financial;
+
+import org.mxchange.jfinancials.FinancialSessionBeanRemote;
+import java.text.MessageFormat;
+import java.util.Arrays;
+import java.util.List;
+import javax.annotation.PostConstruct;
+import javax.enterprise.context.RequestScoped;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jfinancials.beans.BaseFinancialsController;
+import org.mxchange.jfinancials.beans.login.user.FinancialsUserLoginWebSessionController;
+import org.mxchange.jfinancials.model.income.BillableIncome;
+import org.mxchange.jfinancials.model.income.FinancialIncome;
+import org.mxchange.jfinancials.model.income.interval.FinancialInterval;
+
+/**
+ * An administrative user bean (controller)
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Named ("financialController")
+@RequestScoped
+public class FinancialsAdminFinancialWebRequestBean extends BaseFinancialsController implements FinancialsAdminFinancialWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 56_189_028_928_371L;
+
+       /**
+        * Remote contact bean
+        */
+       private FinancialSessionBeanRemote financialBean;
+
+       /**
+        * Income interval
+        */
+       private FinancialInterval incomeInterval;
+
+       /**
+        * Income single amount
+        */
+       private Float incomeSingleAmount;
+
+       /**
+        * Income (type) title
+        */
+       private String incomeTitle;
+
+       /**
+        * User instance
+        */
+       @Inject
+       private FinancialsUserLoginWebSessionController userLoginController;
+
+       /**
+        * Constructor
+        */
+       public FinancialsAdminFinancialWebRequestBean () {
+               // Call super constructor
+               super();
+       }
+
+       public String addFinancialIncome () {
+               // Is all data valid?
+               if (null == this.getIncomeInterval()) {
+                       // Throw NPE
+                       throw new NullPointerException("incomeInterval is null"); //NOI18N
+               } else if (null == this.getIncomeSingleAmount()) {
+                       // Throw again
+                       throw new NullPointerException("incomeSingleAmount is null"); //NOI18N
+               } else if (this.getIncomeSingleAmount() < 0) {
+                       // Not allowed value
+                       throw new IllegalArgumentException(MessageFormat.format("incomeSingleAmount={0} is not valid.", this.getIncomeSingleAmount())); //NOI18N
+               } else if (null == this.getIncomeTitle()) {
+                       // Throw again
+                       throw new NullPointerException("incomeTitle is null"); //NOI18N
+               } else if (this.getIncomeTitle().isEmpty()) {
+                       // Should not be empty
+                       throw new IllegalArgumentException("incomeTitle is empty"); //NOI18N
+               }
+
+               // Now that all required data has been entered, prepare new income instance
+               BillableIncome income = new FinancialIncome(this.getIncomeTitle(), this.getIncomeSingleAmount(), this.getIncomeInterval(), this.userLoginController.getLoggedInUser());
+
+               // Handle it over to the EJB
+               // @TODO Use updated income instance, e.g. fire event
+               BillableIncome updatedIncome = this.financialBean.addIncome(income);
+
+               // All fine
+               return "add_user_fiancial_income"; //NOI18N
+       }
+
+       @Override
+       public List<FinancialInterval> getAllIncomeIntervals () {
+               // Init array
+               List<FinancialInterval> incomeIntervals = Arrays.asList(FinancialInterval.values());
+
+               // Return it
+               return incomeIntervals;
+       }
+
+       @Override
+       public FinancialInterval getIncomeInterval () {
+               return this.incomeInterval;
+       }
+
+       @Override
+       public void setIncomeInterval (final FinancialInterval incomeInterval) {
+               this.incomeInterval = incomeInterval;
+       }
+
+       @Override
+       public Float getIncomeSingleAmount () {
+               return this.incomeSingleAmount;
+       }
+
+       @Override
+       public void setIncomeSingleAmount (final Float incomeSingleAmount) {
+               this.incomeSingleAmount = incomeSingleAmount;
+       }
+
+       @Override
+       public String getIncomeTitle () {
+               return this.incomeTitle;
+       }
+
+       @Override
+       public void setIncomeTitle (final String incomeTitle) {
+               this.incomeTitle = incomeTitle;
+       }
+
+       /**
+        * Post-initialization of this class
+        */
+       @PostConstruct
+       public void init () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.financialBean = (FinancialSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/financial!org.mxchange.jfinancials.FinancialSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+       }
+
+}
diff --git a/src/java/org/mxchange/jfinancials/beans/financial/FinancialsAdminFinancialWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/financial/FinancialsAdminFinancialWebRequestController.java
new file mode 100644 (file)
index 0000000..df46fe6
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * 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 org.mxchange.jfinancials.beans.financial;
+
+import java.io.Serializable;
+import java.util.List;
+import org.mxchange.jfinancials.model.income.interval.FinancialInterval;
+
+/**
+ * An administrative interface for user beans
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface FinancialsAdminFinancialWebRequestController extends Serializable {
+
+       /**
+        * Getter for income single amount
+        * <p>
+        * @return Income single amount
+        */
+       Float getIncomeSingleAmount ();
+
+       /**
+        * Setter for income single amount
+        * <p>
+        * @param incomeSingleAmount Income single amount
+        */
+       void setIncomeSingleAmount (final Float incomeSingleAmount);
+
+       /**
+        * Getter for income (type) title
+        * <p>
+        * @return Income title
+        */
+       String getIncomeTitle ();
+
+       /**
+        * Setter for income (type) title
+        * <p>
+        * @param incomeTitle Income title
+        */
+       void setIncomeTitle (final String incomeTitle);
+
+       /**
+        * Getter for income interval
+        * <p>
+        * @return Income interval
+        */
+       FinancialInterval getIncomeInterval ();
+
+       /**
+        * Setter for income (type) interval
+        * <p>
+        * @param incomeInterval Income interval
+        */
+       void setIncomeInterval (final FinancialInterval incomeInterval);
+
+       /**
+        * Returns a list of all all income intervals
+        * <p>
+        * @return Income intervals
+        */
+       List<FinancialInterval> getAllIncomeIntervals ();
+
+}
index 3990bfac695f53f9d85ac5a70afc58df8f9a539b..523afad7bb058dbaaf4ccc402d712305ae60bf88 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 29d93763cad1bb2f688d7047d07b2be5fd0060fa..61860a29e219c22aebef7d95d0186003a9ed4a86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index a14f4e5247a0316de73af295f9a038f07ba98087..735134d72c7ee39441786a22070d39e74ebe8167 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder GmbH
+ * Copyright (C) 2016, 2017 Roland Häder 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
index 5f188f9f130017a52407ebe651246e157eba9d9a..8f4c3e553555b0781c608e3ec242328131792bee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder GmbH
+ * Copyright (C) 2016, 2017 Roland Häder 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
index 6cd1cb75b45343a156cb2b9f035598129cc72b95..e02b4df74a11cc3b092e5a590f9fd745f2f2b4a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index e420470c255ab953726e3a6f7542146849c9f783..f8bac04e4fb96d2783fd270a626e513de1a24c36 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 601c8aadc9199d7cd687db724a73613415aff705..b71109885ed0021e397c336ff6899d67007d28a6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 3ddd5f7bd799e6b2d92181db51db001865308357..adf6afb568152aa5c50bc8ca011a018f6f0f943d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 9c7a3cad0957d041e55ded79456d385aab9b8128..334f66f21d61f71219fa1d6f922e1f8f3f6cdda0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 274ffd601e93b20be9d1b80d4426be9060095937..92336e3b25b6ad9774ac1f603ea32fb8e84de716 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index f1395ba7dfc5976d20c6c06797b12d3de93e7f87..8a0545145178fd23240b2b04ddeda1269af48775 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 2f8c3fe0317509a76fe049100b2583530547e0d5..b9aa55ad1ac038d644f686e543e28fd642269580 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index a6acca6a2bc30737cc0f25424390d3e1e4c02d88..b0524e9de6f6deee979ce13592888c74092cf5c8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index ba4703c06764cf154a9559761f6f681b391f2c44..aa00f2de6e5d54e0cc121decce33fef479b68510 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index b4587a49e4232df384ddffee883b8e37a36975c8..5c4a05dfdbd5a3727f1eb0443582ef2de05748cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index e7e0c45f7bb65364ecaa3427c695039b9caa87f9..99e7004f5e2594047daa2d09d45efb188ff6354c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index d6920ba97187e5016c03be813fd563822d8072ab..8536049abe110db6fddeee583780f24d29a7709c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 738aefa9dcff5677890c53a6a45838270d97a5e3..2639732a4e98738917fda26b1697694cd08df712 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 26b3d2b04375435e004bef05ec739b90e14cc0a9..d408486379fcbada000f66a8c9690e085f7df700 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 612a8c5dad07bbfbed39f14c415b0446526a9ebb..c1b1143099fe0fe9c619d98132e75d7695f442d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 9e38b14b53289eccd77418990ef08af206ee0e94..976e2cc2230654e7441bcea34ff674f12f0035f2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index bdb8fb57453a0aa63cf2f1f65e6d04a739668065..1dabe3a46fe37c8b00b7b0e3ae84ed3dffcee7a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 96d6b6832ad75939101e2dc1b7338dce04eddca9..ddc5c031b87c7a5480f0f69d336addec1c05f17d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
  */
 package org.mxchange.jfinancials.beans.resendlink;
 
-import java.text.MessageFormat;
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.SessionScoped;
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.Any;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -29,9 +30,13 @@ import org.mxchange.jcoreee.utils.FacesUtils;
 import org.mxchange.jfinancials.beans.BaseFinancialsController;
 import org.mxchange.jfinancials.beans.localization.FinancialsLocalizationSessionController;
 import org.mxchange.jfinancials.beans.user.FinancialsUserWebSessionController;
+import org.mxchange.jusercore.events.resendlink.ObservableUserResendLinkAccountEvent;
+import org.mxchange.jusercore.events.resendlink.UserResendLinkAccountEvent;
 import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
+import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
+import org.mxchange.jusercore.model.resendlink.ResendLinkSessionBeanRemote;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 
@@ -71,6 +76,13 @@ public class FinancialsResendLinkWebSessionBean extends BaseFinancialsController
        @Inject
        private FinancialsUserWebSessionController userController;
 
+       /**
+        * Event being fired after confirmation link is being sent
+        */
+       @Inject
+       @Any
+       private Event<ObservableUserResendLinkAccountEvent> userResendLinkEvent;
+
        /**
         * Default constructor
         */
@@ -98,7 +110,8 @@ public class FinancialsResendLinkWebSessionBean extends BaseFinancialsController
                        this.clear();
 
                        // Not found, should not happen as the registered validator should find it
-                       throw new FaceletException(MessageFormat.format("this.emailAddress={0} should be resolveable into User instance.", this.getEmailAddress()), ex); //NOI18N
+                       this.showFacesMessage("form_resend_link:", "ERROR_USER_EMAIL_ADDRESS_NOT_FOUND"); //NOI18N
+                       return ""; //NOI18N
                }
 
                // Is the user account already confirmed?
@@ -107,31 +120,44 @@ public class FinancialsResendLinkWebSessionBean extends BaseFinancialsController
                        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
                        throw new NullPointerException("user.userConfirmKey is null"); //NOI18N
                }
 
-               // Get base URL
-               String baseUrl = FacesUtils.generateBaseUrl();
+               try {
+                       // Get base URL
+                       String baseUrl = FacesUtils.generateBaseUrl();
+
+                       // Call EJB and return redirect target
+                       this.resendLinkBean.resendConfirmationLink(user, this.localizationController.getLocale(), baseUrl);
+               } catch (final UserNotFoundException ex) {
+                       // User not found
+                       this.showFacesMessage("form_resend_link:resendEmailAddress", "ERROR_USER_NOT_FOUND"); //NOI18N
+                       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); //NOI18N
+                       return ""; //NOI18N
+               }
 
-               // Call EJB and return redirect target
-               this.resendLinkBean.resendConfirmationLink(user, this.localizationController.getLocale(), baseUrl);
+               // Fire event
+               this.userResendLinkEvent.fire(new UserResendLinkAccountEvent(user));
 
                // Clear this bean
                this.clear();
 
                // Return redirect target
-               return "resend_done"; //NOI18N
+               return "user_resend_done"; //NOI18N
        }
 
        @Override
@@ -155,7 +181,7 @@ public class FinancialsResendLinkWebSessionBean extends BaseFinancialsController
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.resendLinkBean = (ResendLinkSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/resendLink!org.mxchange.jfinancials.beans.resendlink.ResendLinkSessionBeanRemote"); //NOI18N
+                       this.resendLinkBean = (ResendLinkSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/resendLink!org.mxchange.jusercore.model.resendlink.ResendLinkSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
index 3ddcc2eba30650e4f194f7c24d3ad341db7211ec..844e5ee42c3ba22fcba64af2385426affa7d0cec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 88459f4e6b5f1202b35924b1a8bd16db91143a74..a7565ebaf6885e012e652adcf5bcf57f648f66f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 19fc1e313b2394a150eae3e6050f7da2fe0a1de9..98ffc17aedbeb6f743b2f7e78a79c826b7e7d925 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 9f2cf9423e355e0a7a57b58656541cfcbd51765f..2880d7ca0619b6e93d96672e3686d12a17c3baf9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 38aa8d8fd4e565a80a0b24e94241cdae3004bd34..e209be3633a5029f07ba9bb8e0104000268b4a72 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 574d67893aff0366ff243437ceef02565ffdb45c..3b1a075b867bcbe8b7a7b91fbf7e44fdee660d1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 9d47fbeeacfdd99e5014d4bdc808e8d45af36bdd..65be5276eb2e5f2ce8c5f982863d0755b122b8f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 2b0227fc371972781236a068d55ae5fbae4b0d64..cd62e99ba0eb61395265547c004452f31d1fdeec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index db941ab4d81bc331981a2d3fdb010c27b34c3bd1..3b89772b3a47eddcd685d758c37f913e7a01de05 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index f22b5d53d752e37254542c9953495e497fb022c7..4e34f413f7c5e8f485dd13dc853ebda0c252be7c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 161ba24983dd6520fba58556e6154c9f597a17c9..67c053756b6ab174c4ea72e2772dd427f465db7d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index cd37f065c81a03b967caa17de9c47a6aa69e68ea..d045dcefe4d6fa79647affd3e1f1b08cd653a478 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index bc3ea9d5784ac1a0e460221fdac0a2469cd6e1f5..4a1c78359425e4de12fd0abca5231d7148bd6ba9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 607468dcc9f6fcb53b3c382d1b99d21b2ccf026c..bd938371b22e9732a17cb5dc7f34d4f435086bd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 64e97c0dd57273aa00fcf6a390ca052cc6009bad..786c5f2935ff4c2b6fbbdac45ccdebf714e67af4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 8ef2a765974954eb9a85b29b872a56a532af88a1..29c04248ac55551a9a0015d9e668526fdc88928d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
index 90732b74bd9bfcbabcdb0f042ded9f2e906ab741..98a89d24774a1779d7e6ff6a76afee8c30a04e76 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 7f10444a4ae86ca00d463d3d2336eba3eb729599..0a229d64dcf41f78f96751ffc4eaff039ed828ac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 0f6ff44c87eed0625fd7acab0809d202f74c7460..86424469441caf5bd6e48355040a877175988f8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index b8ffd6348605681f6413d5baf13ed58aa0c6fc61..d65c47200572f03b5afaf92bc631659e14120b79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 9ec9eb539bc5985922c073afae9bd614c98f15ed..0f795fbeafe0ef8af5dc1644bb4256e6c3d823de 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 Roland H\u00e4der
+# Copyright (C) 2016, 2017 Roland H\u00e4der
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as
@@ -778,3 +778,26 @@ ADMIN_LINK_SHOW_CONTACT_DATA=Kontaktdaten anzeigen
 ERROR_USER_PASSWORD_TO_WEAK=Das eingegebene Passwort ist zu schwach. Bitte geben Sie Bustaben, Zahlen und Sonderzeichen ein, um ein sicheres Passwort zu erstellen.
 #@TODO Please fix German umlauts!
 GUEST_REGISTRATION_USER_NAME_NOT_ENTERED=Bitte geben Sie einen Benutzernamen ein. Dieser wird auf Verfuegbarkeit hin getestet.
+#@TODO Please fix German umlauts!
+PAGE_TITLE_LOGIN_FINANCIAL_OVERVIEW=Finanzen-Uebersicht
+#@TODO Please fix German umlauts!
+SUB_TITLE_LOGIN_FINANCIAL_OVERVIEW=Uebersicht Ihrer Finanzen:
+#@TODO Please fix German umlauts!
+PAGE_TITLE_LOGIN_FINANCIAL_ADD_RECEIPT=Rechnung hinzufuegen/erfassen
+SUB_TITLE_LOGIN_FINANCIAL_ADD_RECEIPT=Weitere Rechnung erfassen:
+#@TODO Please fix German umlauts!
+PAGE_TITLE_LOGIN_FINANCIAL_ADD_INCOME=Neue Einkommensart hinzufuegen
+#@TODO Please fix German umlauts!
+SUB_TITLE_LOGIN_FINANCIAL_ADD_INCOME=Weitere Einkommensart hinzufuegen:
+LOGIN_FINANCIAL_ADD_INCOME_FORM_TITLE=Daten einer Einkommensart erfassen:
+LOGIN_FINANCIAL_INCOME_INTERVAL=Einkommensinterval:
+#@TODO Please fix German umlauts!
+FIELD_FINANCIAL_INCOME_REQUIRED=Feld "Einkommensinterval" muss ausgewaehlt werden.
+#@TODO Please fix German umlauts!
+BUTTON_LOGIN_FINCIAL_ADD_INCOME=Einkommensart hinzufuegen
+LOGIN_FINANCIAL_INCOME_SINGLE_VALUE=Einkommensbetrag:
+#@TODO Please fix German umlauts!
+FIELD_FINANCIAL_INCOME_SINGLE_VALUE_REQUIRED=Feld "Einkommensbetrag" bitte ausfuellen.
+LOGIN_FINANCIAL_INCOME_TITLE=Bezeichnung der Einkommensart:
+#@TODO Please fix German umlauts!
+FIELD_FINANCIAL_INCOME_TITLE_REQUIRED=Feld "Title" muss ausgefuellt werden.
index 1f274a5dfea617718e82918138c06a66fa170e0f..4c1a619329f7a4e5afb13131df366afd7cc59565 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 Roland H\u00e4der
+# Copyright (C) 2016, 2017 Roland H\u00e4der
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as
@@ -466,7 +466,6 @@ SELECTION_NOTICE_USER_PROFILE_MODE_INVISIBLE=If you choose "Invisible", nobody c
 SELECTION_NOTICE_USER_PROFILE_MODE_MEMBERS=If you choose "Only members", other users can start sharing address books with you.
 SELECTION_NOTICE_USER_PROFILE_MODE_PUBLIC=If you choose "All" the whole Internet can view your profile, including bots.
 LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND=Your current password for confirmation:
-LINK_LOGIN_USER_CHANGE_EMAIL_ADDRESS=Change your email address
 LOGIN_USER_CHANGE_PERSONAL_DATA_TITLE=Change personal data:
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password
 PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm registration
@@ -774,3 +773,17 @@ BUTTON_USER_CHANGE_PASSWORD=Change password
 ADMIN_LINK_SHOW_CONTACT_DATA=Show contact data
 ERROR_USER_PASSWORD_TO_WEAK=Your entered password is to weak. Please enter letters, numbers and special characters to create a secure password.
 GUEST_REGISTRATION_USER_NAME_NOT_ENTERED=Please enter a user name. The entered name is being checked for availability.
+PAGE_TITLE_LOGIN_FINANCIAL_OVERVIEW=Financials Overview
+SUB_TITLE_LOGIN_FINANCIAL_OVERVIEW=Overview of your financials:
+PAGE_TITLE_LOGIN_FINANCIAL_ADD_RECEIPT=Add receipt
+SUB_TITLE_LOGIN_FINANCIAL_ADD_RECEIPT=Add new receipt:
+PAGE_TITLE_LOGIN_FINANCIAL_ADD_INCOME=Add new income type
+SUB_TITLE_LOGIN_FINANCIAL_ADD_INCOME=Add new income type:
+LOGIN_FINANCIAL_ADD_INCOME_FORM_TITLE=Enter all data of one income type:
+LOGIN_FINANCIAL_INCOME_INTERVAL=Income interval:
+FIELD_FINANCIAL_INCOME_REQUIRED=Field "Income interval" must be selected.
+BUTTON_LOGIN_FINCIAL_ADD_INCOME=Add income type
+LOGIN_FINANCIAL_INCOME_SINGLE_VALUE=Income value:
+FIELD_FINANCIAL_INCOME_SINGLE_VALUE_REQUIRED=Field "Income value" must be filled out.
+LOGIN_FINANCIAL_INCOME_TITLE=Title of income type:
+FIELD_FINANCIAL_INCOME_TITLE_REQUIRED=Field "Title" must be filled out.
index b1bcc38ba3ace3f3bedfc06461d1a5dc85bb242c..627af1a51e82fe373c0ffa274c2f5d56b3083743 100644 (file)
@@ -29,7 +29,7 @@
                                </li>
                        </ui:fragment>
 
-                       <li class="footer_copyright">Copyright (c) 2017 Roland Häder</li>
+                       <li class="footer_copyright">Copyright (c) 2016, 2017 Roland Häder</li>
                </ul>
        </footer>
 
diff --git a/web/user/financials/login_financials_add_income.xhtml b/web/user/financials/login_financials_add_income.xhtml
new file mode 100644 (file)
index 0000000..274a26b
--- /dev/null
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+         lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+         xmlns:ui="http://java.sun.com/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         >
+
+       <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
+               <ui:define name="login_title">
+                       <h:outputText value="#{msg.PAGE_TITLE_LOGIN_FINANCIAL_ADD_INCOME}" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       <h:outputText value="#{msg.SUB_TITLE_LOGIN_FINANCIAL_ADD_INCOME}" />
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_add_financials_income">
+                               <h:panelGroup styleClass="table_medium" layout="block">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.LOGIN_FINANCIAL_ADD_INCOME_FORM_TITLE}" />
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left_medium">
+                                                       <h:outputLabel for="incomeTitle" value="#{msg.LOGIN_FINANCIAL_INCOME_TITLE}" />
+                                               </div>
+
+                                               <div class="table_right_medium">
+                                                       <h:inputText styleClass="input" id="incomeTitle" size="2" maxlength="10" value="#{financialController.incomeTitle}" required="true" requiredMessage="#{msg.FIELD_FINANCIAL_INCOME_TITLE_REQUIRED}">
+                                                               <f:validator validatorId="IncomeTitleValidator" />
+                                                       </h:inputText>
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left_medium">
+                                                       <h:outputLabel for="incomeInterval" value="#{msg.LOGIN_FINANCIAL_INCOME_INTERVAL}" />
+                                               </div>
+
+                                               <div class="table_right_medium">
+                                                       <h:selectOneMenu styleClass="select" id="incomeInterval" value="#{financialController.incomeInterval}" required="true" requiredMessage="#{msg.FIELD_FINANCIAL_INCOME_REQUIRED}">
+                                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" />
+                                                               <f:selectItems value="#{financialController.allIncomeIntervals}" var="incomeInterval" itemValue="#{incomeInterval}" itemLabel="#{msg[incomeInterval.concat('_INTERVAL')]}" />
+                                                       </h:selectOneMenu>
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left_medium">
+                                                       <h:outputLabel for="incomeSingleValue" value="#{msg.LOGIN_FINANCIAL_INCOME_SINGLE_VALUE}" />
+                                               </div>
+
+                                               <div class="table_right_medium">
+                                                       <h:inputText styleClass="input" id="incomeSingleValue" size="5" maxlength="20" value="#{financialController.incomeSingleAmount}" required="true" requiredMessage="#{msg.FIELD_FINANCIAL_INCOME_SINGLE_VALUE_REQUIRED}">
+                                                               <f:validator validatorId="CurrencyAmountValidator" />
+                                                       </h:inputText>
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+
+                                               <h:commandButton styleClass="submit" id="submit_add_income" type="submit" action="#{financialController.addFinancialIncome()}" value="#{msg.BUTTON_LOGIN_FINCIAL_ADD_INCOME}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+               </ui:define>
+       </ui:composition>
+</html>
index bb0ed480dff1862fab4ef63b4a06375a8ff7dff6..5a5fae09bc714bd28d6090fca3927d6a4b53d3af 100644 (file)
                                        <h:column>
                                                <h:outputLabel for="totalReceipts" styleClass="data_label" value="#{msg.USER_FINANCIALS_TOTAL_RECEIPTS}" />
 
-                                               <h:outputLink id="totalReceipts" target="list_user_financial_receipts" value="#{financialController.receipts.size()}" />
+                                               <h:outputLink id="totalReceipts" styleClass="data_field" target="list_user_financial_receipts" value="#{financialController.receipts.size()}" />
+                                       </h:column>
+
+                                       <h:column>
+                                               <h:outputLabel for="totalReceipts" styleClass="data_label" value="#{msg.USER_FINANCIALS_TOTAL_OTHER_EXPENSES}" />
+
+                                               <h:outputLink id="totalReceipts" styleClass="data_field" target="list_user_financial_other_expenses" value="#{financialController.income.size()}" />
+                                       </h:column>
+
+                                       <h:column>
+                                               <h:outputLabel for="totalReceipts" styleClass="data_label" value="#{msg.USER_FINANCIALS_TOTAL_INCOME}" />
+
+                                               <h:outputLink id="totalReceipts" styleClass="data_field" target="list_user_financial_income" value="#{financialController.income.size()}" />
                                        </h:column>
                                </h:panelGrid>
                        </h:panelGroup>
 
                        <h:panelGroup layout="block" styleClass="para">
-                               <h:outputText value="#{msg.USER_FINANCIALS_NEXT_ACTIONS}"
+                               <h:outputText value="#{msg.USER_FINANCIALS_NEXT_ACTIONS}" />
+
                                <ul>
                                        <li>
-                                               <h:link  title="#{msg.LINK_USER_ADD_FINANCIAL_RECEIPT_TITLE}" outcome="add_user_fiancial_receipt" value="#{msg.LINK_USER_ADD_FINANCIAL_RECEIPT}" />
+                                               <h:link  title="#{msg.LINK_USER_FINANCIAL_ADD_RECEIPT_TITLE}" outcome="add_user_fiancial_receipt" value="#{msg.LINK_USER_FINANCIAL_ADD_RECEIPT}" />
+                                       </li>
+
+                                       <li>
+                                               <h:link  title="#{msg.LINK_USER_FINANCIAL_ADD_OTHER_EXPENSES_TITLE}" outcome="add_user_fiancial_other_expenses" value="#{msg.LINK_USER_FINANCIAL_ADD_OTHER_EXPENSES}" />
+                                       </li>
+
+                                       <li>
+                                               <h:link  title="#{msg.LINK_USER_FINANCIAL_ADD_INCOME_TITLE}" outcome="add_user_fiancial_income" value="#{msg.LINK_USER_FINANCIAL_ADD_INCOME}" />
                                        </li>
                                </ul>
                        </h:panelGroup>