]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java
Please cherry-pick:
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / contact / PizzaAdminContactWebRequestBean.java
index 59993f97b4101b9665b7aa03f042b3aa9c3a147c..4e2496f9e62528f0f9e524aef526f6197d9fe50e 100644 (file)
@@ -79,7 +79,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
        /**
         * Administrative contact EJB
         */
-       @EJB (lookup = "java:global/addressbook-ejb/adminContact!org.mxchange.jcontacts.model.contact.AdminContactSessionBeanRemote")
+       @EJB (lookup = "java:global/jfinancials-ejb/adminContact!org.mxchange.jcontacts.model.contact.AdminContactSessionBeanRemote")
        private AdminContactSessionBeanRemote adminContactBean;
 
        /**
@@ -100,7 +100,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
        /**
         * EJB for general contact purposes
         */
-       @EJB (lookup = "java:global/addressbook-ejb/contact!org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote")
+       @EJB (lookup = "java:global/jfinancials-ejb/contact!org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote")
        private ContactSessionBeanRemote contactBean;
 
        /**
@@ -270,7 +270,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                }
 
                // Create new contact instance
-               Contact contact = this.createContactInstance();
+               final Contact contact = this.createContactInstance();
 
                // Default is not same contact
                if (this.isSameContactFound(contact)) {
@@ -279,7 +279,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                }
 
                // Init contact
-               Contact updatedContact;
+               final Contact updatedContact;
 
                // Try to call EJB
                try {
@@ -326,7 +326,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                }
 
                // Get contact instance from event
-               Contact contact = event.getCreatedContact();
+               final Contact contact = event.getCreatedContact();
 
                // Set all fields: contact
                this.setContactId(contact.getContactId());
@@ -395,12 +395,12 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                }
 
                // Generate phone number
-               DialableLandLineNumber landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
-               DialableMobileNumber mobile = new MobileNumber(this.getMobileProvider(), this.getMobileNumber());
-               DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+               final DialableLandLineNumber landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+               final DialableMobileNumber mobile = new MobileNumber(this.getMobileProvider(), this.getMobileNumber());
+               final DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
 
                // Create new instance
-               Contact contact = new UserContact(this.getPersonalTitle(), this.getFirstName(), this.getFamilyName());
+               final Contact contact = new UserContact(this.getPersonalTitle(), this.getFirstName(), this.getFamilyName());
 
                // Is contact id set?
                if (this.getContactId() instanceof Long) {
@@ -491,7 +491,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
         */
        public String editContactData () {
                // Get contact instance
-               Contact contact = this.createContactInstance();
+               final Contact contact = this.createContactInstance();
 
                // Check if contact instance is in helper and valid
                if (null == contact) {
@@ -509,7 +509,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                this.updateContactData(contact);
 
                // Call EJB for updating contact data
-               Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
+               final Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
 
                // Fire event
                this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact));
@@ -536,12 +536,12 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                }
 
                // Get all data
-               String number = String.format(
-                          "%s%d%d", //NOI18N
-                          mobileNumber.getMobileProvider().getProviderCountry().getCountryExternalDialPrefix(),
-                          mobileNumber.getMobileProvider().getProviderDialPrefix(),
-                          mobileNumber.getPhoneNumber()
-          );
+               final String number = String.format(
+                                        "%s%d%d", //NOI18N
+                                        mobileNumber.getMobileProvider().getProviderCountry().getCountryExternalDialPrefix(),
+                                        mobileNumber.getMobileProvider().getProviderDialPrefix(),
+                                        mobileNumber.getPhoneNumber()
+                        );
 
                // Return it
                return number;
@@ -563,12 +563,12 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                }
 
                // Generate it
-               String number = String.format(
-                          "%s%d%d", //NOI18N
-                          phoneNumber.getPhoneCountry().getCountryExternalDialPrefix(),
-                          phoneNumber.getPhoneAreaCode(),
-                          phoneNumber.getPhoneNumber()
-          );
+               final String number = String.format(
+                                        "%s%d%d", //NOI18N
+                                        phoneNumber.getPhoneCountry().getCountryExternalDialPrefix(),
+                                        phoneNumber.getPhoneAreaCode(),
+                                        phoneNumber.getPhoneNumber()
+                        );
 
                // Return it
                return number;
@@ -1120,12 +1120,12 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                boolean IsFound = false;
 
                // Get iterator
-               Iterator<Contact> iterator = this.contactController.allContacts().iterator();
+               final Iterator<Contact> iterator = this.contactController.allContacts().iterator();
 
                // Loop through all
                while (iterator.hasNext()) {
                        // Get next contact
-                       Contact next = iterator.next();
+                       final Contact next = iterator.next();
 
                        // Is the same?
                        if (ContactUtils.isSameContact(contact, next)) {