]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 20 Oct 2022 16:42:21 +0000 (18:42 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Oct 2022 16:42:21 +0000 (18:42 +0200)
- renamed copyUser() to copyToUser() because that method "copies" (read: sets)
  all required class fields except "entry-created" in given user instance
- also used UserContact's parameterized constructor instead of default one and
  then setting all on my own
- removed @PostConstruct method

src/java/org/mxchange/jfinancials/beans/country/FinancialsAdminCountryWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java
src/java/org/mxchange/jfinancials/beans/user/login/FinancialsUserLoginWebSessionBean.java

index 4bbc8d32ee61dd053766407572b8cc25464c8ab7..3e689f7a3d04967e848d273d5d08540dbd98d471 100644 (file)
@@ -106,21 +106,20 @@ public class FinancialsAdminCountryWebRequestBean extends BaseFinancialsBean imp
 
        /**
         * Adds country to all relevant beans and sends it to the EJB. A redirect
-        * should happen after successfull creation.
+        * should happen after successful creation.
         * <p>
         * @todo Add field validation
         */
        public void addCountry () {
                // Create new country object
-               final Country country = new CountryData();
-
-               // Add all data
-               country.setCountryAbroadDialPrefix(this.getCountryAbroadDialPrefix());
-               country.setCountryCode(this.getCountryCode());
-               country.setCountryExternalDialPrefix(this.getCountryExternalDialPrefix());
-               country.setCountryI18nKey(this.getCountryI18nKey());
-               country.setCountryIsLocalPrefixRequired(this.getCountryIsLocalPrefixRequired());
-               country.setCountryPhoneCode(this.getCountryPhoneCode());
+               final Country country = new CountryData(
+                                         this.getCountryAbroadDialPrefix(),
+                                         this.getCountryCode(),
+                                         this.getCountryExternalDialPrefix(),
+                                         this.getCountryI18nKey(),
+                                         this.getCountryIsLocalPrefixRequired(),
+                                         this.getCountryPhoneCode()
+                         );
 
                // Does it already exist?
                if (this.isCountryAdded(country)) {
index 479b49750f2a36981894fa5dd98c253d3730c24f..840a314b8177eef9cdeb9d5edc5c86d21d49cb8b 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jfinancials.beans.features;
 
-import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
@@ -43,13 +42,6 @@ public class FinancialsFeatureWebApplicationBean extends BaseFinancialsBean impl
                super();
        }
 
-       /**
-        * Post-construction method
-        */
-       @PostConstruct
-       public void initializeList () {
-       }
-
        @Override
        public boolean isFeatureEnabled (final String feature) {
                // The parameter must be set
index f92e9f7259537cc0f1d1228e2435f307bbb40422..7a0212bd9405199a39494bdfb5b5e8b25d0e5bb5 100644 (file)
@@ -240,7 +240,7 @@ public class FinancialsUserLoginWebSessionBean extends BaseFinancialsBean implem
                final User user = event.getCreatedUser();
 
                // Set all fields here
-               this.copyUser(user);
+               this.copyToUser(user);
        }
 
        /**
@@ -268,7 +268,7 @@ public class FinancialsUserLoginWebSessionBean extends BaseFinancialsBean implem
                final User user = event.getLoggedInUser();
 
                // Copy all data to this bean
-               this.copyUser(user);
+               this.copyToUser(user);
        }
 
        /**
@@ -319,7 +319,7 @@ public class FinancialsUserLoginWebSessionBean extends BaseFinancialsBean implem
                final User registeredUser = event.getRegisteredUser();
 
                // Copy all data from registered->user
-               this.copyUser(registeredUser);
+               this.copyToUser(registeredUser);
 
                // Set user id again
                this.setUserId(registeredUser.getUserId());
@@ -648,7 +648,7 @@ public class FinancialsUserLoginWebSessionBean extends BaseFinancialsBean implem
         * <p>
         * @param user User instance
         */
-       private void copyUser (final User user) {
+       private void copyToUser (final User user) {
                // Copy all fields:
                // - base data
                this.setUserId(user.getUserId());