- 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
-/dist/
-/build/
/nbproject/private/
+/nbproject/*~
+/manifest.mf
+/build/
+/dist/
+/data/*
+/*.properties
<?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="&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="&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="&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="&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}&force=true&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}&force=true&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}&force=true&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}&force=true&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>
<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
<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:
<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"/>
<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"/>
</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">
</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">
</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">
</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>
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
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=**
${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}:\
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
<?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>
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;
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
}
// 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
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;
/**
* Cellphone number
*/
- private String cellphoneNumber;
+ private DialableCellphoneNumber cellphoneNumber;
/**
* City
private String comment;
/**
- * Country code
+ * Country instance
*/
- private String countryCode;
+ private Country country;
/**
* Email address
/**
* Fax number
*/
- private String faxNumber;
+ private DialableFaxNumber faxNumber;
/**
* First name
/**
* Phone number
*/
- private String phoneNumber;
+ private DialableLandLineNumber phoneNumber;
/**
* Street
this.setHouseNumber(null);
this.setZipCode(null);
this.setCity(null);
- this.setCountryCode(null);
+ this.setCountry(null);
// - contact data
this.setEmailAddress(null);
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());
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());
}
@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;
}
}
@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
}
@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;
}
}
@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;
}
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;
/**
* <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
* <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
* <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
* <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