]> git.mxchange.org Git - jjobs-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:45:11 +0000 (18:45 +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/jjobs/beans/country/JobsAdminCountryWebRequestBean.java
src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java
src/java/org/mxchange/jjobs/beans/user/login/JobsUserLoginWebSessionBean.java

index 2b2c177d0a804a4a2740b7ec04f9eba5bf88ba5a..8b015a1269efa117e9e0633b1027b530a5c40e83 100644 (file)
@@ -106,21 +106,20 @@ public class JobsAdminCountryWebRequestBean extends BaseJobsBean implements Jobs
 
        /**
         * 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 d8ac585bcb37ce023617537f625ce3fff143c9ac..f4d0abccb4c893320e86d76e1d0acabc31015918 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jjobs.beans.features;
 
-import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
 import org.mxchange.jjobs.beans.BaseJobsBean;
@@ -43,13 +42,6 @@ public class JobsFeatureWebApplicationBean extends BaseJobsBean implements JobsF
                super();
        }
 
-       /**
-        * Post-construction method
-        */
-       @PostConstruct
-       public void initializeList () {
-       }
-
        @Override
        public boolean isFeatureEnabled (final String feature) {
                // The parameter must be set
index 68c06de177edac133f727b7f6e43f09c1d80fd28..88b127e9ff9ef7e90d9e39e22c65a0ef902bd472 100644 (file)
@@ -240,7 +240,7 @@ public class JobsUserLoginWebSessionBean extends BaseJobsBean implements JobsUse
                final User user = event.getCreatedUser();
 
                // Set all fields here
-               this.copyUser(user);
+               this.copyToUser(user);
        }
 
        /**
@@ -268,7 +268,7 @@ public class JobsUserLoginWebSessionBean extends BaseJobsBean implements JobsUse
                final User user = event.getLoggedInUser();
 
                // Copy all data to this bean
-               this.copyUser(user);
+               this.copyToUser(user);
        }
 
        /**
@@ -319,7 +319,7 @@ public class JobsUserLoginWebSessionBean extends BaseJobsBean implements JobsUse
                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 JobsUserLoginWebSessionBean extends BaseJobsBean implements JobsUse
         * <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());