From: Roland Haeder Date: Sat, 10 Oct 2015 20:09:48 +0000 (+0200) Subject: Rewrite: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6897f988b1ffe6af36396346f092f48a363db7fd;p=pizzaservice-war.git Rewrite: - introduced jcountry-core which is a library for handling country-related data, e.g. dial prefix, country code ... - introduced jphone-core which is a library for handling phone, fax and cell phone numbers - these both new libraries required a rewrite of many parts --- diff --git a/.gitignore b/.gitignore index 811c681d..0383bcc9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ /nbproject/private/ +/nbproject/*~ /manifest.mf /build/ /dist/ +/data/* /*.properties -/data/*.* -/nbproject/*~ \ No newline at end of file diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 98ca6170..855385dc 100644 Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ diff --git a/lib/jcore-logger-lib.jar b/lib/jcore-logger-lib.jar index 8e5a5b95..4cb7da51 100644 Binary files a/lib/jcore-logger-lib.jar and b/lib/jcore-logger-lib.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar index 57a3b6ce..1a75fc00 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar index 3900e4e4..76ac2d38 100644 Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar new file mode 100644 index 00000000..ed089991 Binary files /dev/null and b/lib/jcountry-core.jar differ diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar new file mode 100644 index 00000000..480f9f8e Binary files /dev/null and b/lib/jphone-core.jar differ diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar index f86ba13b..fbe89251 100644 Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ diff --git a/lib/jshop-ee-lib.jar b/lib/jshop-ee-lib.jar index 86ee6154..0ad3d8f0 100644 Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ diff --git a/nbproject/ant-deploy.xml b/nbproject/ant-deploy.xml index 3c015605..2d5f8778 100644 --- a/nbproject/ant-deploy.xml +++ b/nbproject/ant-deploy.xml @@ -1,111 +1,111 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index c98c1438..1a6f7cb7 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -821,9 +821,9 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f The libs.CopyLibs.classpath property is not set up. -This property must point to +This property must point to org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part -of NetBeans IDE installation and is usually located at +of NetBeans IDE installation and is usually located at <netbeans_installation>/java<version>/ant/extra folder. Either open the project in the IDE and make sure CopyLibs library exists or setup the property manually. For example like this: @@ -1033,6 +1033,8 @@ exists or setup the property manually. For example like this: + + @@ -1046,6 +1048,8 @@ exists or setup the property manually. For example like this: + + @@ -1364,7 +1368,7 @@ exists or setup the property manually. For example like this: @@ -1403,7 +1407,7 @@ exists or setup the property manually. For example like this: @@ -1439,7 +1443,7 @@ exists or setup the property manually. For example like this: @@ -1461,35 +1465,35 @@ exists or setup the property manually. For example like this: - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + CLEANUP SECTION + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index bb958853..502b5f11 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=82213886 build.xml.stylesheet.CRC32=651128d4@1.68.1.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=656c188b -nbproject/build-impl.xml.script.CRC32=3f1a63d0 +nbproject/build-impl.xml.data.CRC32=2f309951 +nbproject/build-impl.xml.script.CRC32=fc9d2f6b nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1 diff --git a/nbproject/project.properties b/nbproject/project.properties index da431701..16206423 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -33,6 +33,7 @@ dist.dir=dist dist.ear.war=${dist.dir}/${war.ear.name} dist.javadoc.dir=${dist.dir}/javadoc dist.war=${dist.dir}/${war.name} +endorsed.classpath= excludes= file.reference.cdi-api.jar=lib/cdi-api.jar file.reference.gf-client.jar=lib/gf-client.jar @@ -40,6 +41,8 @@ file.reference.jcontacts-core.jar=lib/jcontacts-core.jar file.reference.jcore-logger-lib.jar=lib/jcore-logger-lib.jar file.reference.jcore.jar=lib/jcore.jar file.reference.jcoreee.jar=lib/jcoreee.jar +file.reference.jcountry-core.jar=lib/jcountry-core.jar +file.reference.jphone-core.jar=lib/jphone-core.jar file.reference.jshop-core.jar=lib/jshop-core.jar file.reference.jshop-ee-lib.jar=lib/jshop-ee-lib.jar includes=** @@ -59,6 +62,8 @@ javac.classpath=\ ${file.reference.jcore.jar}:\ ${file.reference.jcore-logger-lib.jar}:\ ${file.reference.jcoreee.jar}:\ + ${file.reference.jcountry-core.jar}:\ + ${file.reference.jphone-core.jar}:\ ${file.reference.jcontacts-core.jar}:\ ${file.reference.jshop-core.jar}:\ ${file.reference.jshop-ee-lib.jar}:\ @@ -108,6 +113,8 @@ source.reference.jcontacts-core.jar=../jcontacts-core/src/ source.reference.jcore-logger-lib.jar=../jcore-logger-lib/src/ source.reference.jcore.jar=../jcore/src/ source.reference.jcoreee.jar=../jcoreee/src/ +source.reference.jcountry-core.jar=../jcountry-core/src/ +source.reference.jphone-core.jar=../jphone-core/src/ source.reference.jshop-core.jar=../jshop-core/src/ source.reference.jshop-ee-lib.jar=../jshop-ee-lib/src/ source.root=src diff --git a/nbproject/project.xml b/nbproject/project.xml index 9c6aa1fc..078ef3c9 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -1,68 +1,76 @@ - org.netbeans.modules.web.project - - - PizzaService-war - 1.6.5 - - - ${file.reference.jcore.jar} - WEB-INF/lib - - - ${file.reference.jcore-logger-lib.jar} - WEB-INF/lib - - - ${file.reference.jcoreee.jar} - WEB-INF/lib - - - ${file.reference.jcontacts-core.jar} - WEB-INF/lib - - - ${file.reference.jshop-core.jar} - WEB-INF/lib - - - ${file.reference.jshop-ee-lib.jar} - WEB-INF/lib - - - ${reference.PizzaService-lib.jar} - WEB-INF/lib - - - ${file.reference.cdi-api.jar} - WEB-INF/lib - - - ${file.reference.gf-client.jar} - WEB-INF/lib - - - - - - - - - - - - .\lib\nblibraries.properties - - - - PizzaService-lib - jar - - jar - clean - jar - - - + org.netbeans.modules.web.project + + + PizzaService-war + 1.6.5 + + + ${file.reference.jcore.jar} + WEB-INF/lib + + + ${file.reference.jcore-logger-lib.jar} + WEB-INF/lib + + + ${file.reference.jcoreee.jar} + WEB-INF/lib + + + ${file.reference.jcountry-core.jar} + WEB-INF/lib + + + ${file.reference.jphone-core.jar} + WEB-INF/lib + + + ${file.reference.jcontacts-core.jar} + WEB-INF/lib + + + ${file.reference.jshop-core.jar} + WEB-INF/lib + + + ${file.reference.jshop-ee-lib.jar} + WEB-INF/lib + + + ${reference.PizzaService-lib.jar} + WEB-INF/lib + + + ${file.reference.cdi-api.jar} + WEB-INF/lib + + + ${file.reference.gf-client.jar} + WEB-INF/lib + + + + + + + + + + + + .\lib\nblibraries.properties + + + + PizzaService-lib + jar + + jar + clean + jar + + + diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 4072e584..a0c3ee5b 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -50,7 +50,7 @@ PAGE_TITLE_ADMIN_CATEGORIES=Categories CONTENT_TITLE_ADMIN_CATEGORIES=Administrate categories: SELECT_ENTRY=Select: ADMIN_ENTER_CATEGORY_TITLE=Title: -ADMIN_ENTER_CATEGORY_TITLE_EXAMPLE=(e.g. Pizza) +ADMIN_ENTER_CATEGORY_TITLE_EXAMPLE=(example: Pizza) ADMIN_PARENT_CATEGORY=Parent category: CONTENT_TITLE_ADMIN_PRODUCTS=These products has been created: PAGE_TITLE_ADMIN_PRODUCTS=Products @@ -63,7 +63,7 @@ CATEGORY=Category: PLEASE_FILL_ALL_FIELDS=Please fill out all fields: ADMIN_BUTTON_ADD_CATEGORY=Add category ADMIN_ENTER_PRODUCT_TITLE=Product title: -ADMIN_ENTER_PRODUCT_TITLE_EXAMPLE=(e.g. Pizza Italia) +ADMIN_ENTER_PRODUCT_TITLE_EXAMPLE=(example: Pizza Italia) IS_AVAILABLE=Available: ADMIN_BUTTON_ADD_PRODUCT=Add product ADMIN_ADD_PRODUCT_NOTICE_TITLE=Notices for adding new product: diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java index f61d3520..559d9f18 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java @@ -25,6 +25,10 @@ import javax.naming.NamingException; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.UserContact; import org.mxchange.jcontacts.contact.gender.Gender; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jshopcore.model.customer.Customer; import org.mxchange.jshopcore.model.customer.CustomerSessionBeanRemote; import org.mxchange.jshopcore.model.customer.ShopCustomer; @@ -47,7 +51,7 @@ public class CustomerWebBean implements CustomerWebController { /** * Cellphone number */ - private String cellphoneNumber; + private DialableCellphoneNumber cellphoneNumber; /** * City @@ -62,7 +66,7 @@ public class CustomerWebBean implements CustomerWebController { /** * Country code */ - private String countryCode; + private Country country; /** * Remote customer bean @@ -82,7 +86,7 @@ public class CustomerWebBean implements CustomerWebController { /** * Fax number */ - private String faxNumber; + private DialableFaxNumber faxNumber; /** * First name @@ -102,7 +106,7 @@ public class CustomerWebBean implements CustomerWebController { /** * Phone number */ - private String phoneNumber; + private DialableLandLineNumber phoneNumber; /** * Street @@ -151,6 +155,7 @@ public class CustomerWebBean implements CustomerWebController { contact.setHouseNumber(this.getHouseNumber()); contact.setZipCode(this.getZipCode()); contact.setCity(this.getCity()); + contact.setCountry(this.getCountry()); contact.setPhoneNumber(this.getPhoneNumber()); contact.setFaxNumber(this.getFaxNumber()); contact.setCellphoneNumber(this.getCellphoneNumber()); @@ -165,12 +170,12 @@ public class CustomerWebBean implements CustomerWebController { } @Override - public String getCellphoneNumber () { + public DialableCellphoneNumber getCellphoneNumber () { return this.cellphoneNumber; } @Override - public void setCellphoneNumber (final String cellphoneNumber) { + public void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber) { this.cellphoneNumber = cellphoneNumber; } @@ -185,13 +190,13 @@ public class CustomerWebBean implements CustomerWebController { } @Override - public String getCountryCode () { - return this.countryCode; + public Country getCountry () { + return this.country; } @Override - public void setCountryCode (final String countryCode) { - this.countryCode = countryCode; + public void setCountry (final Country country) { + this.country = country; } @Override @@ -215,12 +220,12 @@ public class CustomerWebBean implements CustomerWebController { } @Override - public String getFaxNumber () { + public DialableFaxNumber getFaxNumber () { return this.faxNumber; } @Override - public void setFaxNumber (final String faxNumber) { + public void setFaxNumber (final DialableFaxNumber faxNumber) { this.faxNumber = faxNumber; } @@ -255,12 +260,12 @@ public class CustomerWebBean implements CustomerWebController { } @Override - public String getPhoneNumber () { + public DialableLandLineNumber getPhoneNumber () { return this.phoneNumber; } @Override - public void setPhoneNumber (final String phoneNumber) { + public void setPhoneNumber (final DialableLandLineNumber phoneNumber) { this.phoneNumber = phoneNumber; } diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java index 47955f0f..bb57d7f1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebController.java @@ -18,6 +18,10 @@ package org.mxchange.pizzaapplication.beans.customer; import java.io.Serializable; import org.mxchange.jcontacts.contact.gender.Gender; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jshopcore.model.customer.Customer; /** @@ -39,14 +43,14 @@ public interface CustomerWebController extends Serializable { *

* @return the cellphoneNumber */ - public String getCellphoneNumber (); + public DialableCellphoneNumber getCellphoneNumber (); /** * Cellphone number *

* @param cellphoneNumber the cellphoneNumber to set */ - public void setCellphoneNumber (final String cellphoneNumber); + public void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber); /** * City @@ -63,18 +67,18 @@ public interface CustomerWebController extends Serializable { public void setCity (final String city); /** - * Country code + * Getter for country instance *

- * @return the countryCode + * @return Country instance */ - public String getCountryCode (); + public Country getCountry (); /** - * Country code + * Setter for country instance *

- * @param countryCode the countryCode to set + * @param country Country instance */ - public void setCountryCode (final String countryCode); + public void setCountry (final Country country); /** * Email address @@ -109,14 +113,14 @@ public interface CustomerWebController extends Serializable { *

* @return the faxNumber */ - public String getFaxNumber (); + public DialableFaxNumber getFaxNumber (); /** * Fax number *

* @param faxNumber the faxNumber to set */ - public void setFaxNumber (final String faxNumber); + public void setFaxNumber (final DialableFaxNumber faxNumber); /** * First name @@ -165,14 +169,14 @@ public interface CustomerWebController extends Serializable { *

* @return the phoneNumber */ - public String getPhoneNumber (); + public DialableLandLineNumber getPhoneNumber (); /** * Phone number *

* @param phoneNumber the phoneNumber to set */ - public void setPhoneNumber (final String phoneNumber); + public void setPhoneNumber (final DialableLandLineNumber phoneNumber); /** * Street