<import file="nbproject/build-impl.xml"/>
<!--
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
- -pre-init: called before initialization of project properties
- -post-init: called after initialization of project properties
- -pre-compile: called before javac compilation
- -post-compile: called after javac compilation
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
- -pre-dist: called before archive building
- -post-dist: called after archive building
- -post-clean: called after cleaning build products
+ -pre-dist: called before archive building
+ -post-dist: called after archive building
+ -post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying
- Example of pluging an obfuscator after the compilation could look like
+ Example of pluging an obfuscator after the compilation could look like
<target name="-post-compile">
<obfuscate>
</obfuscate>
</target>
- For list of available properties check the imported
- nbproject/build-impl.xml file.
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
- The target of interest are:
+ The target of interest are:
init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
- run: execution of project
- javadoc-build: javadoc generation
+ run: execution of project
+ javadoc-build: javadoc generation
- Example of overriding the target for project execution could look like
+ Example of overriding the target for project execution could look like
<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
</exec>
</target>
- Notice that overridden target depends on jar target and not only on
- compile target as regular run target does. Again, for list of available
- properties which you can use check the target you are overriding in
- nbproject/build-impl.xml file.
+ Notice that overridden target depends on jar target and not only on
+ compile target as regular run target does. Again, for list of available
+ properties which you can use check the target you are overriding in
+ nbproject/build-impl.xml file.
- -->
+ -->
</project>
<?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="-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="-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="-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="-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="-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="-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>
</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:
</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>
<?xml version="1.0" encoding="UTF-8"?>
<Scene Scope="Project" version="2">
- <Scope Scope="Faces Configuration Only">
- <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
- <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
- <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
- <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
- <Node id="*" x="1150" y="150" zoom="true"/>
- <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
- <Node id="bye.xhtml" x="150" y="450" zoom="true"/>
- <Node id="privacy.xhtml" x="650" y="300" zoom="true"/>
- <Node id="index.xhtml" x="900" y="150" zoom="true"/>
- <Node id="imprint.xhtml" x="150" y="600" zoom="true"/>
- <Node id="admin/category.xhtml" x="650" y="450" zoom="true"/>
- <Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
- <Node id="admin/product.xhtml" x="900" y="300" zoom="true"/>
- </Scope>
- <Scope Scope="Project">
- <Node id="admin/admin_logout.xhtml" x="400" y="600" zoom="true"/>
- <Node id="user/login.xhtml" x="900" y="150" zoom="true"/>
- <Node id="login/login_edit_address.xhtml" x="150" y="300" zoom="true"/>
- <Node id="login/login_edit_user_data.xhtml" x="1150" y="150" zoom="true"/>
- <Node id="login/login_other_addressbooks.xhtml" x="650" y="450" zoom="true"/>
- <Node id="user/lost_passwd.xhtml" x="900" y="300" zoom="true"/>
- <Node id="*" x="650" y="150" zoom="true"/>
- <Node id="terms.xhtml" x="150" y="600" zoom="true"/>
- <Node id="login/login_own_addressbooks.xhtml" x="400" y="150" zoom="true"/>
- <Node id="user/register_done.xhtml" x="1150" y="300" zoom="true"/>
- <Node id="bye.xhtml" x="650" y="300" zoom="true"/>
- <Node id="user/login_error.xhtml" x="1400" y="150" zoom="true"/>
- <Node id="privacy.xhtml" x="400" y="750" zoom="true"/>
- <Node id="admin/admin_index.xhtml" x="400" y="450" zoom="true"/>
- <Node id="index.xhtml" x="650" y="600" zoom="true"/>
- <Node id="login/login_user_list.xhtml" x="150" y="150" zoom="true"/>
- <Node id="imprint.xhtml" x="900" y="450" zoom="true"/>
- <Node id="login/login_index.xhtml" x="150" y="750" zoom="true"/>
- <Node id="user/register.xhtml" x="400" y="300" zoom="true"/>
- <Node id="user/resend_link.xhtml" x="150" y="450" zoom="true"/>
- </Scope>
- <Scope Scope="All Faces Configurations">
- <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
- <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
- <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
- <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
- <Node id="*" x="1150" y="150" zoom="true"/>
- <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
- <Node id="bye.xhtml" x="150" y="450" zoom="true"/>
- <Node id="privacy.xhtml" x="650" y="300" zoom="true"/>
- <Node id="index.xhtml" x="900" y="150" zoom="true"/>
- <Node id="imprint.xhtml" x="150" y="600" zoom="true"/>
- <Node id="admin/category.xhtml" x="650" y="450" zoom="true"/>
- <Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
- <Node id="admin/product.xhtml" x="900" y="300" zoom="true"/>
- </Scope>
+ <Scope Scope="Faces Configuration Only">
+ <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
+ <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="*" x="1150" y="150" zoom="true"/>
+ <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="bye.xhtml" x="150" y="450" zoom="true"/>
+ <Node id="privacy.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="index.xhtml" x="900" y="150" zoom="true"/>
+ <Node id="imprint.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="admin/category.xhtml" x="650" y="450" zoom="true"/>
+ <Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="admin/product.xhtml" x="900" y="300" zoom="true"/>
+ </Scope>
+ <Scope Scope="Project">
+ <Node id="admin/admin_logout.xhtml" x="400" y="600" zoom="true"/>
+ <Node id="user/login.xhtml" x="900" y="150" zoom="true"/>
+ <Node id="login/login_edit_address.xhtml" x="150" y="300" zoom="true"/>
+ <Node id="login/login_edit_user_data.xhtml" x="1150" y="150" zoom="true"/>
+ <Node id="login/login_other_addressbooks.xhtml" x="650" y="450" zoom="true"/>
+ <Node id="user/lost_passwd.xhtml" x="900" y="300" zoom="true"/>
+ <Node id="*" x="650" y="150" zoom="true"/>
+ <Node id="terms.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="login/login_own_addressbooks.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="user/register_done.xhtml" x="1150" y="300" zoom="true"/>
+ <Node id="bye.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="user/login_error.xhtml" x="1400" y="150" zoom="true"/>
+ <Node id="privacy.xhtml" x="400" y="750" zoom="true"/>
+ <Node id="admin/admin_index.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="index.xhtml" x="650" y="600" zoom="true"/>
+ <Node id="login/login_user_list.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="imprint.xhtml" x="900" y="450" zoom="true"/>
+ <Node id="login/login_index.xhtml" x="150" y="750" zoom="true"/>
+ <Node id="user/register.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="user/resend_link.xhtml" x="150" y="450" zoom="true"/>
+ </Scope>
+ <Scope Scope="All Faces Configurations">
+ <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
+ <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="user/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="*" x="1150" y="150" zoom="true"/>
+ <Node id="terms.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="bye.xhtml" x="150" y="450" zoom="true"/>
+ <Node id="privacy.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="index.xhtml" x="900" y="150" zoom="true"/>
+ <Node id="imprint.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="admin/category.xhtml" x="650" y="450" zoom="true"/>
+ <Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="admin/product.xhtml" x="900" y="300" zoom="true"/>
+ </Scope>
</Scene>
<?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.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>
* <p>
* @author Roland Haeder<roland@mxchange.org>
*/
-@Named("addressbookController")
+@Named ("addressbookController")
@SessionScoped
public class AddressbookWebBean implements AddressbookWebController {
/**
* Default constructor
*/
- public AddressbookWebBean() {
+ public AddressbookWebBean () {
// Try it
try {
// Get initial context
}
@PostConstruct
- public void init() {
+ public void init () {
// Init list
this.addressbookList = new ArrayList<>(0);
}
@Override
- public boolean hasCreatedAddressbooks() {
+ public boolean hasCreatedAddressbooks () {
// Is the user logged in?
if (!this.loginController.isUserLoggedIn()) {
// Not logged in
}
@Override
- public void addAddressbook() {
+ public void addAddressbook () {
// Is this name already used?
if (!this.loginController.isUserLoggedIn()) {
// Not logged in
}
@Override
- public String getAddressbookName() {
+ public String getAddressbookName () {
return this.addressbookName;
}
@Override
- public void setAddressbookName(final String addressbookName) {
+ public void setAddressbookName (final String addressbookName) {
this.addressbookName = addressbookName;
}
@Override
- public boolean isAddressbookNameUsed(final String addressbookName) {
+ public boolean isAddressbookNameUsed (final String addressbookName) {
// Is it zero size?
if (null == addressbookName) {
// Is null
* <p>
* @return Whether the user has created at least one addressbook
*/
- public boolean hasCreatedAddressbooks();
+ public boolean hasCreatedAddressbooks ();
/**
* Creates a new address book with a name. For this method to work it is
* vital that the user is logged into his/her account.
*/
- public void addAddressbook();
+ public void addAddressbook ();
/**
* Getter for address book name
* <p>
* @return Address book name
*/
- public String getAddressbookName();
+ public String getAddressbookName ();
/**
* Setter for address book name
* <p>
* @param addressbookName Address book name
*/
- public void setAddressbookName(final String addressbookName);
+ public void setAddressbookName (final String addressbookName);
/**
* Checks if the given address book name is already used by the user.
* <p>
* @return Whether the name has already been used by the user
*/
- public boolean isAddressbookNameUsed(final String addressbookName);
+ public boolean isAddressbookNameUsed (final String addressbookName);
}
@Override
public boolean isRequiredPersonalDataSet () {
- return ((this.getUserName() != null)
- && (this.getGender() != null)
- && (this.getFirstName() != null)
- && (this.getFamilyName() != null)
- && (this.getStreet() != null)
- && (this.getHouseNumber() != null)
- && (this.getZipCode() != null)
- && (this.getCity() != null)
- && (this.getEmailAddress() != null)
- && (this.getEmailAddressRepeat() != null)
- && (this.getUserPassword() != null)
- && (this.getUserPasswordRepeat() != null));
+ return ((this.getUserName() != null) &&
+ (this.getGender() != null) &&
+ (this.getFirstName() != null) &&
+ (this.getFamilyName() != null) &&
+ (this.getStreet() != null) &&
+ (this.getHouseNumber() != null) &&
+ (this.getZipCode() != null) &&
+ (this.getCity() != null) &&
+ (this.getEmailAddress() != null) &&
+ (this.getEmailAddressRepeat() != null) &&
+ (this.getUserPassword() != null) &&
+ (this.getUserPasswordRepeat() != null));
}
@Override
* Checks whether user instance's email address is used
* <p>
* @param user User instance's email address to check
+ * <p>
* @return Whether it is already used
*/
public boolean isEmailAddressRegistered (final User user);
* Checks whether given user instance's name is used
* <p>
* @param user User instance's name to check
+ * <p>
* @return Whether it is already used
*/
public boolean isUserNameRegistered (final User user);
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
- <ui:define name="title"><ui:insert name="guest_title" class="guest_title" /></ui:define>
+ <ui:define name="title">
+ <ui:insert name="guest_title" class="guest_title" />
+ </ui:define>
<ui:define name="menu">
<ui:include id="menu" class="guest_menu" src="/WEB-INF/templates/guest/guest_menu.tpl" />
xmlns:ui="http://java.sun.com/jsf/facelets">
<div class="footer">
<ul class="footer_nav">
- <li class="footer_link"><h:link outcome="index" title="#{msg.LINK_GUEST_HOME_TITLE}" value="#{msg.LINK_GUEST_HOME}" /></li>
- <li class="footer_link"><h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" /></li>
- <li class="footer_link"><h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" /></li>
- <li class="footer_link"><h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" /></li>
+ <li class="footer_link">
+ <h:link outcome="index" title="#{msg.LINK_GUEST_HOME_TITLE}" value="#{msg.LINK_GUEST_HOME}" />
+ </li>
+ <li class="footer_link">
+ <h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" />
+ </li>
+ <li class="footer_link">
+ <h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" />
+ </li>
+ <li class="footer_link">
+ <h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" />
+ </li>
<li class="footer_copyright">Copyright (c) 2015 by Roland Häder</li>
</ul>
</div>
</div>
<ul>
- <li><h:link title="#{msg.LINK_GUEST_HOME_TITLE}" outcome="index" value="#{msg.LINK_GUEST_HOME}" /></li>
- <li><h:link title="#{msg.LINK_CLOSE_SESSION_TITLE}" outcome="logout" value="#{msg.LINK_CLOSE_SESSION}" /></li>
+ <li>
+ <h:link title="#{msg.LINK_GUEST_HOME_TITLE}" outcome="index" value="#{msg.LINK_GUEST_HOME}" />
+ </li>
+ <li>
+ <h:link title="#{msg.LINK_CLOSE_SESSION_TITLE}" outcome="logout" value="#{msg.LINK_CLOSE_SESSION}" />
+ </li>
</ul>
<div class="menu_header">
</div>
<ul>
- <li><h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" /></li>
- <li><h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" /></li>
- <li><h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" /></li>
- <li><h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" /></li>
+ <li>
+ <h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" />
+ </li>
+ <li>
+ <h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" />
+ </li>
+ <li>
+ <h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" />
+ </li>
+ <li>
+ <h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" />
+ </li>
</ul>
</div>
</div>
xmlns:ui="http://java.sun.com/jsf/facelets">
<div class="footer">
<ul class="footer_nav">
- <li class="footer_link"><h:link outcome="login_index" title="#{msg.LINK_LOGIN_HOME_TITLE}" value="#{msg.LINK_LOGIN_HOME}" /></li>
- <li class="footer_link"><h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" target="_blank" /></li>
- <li class="footer_link"><h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" target="_blank" /></li>
- <li class="footer_link"><h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" target="_blank" /></li>
+ <li class="footer_link">
+ <h:link outcome="login_index" title="#{msg.LINK_LOGIN_HOME_TITLE}" value="#{msg.LINK_LOGIN_HOME}" />
+ </li>
+ <li class="footer_link">
+ <h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" target="_blank" />
+ </li>
+ <li class="footer_link">
+ <h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" target="_blank" />
+ </li>
+ <li class="footer_link">
+ <h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" target="_blank" />
+ </li>
<li class="footer_copyright">Copyright (c) 2015 by Roland Häder</li>
</ul>
</div>
</div>
<ul>
- <li><h:link title="#{msg.LINK_LOGIN_HOME_TITLE}" outcome="login_index" value="#{msg.LINK_LOGIN_HOME}" /></li>
- <li><h:link title="#{msg.LINK_LOGIN_USER_LIST_TITLE}" outcome="login_user_list" value="#{msg.LINK_LOGIN_USER_LIST}" /></li>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_HOME_TITLE}" outcome="login_index" value="#{msg.LINK_LOGIN_HOME}" />
+ </li>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_USER_LIST_TITLE}" outcome="login_user_list" value="#{msg.LINK_LOGIN_USER_LIST}" />
+ </li>
</ul>
<div class="menu_header">
</div>
<ul>
- <li><h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="login_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" /></li>
- <li><h:link title="#{msg.LINK_LOGIN_EDIT_ADDRESS_TITLE}" outcome="login_edit_address" value="#{msg.LINK_LOGIN_EDIT_ADDRESS}" /></li>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="login_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
+ </li>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_EDIT_ADDRESS_TITLE}" outcome="login_edit_address" value="#{msg.LINK_LOGIN_EDIT_ADDRESS}" />
+ </li>
</ul>
<div class="menu_header">
</div>
<ul>
- <li><h:link title="#{msg.LINK_LOGIN_OWN_ADDRESSBOOKS_TITLE}" outcome="login_own_addressbooks" value="#{msg.LINK_LOGIN_OWN_ADDRESSBOOKS}" /></li>
- <li><h:link title="#{msg.LINK_LOGIN_OTHER_ADDRESSBOOKS_TITLE}" outcome="login_other_addressbooks" value="#{msg.LINK_LOGIN_OTHER_ADDRESSBOOKS}" /></li>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_OWN_ADDRESSBOOKS_TITLE}" outcome="login_own_addressbooks" value="#{msg.LINK_LOGIN_OWN_ADDRESSBOOKS}" />
+ </li>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_OTHER_ADDRESSBOOKS_TITLE}" outcome="login_other_addressbooks" value="#{msg.LINK_LOGIN_OTHER_ADDRESSBOOKS}" />
+ </li>
</ul>
<div class="menu_header">
</div>
<ul>
- <li><h:link title="#{msg.LINK_LOGIN_LOGOUT_TITLE}" outcome="logout" value="#{msg.LINK_LOGIN_LOGOUT}" /></li>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_LOGOUT_TITLE}" outcome="logout" value="#{msg.LINK_LOGIN_LOGOUT}" />
+ </li>
</ul>
</div>
</div>