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="-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 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.PizzaService-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.PizzaService-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"/>
- <Scope Scope="Project">
- <Node id="admin/admin_logout.xhtml" x="400" y="600" zoom="true"/>
- <Node id="item_added.xhtml" x="1150" y="150" zoom="true"/>
- <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
- <Node id="*" x="150" y="300" zoom="true"/>
- <Node id="customer/register.xhtml" x="650" y="150" zoom="true"/>
- <Node id="errorHandler.xhtml" x="900" y="450" zoom="true"/>
- <Node id="terms.xhtml" x="650" y="300" zoom="true"/>
- <Node id="customer/checkout.xhtml" x="400" y="150" zoom="true"/>
- <Node id="bye.xhtml" x="650" y="450" zoom="true"/>
- <Node id="privacy.xhtml" x="150" y="150" zoom="true"/>
- <Node id="customer/checkout2.xhtml" x="150" y="750" zoom="true"/>
- <Node id="index.xhtml" x="1400" y="150" zoom="true"/>
- <Node id="imprint.xhtml" x="1150" y="300" zoom="true"/>
- <Node id="admin/category.xhtml" x="150" y="600" zoom="true"/>
- <Node id="customer/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
- <Node id="basket.xhtml" x="900" y="150" zoom="true"/>
- <Node id="admin/product.xhtml" x="150" y="450" zoom="true"/>
- <Node id="customer/login.xhtml" x="900" y="300" zoom="true"/>
- </Scope>
- <Scope Scope="All Faces Configurations"/>
+ <Scope Scope="Faces Configuration Only"/>
+ <Scope Scope="Project">
+ <Node id="admin/admin_logout.xhtml" x="400" y="600" zoom="true"/>
+ <Node id="item_added.xhtml" x="1150" y="150" zoom="true"/>
+ <Node id="admin/index.xhtml" x="400" y="300" zoom="true"/>
+ <Node id="*" x="150" y="300" zoom="true"/>
+ <Node id="customer/register.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="errorHandler.xhtml" x="900" y="450" zoom="true"/>
+ <Node id="terms.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="customer/checkout.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="bye.xhtml" x="650" y="450" zoom="true"/>
+ <Node id="privacy.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="customer/checkout2.xhtml" x="150" y="750" zoom="true"/>
+ <Node id="index.xhtml" x="1400" y="150" zoom="true"/>
+ <Node id="imprint.xhtml" x="1150" y="300" zoom="true"/>
+ <Node id="admin/category.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="customer/lost_passwd.xhtml" x="400" y="450" zoom="true"/>
+ <Node id="basket.xhtml" x="900" y="150" zoom="true"/>
+ <Node id="admin/product.xhtml" x="150" y="450" zoom="true"/>
+ <Node id="customer/login.xhtml" x="900" y="300" zoom="true"/>
+ </Scope>
+ <Scope Scope="All Faces Configurations"/>
</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>PizzaService-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.jcore-logger-lib.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.jshop-core.jar}</file>
- <path-in-war>WEB-INF/lib</path-in-war>
- </library>
- <library dirs="200">
- <file>${file.reference.jshop-ee-lib.jar}</file>
- <path-in-war>WEB-INF/lib</path-in-war>
- </library>
- <library dirs="200">
- <file>${reference.PizzaService-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>
- <library dirs="200">
- <file>${file.reference.log4j-api-2.3.jar}</file>
- <path-in-war>WEB-INF/lib</path-in-war>
- </library>
- <library dirs="200">
- <file>${file.reference.log4j-core-2.3.jar}</file>
- <path-in-war>WEB-INF/lib</path-in-war>
- </library>
- <library dirs="200">
- <file>${file.reference.log4j-web-2.3.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>PizzaService-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>PizzaService-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.jcore-logger-lib.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.jshop-core.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jshop-ee-lib.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${reference.PizzaService-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>
+ <library dirs="200">
+ <file>${file.reference.log4j-api-2.3.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.log4j-core-2.3.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.log4j-web-2.3.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>PizzaService-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>
/**
* A converter for transfering category objects
- *
+ * <p>
* @author Roland Haeder
*/
@FacesConverter (forClass = ProductCategory.class, value = "category")
try {
// Get initial context
Context context = new InitialContext();
-
+
// Lookup logger
this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
} catch (final NamingException ex) {
Long categoryId = Long.parseLong(submittedValue);
// Category id should not be below 1
- assert(categoryId > 0) : "categoryId is smaller than one: " + categoryId; //NOI18N
+ assert (categoryId > 0) : "categoryId is smaller than one: " + categoryId; //NOI18N
// Debug message
this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: categoryId={0}", categoryId)); //NOI18N
/**
* An abstract web web bean for web applications. This class currently only
* handles loading the resource bundle (i18n).
- *
+ * <p>
* @author Roland Haeder
*/
public abstract class AbstractWebBean implements Serializable {
/**
* Getter for bundle instance
- *
+ * <p>
* @return Bundle instance
*/
protected ResourceBundle getBundle () {
/**
* Getter for message from given key
- *
+ * <p>
* @param key Key to get message from
* @return Message
*/
/**
* A bean for the basket
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("basketController")
@SessionScoped
-public class BasketWebBean implements BasketWebController {
+public class BasketWebBean implements BasketWebController {
/**
* Serial number
// Trace message
//this.getLogger().logTrace(MessageFormat.format("addItem: item {0} - has been added to basket. - EXIT!", item));
-
// Added
return "item_added"; //NOI18N
} catch (final BasketItemAlreadyAddedException ex) {
// Trace message
//this.getLogger().logTrace(MessageFormat.format("allItems: list={0} - EXIT!", list));
-
// Return it
return list;
}
// Trace message
//this.getLogger().logTrace(MessageFormat.format("calculateCurrentItemPrice: totalPrice={0} - EXIT!", totalPrice));
-
// Return it
return totalPrice;
}
// Trace message
//this.getLogger().logTrace(MessageFormat.format("calculateItemPrice: totalPrice={0} - EXIT!", totalPrice));
-
// Return it
return totalPrice;
}
// Trace message
//this.getLogger().logTrace(MessageFormat.format("calculateTotalPrice: totalPrice={0} - EXIT!", totalPrice));
-
// Return final sum
return totalPrice;
}
// Trace message
//this.getLogger().logTrace(MessageFormat.format("changeItem: targetPage={0} - EXIT!", targetPage));
-
// Return page
return targetPage;
}
// Trace message
//this.getLogger().logTrace(MessageFormat.format("getItemAmount: itemAmount={0} - EXIT!", itemAmount));
-
// Return it
return itemAmount;
}
// Debug message
//this.getLogger().logDebug(MessageFormat.format("isProductAdded: fake={0}", fake));
-
// Ask bean about it
boolean isAdded = this.basket.isAdded(fake);
// Debug message
//this.getLogger().logDebug(MessageFormat.format("isProductAdded: isAdded={0}", isAdded));
-
// Is it added?
if (isAdded) {
// Get item
// Debug message
//this.getLogger().logDebug(MessageFormat.format("isProductAdded: item={0} - setting as current item.", item));
-
// Set this as current item
this.setCurrentItem(item);
}
// Trace message
//this.getLogger().logTrace(MessageFormat.format("isProductAdded: isAdded={0} - EXIT!", isAdded));
-
// Return status
return isAdded;
}
// Trace message
//this.getLogger().logTrace(MessageFormat.format("outputLastAddedItem: lastItem={0} - EXIT!", lastItem));
-
// Return it
return lastItem;
}
/**
* Getter for basket bean instance
- *
+ * <p>
* @return Basket bean instance
*/
private BasketSessionBeanRemote getBasketBean () {
* Somewhat getter for an item instance from given product instance. This
* method returns null if no item was found to given product. The product is
* found by checking it's id and itemType=product
- *
+ * <p>
* @param product Product instance
* @return Item instance or null if not found
*/
// Debug message
//this.getLogger().logDebug(MessageFormat.format("getItemFromProduct: fake={0}", fake));
-
// Get all items
List<AddableBasketItem> list = this.basket.getAll();
// Debug message
//this.getLogger().logDebug(MessageFormat.format("getItemFromProduct: list={0}", list));
-
// Check all entries
for (final AddableBasketItem item : list) {
// Debug message
// Trace message
//this.getLogger().logTrace(MessageFormat.format("getItemFromProduct: foundItem={0} - EXIT!", foundItem));
-
// Return it
return foundItem;
}
/**
* An interface for a basket
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface BasketWebController extends Serializable {
/**
* Adds given product instance to basket by adding amount from form data to
* it.
- *
+ * <p>
* @param product Product instance to add
* @return Redirect target or null
*/
/**
* Gets for all added items
- *
+ * <p>
* @return A list of all added items
*/
public List<AddableBasketItem> allItems ();
/**
* Calculates total price (no tax added) of current item. If no current item
* is set and no amount, a NPE is thrown.
- *
+ * <p>
* @return Current item's total price
*/
public Float calculateCurrentItemPrice ();
/**
* Calculates total price (no tax added) for given item.
- *
+ * <p>
* @param item Item instance to calculate total price for
* @return Total price
*/
/**
* Calculates total sum (no tax added) for all items
- *
+ * <p>
* @return Total price of all items
*/
public Float calculateTotalPrice ();
/**
* Changes given item instance's amount in basket and redirects to proper
* page. If the item is not found, another "error" page is called.
- *
+ * <p>
* @param item Item instance to change
* @return Page redirection
*/
/**
* Getter for item amount property
- *
+ * <p>
* @return Item amount property
*/
public Long getOrderedAmount ();
/**
* Setter for item amount property
- *
+ * <p>
* @param amount Item amount property
*/
public void setOrderedAmount (final Long amount);
/**
* Getter for current item
- *
+ * <p>
* @return Current item
*/
public AddableBasketItem getCurrentItem ();
/**
* Setter for current item
- *
+ * <p>
* @param currentItem Current item
*/
public void setCurrentItem (final AddableBasketItem currentItem);
* Some getter for item amount of given product. This method requires a full
* iteration over all items in the basket to look for proper product
* instance.
- *
+ * <p>
* @param product Product instance
* @return Item amount of given product
*/
/**
* Getter for last entry
- *
+ * <p>
* @return Last added item in basket
*/
public AddableBasketItem getLast ();
/**
* Getter for last num rows
- *
+ * <p>
* @return Last num rows
*/
public int getLastNumRows ();
/**
* Checks whether the basket has items in it. This method is wrapper to
* isEmpty()
- *
+ * <p>
* @return Whether the basket is empty
*/
public boolean hasItems ();
/**
* Checks whether the basket is empty
- *
+ * <p>
* @return Whether the basket is empty
*/
public boolean isEmpty ();
/**
* Checks whether the currently set product is added in basked
- *
+ * <p>
* @param product Product instance
* @return Whether the product is added
*/
/**
* Outputs last added item in the basket.
- *
+ * <p>
* @return Last added item
*/
public String outputLastAddedItem ();
/**
* Main application class
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("admin_category")
/**
* An interface for product controllers for "ADMIN" role
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface AdminCategoryWebController {
/**
* Adds given category data from request to database
- *
+ * <p>
* @throws javax.faces.view.facelets.FaceletException If something
* unexpected happened
*/
/**
* Getter for parent id
- *
+ * <p>
* @return Parent id
*/
public Category getParentCategory ();
/**
* Setter for parent category
- *
+ * <p>
* @param parentCategory Parent category to set
*/
public void setParentCategory (final Category parentCategory);
/**
* Getter for category title
- *
+ * <p>
* @return the title
*/
public String getCategoryTitle ();
/**
* Setter for category title
- *
+ * <p>
* @param categoryTitle the title to set
*/
public void setCategoryTitle (final String categoryTitle);
/**
* Checkout controller
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("checkoutController")
// Debug message
//this.getLogger().logDebug(MessageFormat.format("doCheckout: customer={0}", this.getCustomer()));
-
// Get ordered list
List<AddableBasketItem> list = this.basketController.allItems();
// Debug message
//this.getLogger().logTrace(MessageFormat.format("doCheckout: list={0}", list));
-
// Construct container
WrapableCheckout wrapper = new CheckoutWrapper();
wrapper.setCustomer(this.getCustomer());
/**
* An interface for the shop
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface CheckoutWebController extends Serializable {
/**
* Runs the actual checkout and returns a proper page redirection target.
- *
+ * <p>
* @return Page redirection target
*/
public String doCheckout ();
/**
* Getter for customer instance
- *
+ * <p>
* @return Customer instance
*/
public Customer getCustomer ();
/**
* Setter for customer instance
- *
+ * <p>
* @param customer Customer instance
*/
public void setCustomer (final Customer customer);
/**
* A customer bean which hides the customer instance
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("customerController")
*/
private static final long serialVersionUID = 542_145_347_916L;
-
/////////////////////// Properties /////////////////////
/**
* Cellphone number
// Trace message
//this.getLogger().logTrace(MessageFormat.format("createInstance: customer={0} - EXIT!", customer));
-
// Return it
return customer;
}
/**
* An interface for customer beans
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface CustomerWebController extends Serializable {
/**
* Creates an instance from all properties
- *
+ * <p>
* @return A Customer instance
*/
public Customer createCustomerInstance ();
/**
* Cellphone number
- *
+ * <p>
* @return the cellphoneNumber
*/
public String getCellphoneNumber ();
/**
* Cellphone number
- *
+ * <p>
* @param cellphoneNumber the cellphoneNumber to set
*/
public void setCellphoneNumber (final String cellphoneNumber);
/**
* City
- *
+ * <p>
* @return the city
*/
public String getCity ();
/**
* City
- *
+ * <p>
* @param city the city to set
*/
public void setCity (final String city);
/**
* Company name
- *
+ * <p>
* @return the companyName
*/
public String getCompanyName ();
/**
* Company name
- *
+ * <p>
* @param companyName the companyName to set
*/
public void setCompanyName (final String companyName);
/**
* Country code
- *
+ * <p>
* @return the countryCode
*/
public String getCountryCode ();
/**
* Country code
- *
+ * <p>
* @param countryCode the countryCode to set
*/
public void setCountryCode (final String countryCode);
/**
* Email address
- *
+ * <p>
* @return the emailAddress
*/
public String getEmailAddress ();
/**
* Email address
- *
+ * <p>
* @param emailAddress the emailAddress to set
*/
public void setEmailAddress (final String emailAddress);
/**
* Family name
- *
+ * <p>
* @return the familyName
*/
public String getFamilyName ();
/**
* Family name
- *
+ * <p>
* @param familyName the familyName to set
*/
public void setFamilyName (final String familyName);
/**
* Fax number
- *
+ * <p>
* @return the faxNumber
*/
public String getFaxNumber ();
/**
* Fax number
- *
+ * <p>
* @param faxNumber the faxNumber to set
*/
public void setFaxNumber (final String faxNumber);
/**
* First name
- *
+ * <p>
* @return the first name
*/
public String getFirstName ();
/**
* First name
- *
+ * <p>
* @param firstName the first name to set
*/
public void setFirstName (final String firstName);
/**
* Gender of the contact
- *
+ * <p>
* @return the gender
*/
public Gender getGender ();
/**
* Gender of the contact
- *
+ * <p>
* @param gender the gender to set
*/
public void setGender (final Gender gender);
/**
* House number
- *
+ * <p>
* @return the houseNumber
*/
public Short getHouseNumber ();
/**
* House number
- *
+ * <p>
* @param houseNumber the houseNumber to set
*/
public void setHouseNumber (final Short houseNumber);
/**
* Phone number
- *
+ * <p>
* @return the phoneNumber
*/
public String getPhoneNumber ();
/**
* Phone number
- *
+ * <p>
* @param phoneNumber the phoneNumber to set
*/
public void setPhoneNumber (final String phoneNumber);
/**
* Street
- *
+ * <p>
* @return the street
*/
public String getStreet ();
/**
* Street
- *
+ * <p>
* @param street the street to set
*/
public void setStreet (final String street);
/**
* ZIP code
- *
+ * <p>
* @return the zipCode
*/
public Long getZipCode ();
/**
* ZIP code
- *
+ * <p>
* @param zipCode the zipCode to set
*/
public void setZipCode (final Long zipCode);
/**
* Checks whether all required personal data is set
- *
+ * <p>
* @return Whether the required personal data is set
*/
public boolean isRequiredPersonalDataSet ();
/**
* A customer bean which hides the customer instance
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("gender")
/**
* An interface for data beans
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface GenderWebController extends Serializable {
/**
* Getter for all genders as array
- *
+ * <p>
* @return All genders as array
*/
public Gender[] getAllGenders ();
/**
* Getter for only selectable genders as array, UNKNOWN is not selectable
- *
+ * <p>
* @return All genders as array
*/
public List<Gender> getSelectableGenders ();
/**
* Main application class
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("admin_product")
/**
* An interface for product controllers for "ADMIN" role
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface AdminProductWebController {
/**
* Adds given product data from request to database
- *
+ * <p>
* @throws javax.faces.view.facelets.FaceletException If something
* unexpected happened
*/
/**
* Some "getter" for a linked list of all products
- *
+ * <p>
* @return All products
* @throws javax.faces.view.facelets.FaceletException If anything went wrong
*/
/**
* Getter for product's available property
- *
+ * <p>
* @return Product's available property
*/
public Boolean getProductAvailability ();
/**
* Setter for product's available property
- *
+ * <p>
* @param available Product's available property
*/
public void setProductAvailability (final Boolean available);
/**
* Getter for product's category
- *
+ * <p>
* @return Product's category
*/
public Category getProductCategory ();
/**
* Setter for product's category instance
- *
+ * <p>
* @param productCategory Product's category instance
*/
public void setProductCategory (final Category productCategory);
/**
* Getter for product's price property
- *
+ * <p>
* @return Product's price property
*/
public Float getProductPrice ();
/**
* Setter for product's price property
- *
+ * <p>
* @param price Product's price property
*/
public void setProductPrice (final Float price);
/**
* Getter for product's title property
- *
+ * <p>
* @return Product's title
*/
public String getProductTitle ();
/**
* Setter for product's title property
- *
+ * <p>
* @param title Product's title
*/
public void setProductTitle (final String title);
/**
* Checkout controller
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("receiptController")
/**
* An interface for the shop
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface ReceiptWebController extends Serializable {
/**
* Fetches last access key for given customer instance
- *
+ * <p>
* @return Access key to receipt
*/
public String fetchAccessKey ();
/**
* Getter for customer instamce
- *
+ * <p>
* @return Customer instance
*/
public Customer getCustomer ();
/**
* Setter for customer instamce
- *
+ * <p>
* @param customer Customer instance
*/
public void setCustomer (final Customer customer);
/**
* General shop controller
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
@Named ("controller")
// TODO Find something better here to prevent warning
return Collections.unmodifiableList(this.availableProducts);
}
-
+
/**
* Initialization of this bean
*/
try {
// Get initial context
Context context = new InitialContext();
-
+
// Try to lookup the bean
CategorySessionBeanRemote categoryBean = (CategorySessionBeanRemote) context.lookup("ejb/stateless-category"); //NOI18N
-
+
// Get all categories
this.categories = categoryBean.getAllCategories();
-
+
// Try to lookup the bean
ProductSessionBeanRemote productBean = (ProductSessionBeanRemote) context.lookup("ejb/stateless-product"); //NOI18N
-
+
// Get available products list
this.availableProducts = productBean.getAvailableProducts();
} catch (final NamingException e) {
/**
* An interface for the shop
- *
+ * <p>
* @author Roland Haeder<roland@mxchange.org>
*/
public interface ShopWebController extends Serializable {
/**
* Adds given category to the "cached" instance
- *
+ * <p>
* @param category Category instance
*/
public void addCategory (final Category category);
/**
* Adds given product to the "cached" instance
- *
+ * <p>
* @param product Product instance
*/
public void addProduct (final Product product);
/**
* Some "getter" for a linked list of all categories
- *
+ * <p>
* @return All categories
* @throws javax.faces.view.facelets.FaceletException If anything went wrong
*/
/**
* Some "getter" for a linked list of all categories including "Has no
* parent" fake category.
- *
+ * <p>
* @return All categories
* @throws javax.faces.view.facelets.FaceletException If anything went wrong
*/
/**
* Some "getter" for a linked list of only available products
- *
+ * <p>
* @return Only available products
* @throws javax.faces.view.facelets.FaceletException If anything went wrong
*/
/**
* A servlet for a PDF receipt (official)
- *
+ * <p>
* @author Roland Haeder
*/
public class PdfReceiptServlet extends HttpServlet {