]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Rewrite:
authorRoland Haeder <roland@mxchange.org>
Sat, 10 Oct 2015 20:02:27 +0000 (22:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 10 Oct 2015 20:02:27 +0000 (22:02 +0200)
- 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

19 files changed:
.gitignore
lib/jcontacts-business-core.jar
lib/jcontacts-core.jar
lib/jcontacts-lib.jar
lib/jcore-logger-lib.jar
lib/jcore.jar
lib/jcoreee.jar
lib/jcountry-core.jar [new file with mode: 0644]
lib/jphone-core.jar [new file with mode: 0644]
lib/juser-core.jar
lib/juser-lib.jar
nbproject/ant-deploy.xml
nbproject/build-impl.xml
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebBean.java
src/java/org/mxchange/addressbook/beans/user/UserWebBean.java
src/java/org/mxchange/addressbook/beans/user/UserWebController.java

index 22f399f16b88af064412915bf4c680daeba88a2b..0383bcc9e4d5d046929d1f5b3102c94012efafb2 100644 (file)
@@ -1,3 +1,7 @@
-/dist/
-/build/
 /nbproject/private/
+/nbproject/*~
+/manifest.mf
+/build/
+/dist/
+/data/*
+/*.properties
index 9607d5cafc2f4f73a146df8192b1c83889597c96..5665c86076d45e0aeacb6a44e94b985cedcd6ef8 100644 (file)
Binary files a/lib/jcontacts-business-core.jar and b/lib/jcontacts-business-core.jar differ
index 98ca617007e9f5e8090f6843513e80bec85acfa1..855385dcf75d9ff7c6acb19cddb65dde39bd5bc0 100644 (file)
Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ
index c1c68c3bec9651418b93e49019c93c307cf4b456..a736f4c652e10429aff4fb485a7ddf78e2ce089a 100644 (file)
Binary files a/lib/jcontacts-lib.jar and b/lib/jcontacts-lib.jar differ
index 8e5a5b954c3f18434a17e24e50fd7392d64bf46e..4cb7da5146cc64855a32f2f76722c7325c3514cb 100644 (file)
Binary files a/lib/jcore-logger-lib.jar and b/lib/jcore-logger-lib.jar differ
index 57a3b6cecdc73685710c2cf6d6760b52b39a09d7..1a75fc00ef1f570f9b3af2edf1b0065404ef10eb 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 3900e4e429207d9bb6bf44a793b20eb1fcd3c033..76ac2d386eba9d82637d0b52fdc62d0932179b5e 100644 (file)
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 (file)
index 0000000..ed08999
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 (file)
index 0000000..480f9f8
Binary files /dev/null and b/lib/jphone-core.jar differ
index 764cab64475977ea25d6ca0ab651a9505265ddcd..ae1dbfb3fe91d0177eebae36ea3da33efb5e7f15 100644 (file)
Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ
index 0d4d6af3b8cfe072a93b6724f5332dff52b47760..2d9fa0509af5f2be2b488328cd52658ffbdfdab1 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index 3c01560598dfb6e9553a981b2c724a341cd8a592..2d5f8778d18757ea5ded4eea4da13ca1adc51093 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
 <project default="-deploy-ant" basedir=".">
-       <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
-               <property file="${deploy.ant.properties.file}" />
-               <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
-               <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
-               <available file="${deploy.ant.resource.dir}" property="has.setup"/>
-               <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
-               <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
-       </target>
+    <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
+        <property file="${deploy.ant.properties.file}" />
+        <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+        <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
+        <available file="${deploy.ant.resource.dir}" property="has.setup"/>
+        <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
+        <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
+    </target>
+    
+    <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
+        <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
+        <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
+        <!-- The doctype triggers resolution which can fail -->
+        <replace file="${temp.sun.web}">
+            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+        </replace>
+        <replace file="${temp.sun.web}">
+            <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
+            <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
+        </replace>
+        <xmlproperty file="${temp.sun.web}" validate="false">
+        </xmlproperty>    
+        <delete file="${temp.sun.web}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="sun-web-app.context-root"/>
+        </condition>
+    </target>
+    <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
+        <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
+        <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
+        <!-- The doctype triggers resolution which can fail -->
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+        </replace>
+        <replace file="${temp.gf.web}">
+            <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
+            <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
+        </replace>
+        <xmlproperty file="${temp.gf.web}" validate="false">
+        </xmlproperty>
+        <delete file="${temp.gf.web}"/>
+        <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
+        <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
+            <isset property="glassfish-web-app.context-root"/>
+        </condition>
+    </target>
+    <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
+        <property name="deploy.context.root.argument" value=""/>
+    </target>
+    <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
+        <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
+        <mkdir dir="${gfv3.resources.dir}"/>
+        <mkdir dir="${gfv3.resources.dir}/META-INF"/>
+        <copy todir="${gfv3.resources.dir}/META-INF">
+            <fileset dir="${deploy.ant.resource.dir}"/>
+        </copy>
+        <jar destfile="${deploy.ant.archive}" update="true">
+            <fileset dir="${gfv3.resources.dir}"/>
+        </jar>
+        <delete dir="${gfv3.resources.dir}"/>
+    </target>
+    <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+        <antcall target="-deploy-without-pw"/>
+        <antcall target="-deploy-with-pw"/>
+    </target>
 
-       <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
-               <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
-               <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
-               <!-- The doctype triggers resolution which can fail -->
-               <replace file="${temp.sun.web}">
-                       <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
-                       <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
-               </replace>
-               <replace file="${temp.sun.web}">
-                       <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
-                       <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
-               </replace>
-               <xmlproperty file="${temp.sun.web}" validate="false">
-               </xmlproperty>
-               <delete file="${temp.sun.web}"/>
-               <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
-                       <isset property="sun-web-app.context-root"/>
-               </condition>
-               <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
-                       <isset property="sun-web-app.context-root"/>
-               </condition>
-       </target>
-       <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
-               <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
-               <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
-               <!-- The doctype triggers resolution which can fail -->
-               <replace file="${temp.gf.web}">
-                       <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
-                       <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
-               </replace>
-               <replace file="${temp.gf.web}">
-                       <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
-                       <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
-               </replace>
-               <xmlproperty file="${temp.gf.web}" validate="false">
-               </xmlproperty>
-               <delete file="${temp.gf.web}"/>
-               <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
-                       <isset property="glassfish-web-app.context-root"/>
-               </condition>
-               <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
-                       <isset property="glassfish-web-app.context-root"/>
-               </condition>
-       </target>
-       <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
-               <property name="deploy.context.root.argument" value=""/>
-       </target>
-       <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
-               <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
-               <mkdir dir="${gfv3.resources.dir}"/>
-               <mkdir dir="${gfv3.resources.dir}/META-INF"/>
-               <copy todir="${gfv3.resources.dir}/META-INF">
-                       <fileset dir="${deploy.ant.resource.dir}"/>
-               </copy>
-               <jar destfile="${deploy.ant.archive}" update="true">
-                       <fileset dir="${gfv3.resources.dir}"/>
-               </jar>
-               <delete dir="${gfv3.resources.dir}"/>
-       </target>
-       <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
-               <antcall target="-deploy-without-pw"/>
-               <antcall target="-deploy-with-pw"/>
-       </target>
+    <target name="-deploy-without-pw" unless="gfv3.password">
+        <echo message="Deploying ${deploy.ant.archive}"/>
+        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
+        <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
+        <get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
+            dest="${gfv3.results.file}"/>
+        <delete file="${gfv3.results.file}"/>    
+    </target>
+    <target name="-deploy-with-pw" if="gfv3.password">
+        <echo message="Deploying ${deploy.ant.archive}"/>
+        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
+        <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
+        <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
+            dest="${gfv3.results.file}"/>
+        <delete file="${gfv3.results.file}"/>
+    </target>
+    <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
+        <antcall target="-undeploy-without-pw"/>
+        <antcall target="-undeploy-with-pw"/>
+    </target>
 
-       <target name="-deploy-without-pw" unless="gfv3.password">
-               <echo message="Deploying ${deploy.ant.archive}"/>
-               <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
-               <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
-               <get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
-                        dest="${gfv3.results.file}"/>
-               <delete file="${gfv3.results.file}"/>
-       </target>
-       <target name="-deploy-with-pw" if="gfv3.password">
-               <echo message="Deploying ${deploy.ant.archive}"/>
-               <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
-               <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
-               <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
-                        dest="${gfv3.results.file}"/>
-               <delete file="${gfv3.results.file}"/>
-       </target>
-       <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
-               <antcall target="-undeploy-without-pw"/>
-               <antcall target="-undeploy-with-pw"/>
-       </target>
-
-       <target name="-undeploy-without-pw" unless="gfv3.password">
-               <echo message="Undeploying ${deploy.ant.archive}"/>
-               <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
-               <get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
-                        dest="${gfv3.results.file}"/>
-               <delete file="${gfv3.results.file}"/>
-       </target>
-       <target name="-undeploy-with-pw" if="gfv3.password">
-               <echo message="Undeploying ${deploy.ant.archive}"/>
-               <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
-               <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
-                        dest="${gfv3.results.file}"/>
-               <delete file="${gfv3.results.file}"/>
-       </target>
+    <target name="-undeploy-without-pw" unless="gfv3.password">
+        <echo message="Undeploying ${deploy.ant.archive}"/>
+        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
+        <get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
+            dest="${gfv3.results.file}"/>
+        <delete file="${gfv3.results.file}"/>    
+    </target>
+    <target name="-undeploy-with-pw" if="gfv3.password">
+        <echo message="Undeploying ${deploy.ant.archive}"/>
+        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
+        <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
+            dest="${gfv3.results.file}"/>
+        <delete file="${gfv3.results.file}"/>
+    </target>
 </project>
index 4de471dc6c70fc63d9fd03b6a0434c1152ce5503..a20c1a6aee7c3f7222d933a73cad899fb4e707b0 100644 (file)
@@ -821,9 +821,9 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
     <target name="-init-taskdefs">
         <fail unless="libs.CopyLibs.classpath">
 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 
 &lt;netbeans_installation&gt;/java&lt;version&gt;/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:
@@ -1036,6 +1036,8 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.jcontacts-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcontacts-business-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcontacts-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jcountry-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jphone-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.juser-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.juser-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${reference.addressbook-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
@@ -1051,6 +1053,8 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.jcontacts-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcontacts-business-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcontacts-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.jcountry-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.jphone-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.juser-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.juser-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${reference.addressbook-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
@@ -1368,7 +1372,7 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
     <!--
-
+                
                 TEST COMPILATION SECTION
             -->
     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
@@ -1407,7 +1411,7 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
     <!--
-
+                
                 TEST EXECUTION SECTION
             -->
     <target depends="init" if="have.tests" name="-pre-test-run">
@@ -1443,7 +1447,7 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
     <!--
-
+                
                 TEST DEBUGGING SECTION
             -->
     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
@@ -1465,35 +1469,35 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
     <!--
-
-               CLEANUP SECTION
-       -->
-       <target depends="init" name="deps-clean" unless="no.deps">
-               <ant antfile="${project.addressbook-lib}/build.xml" inheritall="false" target="clean"/>
-       </target>
-       <target depends="init" name="do-clean">
-               <condition property="build.dir.to.clean" value="${build.web.dir}">
-                       <isset property="dist.ear.dir"/>
-               </condition>
-               <property name="build.dir.to.clean" value="${build.web.dir}"/>
-               <delete includeEmptyDirs="true" quiet="true">
-                       <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
-               </delete>
-               <delete dir="${build.dir}"/>
-               <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
-               <delete dir="${dist.dir}"/>
-       </target>
-       <target depends="do-clean" if="status.clean-failed" name="check-clean">
-               <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
-               <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
-       </target>
-       <target depends="init" if="netbeans.home" name="undeploy-clean">
-               <nbundeploy failOnError="false" startServer="false"/>
-       </target>
-       <target name="-post-clean">
-               <!-- Empty placeholder for easier customization. -->
-               <!-- You can override this target in the ../build.xml file. -->
-       </target>
-       <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
-       <target depends="clean" description="Clean build products." name="clean-ear"/>
+                
+                CLEANUP SECTION
+            -->
+    <target depends="init" name="deps-clean" unless="no.deps">
+        <ant antfile="${project.addressbook-lib}/build.xml" inheritall="false" target="clean"/>
+    </target>
+    <target depends="init" name="do-clean">
+        <condition property="build.dir.to.clean" value="${build.web.dir}">
+            <isset property="dist.ear.dir"/>
+        </condition>
+        <property name="build.dir.to.clean" value="${build.web.dir}"/>
+        <delete includeEmptyDirs="true" quiet="true">
+            <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
+        </delete>
+        <delete dir="${build.dir}"/>
+        <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
+        <delete dir="${dist.dir}"/>
+    </target>
+    <target depends="do-clean" if="status.clean-failed" name="check-clean">
+        <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
+        <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
+    </target>
+    <target depends="init" if="netbeans.home" name="undeploy-clean">
+        <nbundeploy failOnError="false" startServer="false"/>
+    </target>
+    <target name="-post-clean">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
+    <target depends="clean" description="Clean build products." name="clean-ear"/>
 </project>
index 8245c23834d8476722ad1d12088c7d46a2f58a80..a923f6774d23e2d3607e3cebc84bf49f93b64de4 100644 (file)
@@ -3,6 +3,6 @@ build.xml.script.CRC32=be5f34f7
 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=d8bc4ea8
-nbproject/build-impl.xml.script.CRC32=855e3438
+nbproject/build-impl.xml.data.CRC32=80fe4962
+nbproject/build-impl.xml.script.CRC32=498d3940
 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1
index 7e91062fd002d65c34434d15a7d611b35e76aec6..f47c2cdf910d4bc9be127ab18b977f9f32f8e1bf 100644 (file)
@@ -43,6 +43,8 @@ file.reference.jcontacts-lib.jar=lib/jcontacts-lib.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.juser-core.jar=lib/juser-core.jar
 file.reference.juser-lib.jar=lib/juser-lib.jar
 includes=**
@@ -65,6 +67,8 @@ javac.classpath=\
     ${file.reference.jcontacts-core.jar}:\
     ${file.reference.jcontacts-business-core.jar}:\
     ${file.reference.jcontacts-lib.jar}:\
+    ${file.reference.jcountry-core.jar}:\
+    ${file.reference.jphone-core.jar}:\
     ${file.reference.juser-core.jar}:\
     ${file.reference.juser-lib.jar}:\
     ${reference.addressbook-lib.jar}:\
@@ -115,6 +119,8 @@ source.reference.jcontacts-lib.jar=../jcontacts-lib/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.juser-core.jar=../juser-core/src/
 source.reference.juser-lib.jar=../juser-lib/src/
 source.root=src
index a7f5af570ea78a7bcdee7731fd3adc79a5d0e72f..d6e38d4551cb85cd2738b805bc7e4960f511ce52 100644 (file)
@@ -1,76 +1,84 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://www.netbeans.org/ns/project/1">
-       <type>org.netbeans.modules.web.project</type>
-       <configuration>
-               <data xmlns="http://www.netbeans.org/ns/web-project/3">
-                       <name>addressbook-war</name>
-                       <minimum-ant-version>1.6.5</minimum-ant-version>
-                       <web-module-libraries>
-                               <library dirs="200">
-                                       <file>${file.reference.jcore.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.jcoreee.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.jcore-logger-lib.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.jcontacts-core.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.jcontacts-business-core.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.jcontacts-lib.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.juser-core.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.juser-lib.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${reference.addressbook-lib.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.cdi-api.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                               <library dirs="200">
-                                       <file>${file.reference.gf-client.jar}</file>
-                                       <path-in-war>WEB-INF/lib</path-in-war>
-                               </library>
-                       </web-module-libraries>
-                       <web-module-additional-libraries/>
-                       <source-roots>
-                               <root id="src.dir"/>
-                       </source-roots>
-                       <test-roots>
-                               <root id="test.src.dir"/>
-                       </test-roots>
-               </data>
-               <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
-                       <definitions>.\lib\nblibraries.properties</definitions>
-               </libraries>
-               <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
-                       <reference>
-                               <foreign-project>addressbook-lib</foreign-project>
-                               <artifact-type>jar</artifact-type>
-                               <script>build.xml</script>
-                               <target>jar</target>
-                               <clean-target>clean</clean-target>
-                               <id>jar</id>
-                       </reference>
-               </references>
-       </configuration>
+    <type>org.netbeans.modules.web.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/web-project/3">
+            <name>addressbook-war</name>
+            <minimum-ant-version>1.6.5</minimum-ant-version>
+            <web-module-libraries>
+                <library dirs="200">
+                    <file>${file.reference.jcore.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.jcoreee.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.jcore-logger-lib.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.jcontacts-core.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.jcontacts-business-core.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.jcontacts-lib.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.jcountry-core.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.jphone-core.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.juser-core.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.juser-lib.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${reference.addressbook-lib.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.cdi-api.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+                <library dirs="200">
+                    <file>${file.reference.gf-client.jar}</file>
+                    <path-in-war>WEB-INF/lib</path-in-war>
+                </library>
+            </web-module-libraries>
+            <web-module-additional-libraries/>
+            <source-roots>
+                <root id="src.dir"/>
+            </source-roots>
+            <test-roots>
+                <root id="test.src.dir"/>
+            </test-roots>
+        </data>
+        <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
+            <definitions>.\lib\nblibraries.properties</definitions>
+        </libraries>
+        <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
+            <reference>
+                <foreign-project>addressbook-lib</foreign-project>
+                <artifact-type>jar</artifact-type>
+                <script>build.xml</script>
+                <target>jar</target>
+                <clean-target>clean</clean-target>
+                <id>jar</id>
+            </reference>
+        </references>
+    </configuration>
 </project>
index 078626ab703f45f17714b847b1f79733908400fd..b007703e52c239da069d8322ad70f7d5c73198a1 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.addressbook.beans.addressbook;
 
 import java.text.MessageFormat;
 import java.util.ArrayList;
+import java.util.GregorianCalendar;
 import java.util.List;
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.SessionScoped;
@@ -119,11 +120,11 @@ public class AddressbookWebBean implements AddressbookWebController {
                        throw new FaceletException("This method can only be called as logged-in user."); //NOI18N
                } else if (this.getAddressbookName() == null) {
                        // Address book name is null
-                       throw new IllegalStateException("addressbookName is null");
+                       throw new NullPointerException("addressbookName is null");
                } else if (this.getAddressbookName().isEmpty()) {
                        // Address book name is empty
                        throw new IllegalStateException("addressbookName is empty.");
-               } else if (!this.isAddressbookNameUsed(this.getAddressbookName())) {
+               } else if (this.isAddressbookNameUsed(this.getAddressbookName())) {
                        // Already used by this user
                        throw new FaceletException(MessageFormat.format("Address book name {0} already used.", this.getAddressbookName())); //NOI18N
                }
@@ -134,6 +135,7 @@ public class AddressbookWebBean implements AddressbookWebController {
                // Set default status to UNLOCKED and owner
                addressbook.setAddressbookStatus(AddressbokStatus.UNLOCKED);
                addressbook.setAddressbookUser(this.loginController.getLoggedInUser());
+               addressbook.setAddressbookCreated(new GregorianCalendar());
 
                try {
                        // Register this address book
index 9739db93c2b4a2f557e99d0ae34757fa62f46ded..3bc0d362d812ec8d934cef8ae6f55f3efd7c45d9 100644 (file)
@@ -31,6 +31,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.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
@@ -58,7 +62,7 @@ public class UserWebBean implements UserWebController {
        /**
         * Cellphone number
         */
-       private String cellphoneNumber;
+       private DialableCellphoneNumber cellphoneNumber;
 
        /**
         * City
@@ -71,9 +75,9 @@ public class UserWebBean implements UserWebController {
        private String comment;
 
        /**
-        * Country code
+        * Country instance
         */
-       private String countryCode;
+       private Country country;
 
        /**
         * Email address
@@ -98,7 +102,7 @@ public class UserWebBean implements UserWebController {
        /**
         * Fax number
         */
-       private String faxNumber;
+       private DialableFaxNumber faxNumber;
 
        /**
         * First name
@@ -118,7 +122,7 @@ public class UserWebBean implements UserWebController {
        /**
         * Phone number
         */
-       private String phoneNumber;
+       private DialableLandLineNumber phoneNumber;
 
        /**
         * Street
@@ -210,7 +214,7 @@ public class UserWebBean implements UserWebController {
                this.setHouseNumber(null);
                this.setZipCode(null);
                this.setCity(null);
-               this.setCountryCode(null);
+               this.setCountry(null);
 
                // - contact data
                this.setEmailAddress(null);
@@ -239,7 +243,7 @@ public class UserWebBean implements UserWebController {
                this.setHouseNumber(user.getUserContact().getHouseNumber());
                this.setZipCode(user.getUserContact().getZipCode());
                this.setCity(user.getUserContact().getCity());
-               this.setCountryCode(user.getUserContact().getCountryCode());
+               this.setCountry(user.getUserContact().getCountry());
 
                // - contact data
                this.setPhoneNumber(user.getUserContact().getPhoneNumber());
@@ -270,7 +274,7 @@ public class UserWebBean implements UserWebController {
                contact.setHouseNumber(this.getHouseNumber());
                contact.setZipCode(this.getZipCode());
                contact.setCity(this.getCity());
-               contact.setCountryCode(this.getCountryCode());
+               contact.setCountry(this.getCountry());
                contact.setEmailAddress(this.getEmailAddress());
                contact.setPhoneNumber(this.getPhoneNumber());
                contact.setFaxNumber(this.getFaxNumber());
@@ -303,12 +307,12 @@ public class UserWebBean implements UserWebController {
        }
 
        @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;
        }
 
@@ -333,13 +337,13 @@ public class UserWebBean implements UserWebController {
        }
 
        @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
@@ -373,12 +377,12 @@ public class UserWebBean implements UserWebController {
        }
 
        @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;
        }
 
@@ -413,12 +417,12 @@ public class UserWebBean implements UserWebController {
        }
 
        @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;
        }
 
index 56b2da0819400c752484f114310fcce0f006513d..3da777b1c68be70c858a84ed18be57510908ed9f 100644 (file)
@@ -19,6 +19,10 @@ package org.mxchange.addressbook.beans.user;
 import java.io.Serializable;
 import java.util.Date;
 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.jusercore.model.user.User;
 
 /**
@@ -73,14 +77,14 @@ public interface UserWebController extends Serializable {
         * <p>
         * @return the cellphoneNumber
         */
-       public String getCellphoneNumber ();
+       public DialableCellphoneNumber getCellphoneNumber ();
 
        /**
         * Cellphone number
         * <p>
         * @param cellphoneNumber the cellphoneNumber to set
         */
-       public void setCellphoneNumber (final String cellphoneNumber);
+       public void setCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);
 
        /**
         * City
@@ -115,14 +119,14 @@ public interface UserWebController extends Serializable {
         * <p>
         * @return the countryCode
         */
-       public String getCountryCode ();
+       public Country getCountry ();
 
        /**
         * Country code
         * <p>
         * @param countryCode the countryCode to set
         */
-       public void setCountryCode (final String countryCode);
+       public void setCountry (final Country countryCode);
 
        /**
         * Getter for email address
@@ -171,14 +175,14 @@ public interface UserWebController extends Serializable {
         * <p>
         * @return the faxNumber
         */
-       public String getFaxNumber ();
+       public DialableFaxNumber getFaxNumber ();
 
        /**
         * Fax number
         * <p>
         * @param faxNumber the faxNumber to set
         */
-       public void setFaxNumber (final String faxNumber);
+       public void setFaxNumber (final DialableFaxNumber faxNumber);
 
        /**
         * First name
@@ -227,14 +231,14 @@ public interface UserWebController extends Serializable {
         * <p>
         * @return the phoneNumber
         */
-       public String getPhoneNumber ();
+       public DialableLandLineNumber getPhoneNumber ();
 
        /**
         * Phone number
         * <p>
         * @param phoneNumber the phoneNumber to set
         */
-       public void setPhoneNumber (final String phoneNumber);
+       public void setPhoneNumber (final DialableLandLineNumber phoneNumber);
 
        /**
         * Street