]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Added missing javadoc + organized members
authorRoland Haeder <roland@mxchange.org>
Fri, 19 Feb 2016 14:34:59 +0000 (15:34 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 19 Feb 2016 14:40:30 +0000 (15:40 +0100)
src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java
src/java/org/mxchange/addressbook/beans/country/CountryWebApplicationBean.java
src/java/org/mxchange/addressbook/beans/shares/SharesWebSessionBean.java
src/java/org/mxchange/addressbook/beans/smsprovider/SmsProviderWebApplicationBean.java
src/java/org/mxchange/addressbook/beans/user/UserWebSessionBean.java
src/java/org/mxchange/addressbook/converter/country/CountryConverter.java
src/java/org/mxchange/addressbook/converter/smsprovider/SmsProviderConverter.java
src/java/org/mxchange/addressbook/converter/user/UserConverter.java

index 54ae88c5b77c584b17bd18f7068557b281d9de29..bc024c2b97b5169a54e371c457e2d8d63e2e2368 100644 (file)
@@ -348,6 +348,9 @@ public class AddressbookWebSessionBean implements AddressbookWebSessionControlle
                return (!this.usersAddressbooks.isEmpty());
        }
 
+       /**
+        * Post-initialization of this class
+        */
        @PostConstruct
        public void init () {
                // Init list
index b994cd846f91e23b46d095784f18ad8d7ad400e3..bae6f54519158ee96fe3d2be8019d0cd1f86e255 100644 (file)
@@ -75,6 +75,9 @@ public class CountryWebApplicationBean implements CountryWebApplicationControlle
                return Collections.unmodifiableList(this.countryList);
        }
 
+       /**
+        * Post-initialization of this class
+        */
        @PostConstruct
        public void init () {
                this.countryList = this.countryBean.allCountries();
index e6329bf466f28545ae56775ed409b9f0b055f2df..c6ab33e6920031d48aae548fce738008223b655a 100644 (file)
@@ -200,6 +200,9 @@ public class SharesWebSessionBean implements SharesWebSessionController {
                this.shareeUserId = shareeUserId;
        }
 
+       /**
+        * Post-initialization of this class
+        */
        @PostConstruct
        public void init () {
        }
index aa64620c28c72bdcdeb68bb2a4f2053125bf13dc..9d50ea580fa59761d74cdc6263cd37f986dfd939 100644 (file)
@@ -75,6 +75,9 @@ public class SmsProviderWebApplicationBean implements SmsProviderWebApplicationC
                return Collections.unmodifiableList(this.cellphoneList);
        }
 
+       /**
+        * Post-initialization of this class
+        */
        @PostConstruct
        public void init () {
                this.cellphoneList = this.cellphoneBean.allSmsProvider();
index cc31bdc12e59fbf4599bd5d4cd274da179f84e27..a42c1a1193a963a6144d12cc79348e9afa8e85f1 100644 (file)
@@ -147,6 +147,12 @@ public class UserWebSessionBean implements UserWebSessionController {
         */
        private Short houseNumber;
 
+       /**
+        * Login bean (controller)
+        */
+       @Inject
+       private UserLoginWebSessionController loginController;
+
        /**
         * Phone number area code
         */
@@ -202,21 +208,15 @@ public class UserWebSessionBean implements UserWebSessionController {
         */
        private ProfileMode userProfileMode;
 
-       /**
-        * ZIP code
-        */
-       private Integer zipCode;
-
        /**
         * A list of all public user profiles
         */
        private List<User> visibleUserList;
 
        /**
-        * Login bean (controller)
+        * ZIP code
         */
-       @Inject
-       private UserLoginWebSessionController loginController;
+       private Integer zipCode;
 
        /**
         * Default constructor
@@ -238,32 +238,6 @@ public class UserWebSessionBean implements UserWebSessionController {
                }
        }
 
-       @Override
-       public void afterUserLogin (final @Observes UserLoggedInEvent event) {
-               // Trace message
-               System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
-
-               // event should not be null
-               if (null == event) {
-                       // Throw NPE
-                       throw new NullPointerException("event is null"); //NOI18N
-               } else if (event.getUser() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("event.user is null"); //NOI18N
-               } else if (event.getUser().getUserId() == null) {
-                       // userId is null
-                       throw new NullPointerException("event.user.userId is null"); //NOI18N
-               } else if (event.getUser().getUserId() < 1) {
-                       // Not avalid id
-                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId())); //NOI18N
-               }
-
-               // Re-initialize list
-               this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
-
-               // Trace message
-               System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
-       }
 
        @Override
        public void afterRegistrationEvent (final @Observes UserRegisteredEvent event) {
@@ -313,6 +287,33 @@ public class UserWebSessionBean implements UserWebSessionController {
                System.out.println("UserWebBean:afterRegistration: EXIT!"); //NOI18N
        }
 
+       @Override
+       public void afterUserLogin (final @Observes UserLoggedInEvent event) {
+               // Trace message
+               System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: event={0} - CALLED!", event)); //NOI18N
+
+               // event should not be null
+               if (null == event) {
+                       // Throw NPE
+                       throw new NullPointerException("event is null"); //NOI18N
+               } else if (event.getUser() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("event.user is null"); //NOI18N
+               } else if (event.getUser().getUserId() == null) {
+                       // userId is null
+                       throw new NullPointerException("event.user.userId is null"); //NOI18N
+               } else if (event.getUser().getUserId() < 1) {
+                       // Not avalid id
+                       throw new IllegalArgumentException(MessageFormat.format("userId of user={0} is not valid: {1}", event.getUser(), event.getUser().getUserId())); //NOI18N
+               }
+
+               // Re-initialize list
+               this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
+
+               // Trace message
+               System.out.println(MessageFormat.format("UserWebBean:afterUserLogin: this.visibleUserList.size()={0} - EXIT!", this.visibleUserList.size())); //NOI18N
+       }
+
        @Override
        public List<User> allVisibleUsers () {
                // Return it
@@ -670,6 +671,9 @@ public class UserWebSessionBean implements UserWebSessionController {
                this.zipCode = zipCode;
        }
 
+       /**
+        * Post-initialization of this class
+        */
        @PostConstruct
        public void init () {
                // Get full user name list for reducing EJB calls
@@ -720,6 +724,11 @@ public class UserWebSessionBean implements UserWebSessionController {
                return (Objects.equals(this.getUserPassword(), this.getUserPasswordRepeat()));
        }
 
+       @Override
+       public boolean isUserIdEmpty () {
+               return ((this.getUserId() == null) || (this.getUserId() == 0));
+       }
+
        @Override
        public boolean isUserNameRegistered (final User user) {
                return ((this.userNameList instanceof List) && (this.userNameList.contains(user.getUserName())));
@@ -858,9 +867,4 @@ public class UserWebSessionBean implements UserWebSessionController {
                this.setBirthday(user.getUserContact().getContactBirthday());
                this.setComment(user.getUserContact().getContactComment());
        }
-
-       @Override
-       public boolean isUserIdEmpty () {
-               return ((this.getUserId() == null) || (this.getUserId() == 0));
-       }
 }
index a70df8ceab982b9276a263af5d62b7454c1d7244..a29b64c5cb9abe1c56ce1e9ae28b42fb574589bc 100644 (file)
@@ -50,6 +50,26 @@ public class CountryConverter implements Converter {
        @Log
        private LoggerBeanLocal loggerBeanLocal;
 
+       /**
+        * Initialization of this converter
+        */
+       public CountryConverter () {
+               // Try to get it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Lookup logger
+                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and country controller
+                       this.countryController = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/addressbook-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+               }
+       }
+
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Trace message
@@ -113,24 +133,4 @@ public class CountryConverter implements Converter {
                // Return category id
                return String.valueOf(((Country) value).getCountryId());
        }
-
-       /**
-        * Initialization of this converter
-        */
-       public CountryConverter () {
-               // Try to get it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Lookup logger
-                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
-
-                       // ... and country controller
-                       this.countryController = (AddressbookCountrySingletonBeanRemote) context.lookup("java:global/addressbook-ejb/country!org.mxchange.jcountry.data.AddressbookCountrySingletonBeanRemote"); //NOI18N
-               } catch (final NamingException ex) {
-                       // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
-               }
-       }
 }
index 464c113e46cf7441303d810e6bf3ff686e780856..6b3b6884160fccd00d5c29c78a486f26b6e15f96 100644 (file)
@@ -50,6 +50,26 @@ public class SmsProviderConverter implements Converter {
         */
        private AddressbookSmsProviderSingletonBeanRemote providerController;
 
+       /**
+        * Initialization of this converter
+        */
+       public SmsProviderConverter () {
+               // Try to get it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Lookup logger
+                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       /// and SMS provider controller
+                       this.providerController = (AddressbookSmsProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.AddressbookSmsProviderSingletonBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+               }
+       }
+
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Trace message
@@ -113,25 +133,4 @@ public class SmsProviderConverter implements Converter {
                // Return category id
                return String.valueOf(((SmsProvider) value).getProviderId());
        }
-
-       /**
-        * Initialization of this converter
-        */
-       public SmsProviderConverter () {
-               // Try to get it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Lookup logger
-                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
-
-                       /// and SMS provider controller
-                       this.providerController = (AddressbookSmsProviderSingletonBeanRemote) context.lookup("java:global/addressbook-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.AddressbookSmsProviderSingletonBeanRemote"); //NOI18N
-               } catch (final NamingException ex) {
-                       // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
-               }
-       }
-
 }
index 2b2c2f2be6e93b5b9a55dfe284120dc2da552118..8d0592febc0fe7ce3133e2465427f83c3312c9ee 100644 (file)
@@ -50,6 +50,26 @@ public class UserConverter implements Converter {
         */
        private UserWebSessionController userController;
 
+       /**
+        * Initialization of this converter
+        */
+       public UserConverter () {
+               // Try to get it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Lookup logger
+                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+
+                       // ... and user controller
+                       this.userController = (UserWebSessionController) context.lookup("java:global/juser-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+               } catch (final NamingException ex) {
+                       // Continue to throw it
+                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+               }
+       }
+
        @Override
        public Object getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
                // Trace message
@@ -108,24 +128,4 @@ public class UserConverter implements Converter {
                // Return category id
                return String.valueOf(((User) value).getUserId());
        }
-
-       /**
-        * Initialization of this converter
-        */
-       public UserConverter () {
-               // Try to get it
-               try {
-                       // Get initial context
-                       Context context = new InitialContext();
-
-                       // Lookup logger
-                       this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
-
-                       // ... and user controller
-                       this.userController = (UserWebSessionController) context.lookup("java:global/juser-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
-               } catch (final NamingException ex) {
-                       // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
-               }
-       }
 }