diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..3d0f408 --- /dev/null +++ b/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project onlinegaragesale. + + + diff --git a/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar new file mode 100644 index 0000000..38246fd Binary files /dev/null and b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar differ diff --git a/lib/antlr-2.7.7.jar b/lib/antlr-2.7.7.jar new file mode 100644 index 0000000..5e5f14b Binary files /dev/null and b/lib/antlr-2.7.7.jar differ diff --git a/lib/aopalliance-1.0.jar b/lib/aopalliance-1.0.jar new file mode 100644 index 0000000..578b1a0 Binary files /dev/null and b/lib/aopalliance-1.0.jar differ diff --git a/lib/commons-collections-3.2.1.jar b/lib/commons-collections-3.2.1.jar new file mode 100644 index 0000000..c35fa1f Binary files /dev/null and b/lib/commons-collections-3.2.1.jar differ diff --git a/lib/commons-dbcp-1.4.jar b/lib/commons-dbcp-1.4.jar new file mode 100644 index 0000000..c4c1c4f Binary files /dev/null and b/lib/commons-dbcp-1.4.jar differ diff --git a/lib/commons-logging-1.1.1.jar b/lib/commons-logging-1.1.1.jar new file mode 100644 index 0000000..1deef14 Binary files /dev/null and b/lib/commons-logging-1.1.1.jar differ diff --git a/lib/commons-pool-1.5.4.jar b/lib/commons-pool-1.5.4.jar new file mode 100644 index 0000000..43edf99 Binary files /dev/null and b/lib/commons-pool-1.5.4.jar differ diff --git a/lib/derbyclient.jar b/lib/derbyclient.jar new file mode 100644 index 0000000..7359111 Binary files /dev/null and b/lib/derbyclient.jar differ diff --git a/lib/dom4j-1.6.1.jar b/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..c8c4dbb Binary files /dev/null and b/lib/dom4j-1.6.1.jar differ diff --git a/lib/hibernate-commons-annotations-4.0.1.Final.jar b/lib/hibernate-commons-annotations-4.0.1.Final.jar new file mode 100644 index 0000000..ac9d674 Binary files /dev/null and b/lib/hibernate-commons-annotations-4.0.1.Final.jar differ diff --git a/lib/hibernate-core-4.1.0.Final.jar b/lib/hibernate-core-4.1.0.Final.jar new file mode 100644 index 0000000..cf383ba Binary files /dev/null and b/lib/hibernate-core-4.1.0.Final.jar differ diff --git a/lib/hibernate-entitymanager-4.1.0.Final.jar b/lib/hibernate-entitymanager-4.1.0.Final.jar new file mode 100644 index 0000000..6a28e19 Binary files /dev/null and b/lib/hibernate-entitymanager-4.1.0.Final.jar differ diff --git a/lib/hibernate-envers-4.1.0.Final.jar b/lib/hibernate-envers-4.1.0.Final.jar new file mode 100644 index 0000000..0102407 Binary files /dev/null and b/lib/hibernate-envers-4.1.0.Final.jar differ diff --git a/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar b/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar new file mode 100644 index 0000000..1e9f71b Binary files /dev/null and b/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar differ diff --git a/lib/jackson-all-1.9.6.jar b/lib/jackson-all-1.9.6.jar new file mode 100644 index 0000000..df87026 Binary files /dev/null and b/lib/jackson-all-1.9.6.jar differ diff --git a/lib/jackson-annotations-2.0.0.jar b/lib/jackson-annotations-2.0.0.jar new file mode 100644 index 0000000..7e20bb2 Binary files /dev/null and b/lib/jackson-annotations-2.0.0.jar differ diff --git a/lib/jackson-core-2.0.0.jar b/lib/jackson-core-2.0.0.jar new file mode 100644 index 0000000..65e55a6 Binary files /dev/null and b/lib/jackson-core-2.0.0.jar differ diff --git a/lib/jackson-databind-2.0.0.jar b/lib/jackson-databind-2.0.0.jar new file mode 100644 index 0000000..30987ef Binary files /dev/null and b/lib/jackson-databind-2.0.0.jar differ diff --git a/lib/javaee-endorsed-api-6.0/javaee6-doc-api.zip b/lib/javaee-endorsed-api-6.0/javaee6-doc-api.zip new file mode 100644 index 0000000..03fe1cc Binary files /dev/null and b/lib/javaee-endorsed-api-6.0/javaee6-doc-api.zip differ diff --git a/lib/javaee-endorsed-api-6.0/javax.annotation.jar b/lib/javaee-endorsed-api-6.0/javax.annotation.jar new file mode 100644 index 0000000..ec4b372 Binary files /dev/null and b/lib/javaee-endorsed-api-6.0/javax.annotation.jar differ diff --git a/lib/javaee-endorsed-api-6.0/jaxb-api-osgi.jar b/lib/javaee-endorsed-api-6.0/jaxb-api-osgi.jar new file mode 100644 index 0000000..d167e2f Binary files /dev/null and b/lib/javaee-endorsed-api-6.0/jaxb-api-osgi.jar differ diff --git a/lib/javaee-endorsed-api-6.0/webservices-api-osgi.jar b/lib/javaee-endorsed-api-6.0/webservices-api-osgi.jar new file mode 100644 index 0000000..217424d Binary files /dev/null and b/lib/javaee-endorsed-api-6.0/webservices-api-osgi.jar differ diff --git a/lib/javassist-3.15.0-GA.jar b/lib/javassist-3.15.0-GA.jar new file mode 100644 index 0000000..5af8eae Binary files /dev/null and b/lib/javassist-3.15.0-GA.jar differ diff --git a/lib/jboss-logging-3.1.0.CR2.jar b/lib/jboss-logging-3.1.0.CR2.jar new file mode 100644 index 0000000..cd095e6 Binary files /dev/null and b/lib/jboss-logging-3.1.0.CR2.jar differ diff --git a/lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar b/lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar new file mode 100644 index 0000000..b3bf81f Binary files /dev/null and b/lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar differ diff --git a/lib/jettison-1.3.1.jar b/lib/jettison-1.3.1.jar new file mode 100644 index 0000000..cf7ae1a Binary files /dev/null and b/lib/jettison-1.3.1.jar differ diff --git a/lib/jstl-1.2.jar b/lib/jstl-1.2.jar new file mode 100644 index 0000000..0fd275e Binary files /dev/null and b/lib/jstl-1.2.jar differ diff --git a/lib/junit/junit-3.8.2-api.zip b/lib/junit/junit-3.8.2-api.zip new file mode 100644 index 0000000..3970a2a Binary files /dev/null and b/lib/junit/junit-3.8.2-api.zip differ diff --git a/lib/junit/junit-3.8.2.jar b/lib/junit/junit-3.8.2.jar new file mode 100644 index 0000000..c8f711d Binary files /dev/null and b/lib/junit/junit-3.8.2.jar differ diff --git a/lib/junit_4/junit-4.10-javadoc.jar b/lib/junit_4/junit-4.10-javadoc.jar new file mode 100644 index 0000000..d9184c4 Binary files /dev/null and b/lib/junit_4/junit-4.10-javadoc.jar differ diff --git a/lib/junit_4/junit-4.10-sources.jar b/lib/junit_4/junit-4.10-sources.jar new file mode 100644 index 0000000..75cdd86 Binary files /dev/null and b/lib/junit_4/junit-4.10-sources.jar differ diff --git a/lib/junit_4/junit-4.10.jar b/lib/junit_4/junit-4.10.jar new file mode 100644 index 0000000..954851e Binary files /dev/null and b/lib/junit_4/junit-4.10.jar differ diff --git a/lib/log4j-1.2.16.jar b/lib/log4j-1.2.16.jar new file mode 100644 index 0000000..5429a90 Binary files /dev/null and b/lib/log4j-1.2.16.jar differ diff --git a/lib/nblibraries.properties b/lib/nblibraries.properties new file mode 100644 index 0000000..30b9f3f --- /dev/null +++ b/lib/nblibraries.properties @@ -0,0 +1,23 @@ +libs.CopyLibs.classpath=\ + ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar +libs.CopyLibs.displayName=CopyLibs Task +libs.CopyLibs.prop-version=1.0 +libs.javaee-endorsed-api-6.0.classpath=\ + ${base}/javaee-endorsed-api-6.0/javax.annotation.jar;\ + ${base}/javaee-endorsed-api-6.0/jaxb-api-osgi.jar;\ + ${base}/javaee-endorsed-api-6.0/webservices-api-osgi.jar +libs.javaee-endorsed-api-6.0.displayName=Java EE 6 Endorsed API Library +libs.javaee-endorsed-api-6.0.javadoc=\ + ${base}/javaee-endorsed-api-6.0/javaee6-doc-api.zip +libs.junit.classpath=\ + ${base}/junit/junit-3.8.2.jar +libs.junit.displayName=JUnit 3.8.2 +libs.junit.javadoc=\ + ${base}/junit/junit-3.8.2-api.zip +libs.junit_4.classpath=\ + ${base}/junit_4/junit-4.10.jar +libs.junit_4.displayName=JUnit 4.10 +libs.junit_4.javadoc=\ + ${base}/junit_4/junit-4.10-javadoc.jar +libs.junit_4.src=\ + ${base}/junit_4/junit-4.10-sources.jar diff --git a/lib/org.springframework.aop-3.1.1.RELEASE.jar b/lib/org.springframework.aop-3.1.1.RELEASE.jar new file mode 100644 index 0000000..73ba404 Binary files /dev/null and b/lib/org.springframework.aop-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.asm-3.1.1.RELEASE.jar b/lib/org.springframework.asm-3.1.1.RELEASE.jar new file mode 100644 index 0000000..20d7938 Binary files /dev/null and b/lib/org.springframework.asm-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.aspects-3.1.1.RELEASE.jar b/lib/org.springframework.aspects-3.1.1.RELEASE.jar new file mode 100644 index 0000000..27b138d Binary files /dev/null and b/lib/org.springframework.aspects-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.beans-3.1.1.RELEASE.jar b/lib/org.springframework.beans-3.1.1.RELEASE.jar new file mode 100644 index 0000000..a69bcb1 Binary files /dev/null and b/lib/org.springframework.beans-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.context-3.1.1.RELEASE.jar b/lib/org.springframework.context-3.1.1.RELEASE.jar new file mode 100644 index 0000000..a35e486 Binary files /dev/null and b/lib/org.springframework.context-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.context.support-3.1.1.RELEASE.jar b/lib/org.springframework.context.support-3.1.1.RELEASE.jar new file mode 100644 index 0000000..8e8fff4 Binary files /dev/null and b/lib/org.springframework.context.support-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.core-3.1.1.RELEASE.jar b/lib/org.springframework.core-3.1.1.RELEASE.jar new file mode 100644 index 0000000..bdd8944 Binary files /dev/null and b/lib/org.springframework.core-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.expression-3.1.1.RELEASE.jar b/lib/org.springframework.expression-3.1.1.RELEASE.jar new file mode 100644 index 0000000..0e445b9 Binary files /dev/null and b/lib/org.springframework.expression-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.instrument-3.1.1.RELEASE.jar b/lib/org.springframework.instrument-3.1.1.RELEASE.jar new file mode 100644 index 0000000..79c418b Binary files /dev/null and b/lib/org.springframework.instrument-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.jdbc-3.1.1.RELEASE.jar b/lib/org.springframework.jdbc-3.1.1.RELEASE.jar new file mode 100644 index 0000000..82b836a Binary files /dev/null and b/lib/org.springframework.jdbc-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.jms-3.1.1.RELEASE.jar b/lib/org.springframework.jms-3.1.1.RELEASE.jar new file mode 100644 index 0000000..a71e62d Binary files /dev/null and b/lib/org.springframework.jms-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.orm-3.1.1.RELEASE.jar b/lib/org.springframework.orm-3.1.1.RELEASE.jar new file mode 100644 index 0000000..5e5f16d Binary files /dev/null and b/lib/org.springframework.orm-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.oxm-3.1.1.RELEASE.jar b/lib/org.springframework.oxm-3.1.1.RELEASE.jar new file mode 100644 index 0000000..0e9cc68 Binary files /dev/null and b/lib/org.springframework.oxm-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.test-3.1.1.RELEASE.jar b/lib/org.springframework.test-3.1.1.RELEASE.jar new file mode 100644 index 0000000..b5cd075 Binary files /dev/null and b/lib/org.springframework.test-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.transaction-3.1.1.RELEASE.jar b/lib/org.springframework.transaction-3.1.1.RELEASE.jar new file mode 100644 index 0000000..824e3c3 Binary files /dev/null and b/lib/org.springframework.transaction-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.web-3.1.1.RELEASE.jar b/lib/org.springframework.web-3.1.1.RELEASE.jar new file mode 100644 index 0000000..42ed92c Binary files /dev/null and b/lib/org.springframework.web-3.1.1.RELEASE.jar differ diff --git a/lib/org.springframework.web.servlet-3.1.1.RELEASE.jar b/lib/org.springframework.web.servlet-3.1.1.RELEASE.jar new file mode 100644 index 0000000..8e27a5b Binary files /dev/null and b/lib/org.springframework.web.servlet-3.1.1.RELEASE.jar differ diff --git a/lib/slf4j-api-1.6.1.jar b/lib/slf4j-api-1.6.1.jar new file mode 100644 index 0000000..f1f4fdd Binary files /dev/null and b/lib/slf4j-api-1.6.1.jar differ diff --git a/nbproject/ant-deploy.xml b/nbproject/ant-deploy.xml new file mode 100644 index 0000000..9bc5adf --- /dev/null +++ b/nbproject/ant-deploy.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..0b5c724 --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +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 +<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: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..f266740 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=b22a833e +build.xml.script.CRC32=141248ca +build.xml.stylesheet.CRC32=651128d4@1.38.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=b22a833e +nbproject/build-impl.xml.script.CRC32=4e4bdc21 +nbproject/build-impl.xml.stylesheet.CRC32=4e9cae83@1.38.1.1 diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..0fbd51e --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,165 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processor.options=-Aeclipselink.canonicalmodel.use_static_factory=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +file.reference.antlr-2.7.7.jar=lib/antlr-2.7.7.jar +file.reference.aopalliance-1.0.jar=lib/aopalliance-1.0.jar +file.reference.commons-collections-3.2.1.jar=lib/commons-collections-3.2.1.jar +file.reference.commons-dbcp-1.4.jar=lib/commons-dbcp-1.4.jar +file.reference.commons-logging-1.1.1.jar=lib/commons-logging-1.1.1.jar +file.reference.commons-pool-1.5.4.jar=lib/commons-pool-1.5.4.jar +file.reference.derbyclient.jar=lib/derbyclient.jar +file.reference.dom4j-1.6.1.jar=lib/dom4j-1.6.1.jar +file.reference.hibernate-commons-annotations-4.0.1.Final.jar=lib/hibernate-commons-annotations-4.0.1.Final.jar +file.reference.hibernate-core-4.1.0.Final.jar=lib/hibernate-core-4.1.0.Final.jar +file.reference.hibernate-entitymanager-4.1.0.Final.jar=lib/hibernate-entitymanager-4.1.0.Final.jar +file.reference.hibernate-envers-4.1.0.Final.jar=lib/hibernate-envers-4.1.0.Final.jar +file.reference.hibernate-jpa-2.0-api-1.0.1.Final.jar=lib/hibernate-jpa-2.0-api-1.0.1.Final.jar +file.reference.jackson-all-1.9.6.jar=lib/jackson-all-1.9.6.jar +file.reference.jackson-annotations-2.0.0.jar=lib/jackson-annotations-2.0.0.jar +file.reference.jackson-core-2.0.0.jar=lib/jackson-core-2.0.0.jar +file.reference.jackson-databind-2.0.0.jar=lib/jackson-databind-2.0.0.jar +file.reference.javassist-3.15.0-GA.jar=lib/javassist-3.15.0-GA.jar +file.reference.jboss-logging-3.1.0.CR2.jar=lib/jboss-logging-3.1.0.CR2.jar +file.reference.jboss-transaction-api_1.1_spec-1.0.0.Final.jar=lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar +file.reference.jettison-1.3.1.jar=lib/jettison-1.3.1.jar +file.reference.jstl-1.2.jar=lib/jstl-1.2.jar +file.reference.log4j-1.2.16.jar=lib/log4j-1.2.16.jar +file.reference.org.springframework.aop-3.1.1.RELEASE.jar=lib/org.springframework.aop-3.1.1.RELEASE.jar +file.reference.org.springframework.asm-3.1.1.RELEASE.jar=lib/org.springframework.asm-3.1.1.RELEASE.jar +file.reference.org.springframework.aspects-3.1.1.RELEASE.jar=lib/org.springframework.aspects-3.1.1.RELEASE.jar +file.reference.org.springframework.beans-3.1.1.RELEASE.jar=lib/org.springframework.beans-3.1.1.RELEASE.jar +file.reference.org.springframework.context-3.1.1.RELEASE.jar=lib/org.springframework.context-3.1.1.RELEASE.jar +file.reference.org.springframework.context.support-3.1.1.RELEASE.jar=lib/org.springframework.context.support-3.1.1.RELEASE.jar +file.reference.org.springframework.core-3.1.1.RELEASE.jar=lib/org.springframework.core-3.1.1.RELEASE.jar +file.reference.org.springframework.expression-3.1.1.RELEASE.jar=lib/org.springframework.expression-3.1.1.RELEASE.jar +file.reference.org.springframework.instrument-3.1.1.RELEASE.jar=lib/org.springframework.instrument-3.1.1.RELEASE.jar +file.reference.org.springframework.jdbc-3.1.1.RELEASE.jar=lib/org.springframework.jdbc-3.1.1.RELEASE.jar +file.reference.org.springframework.jms-3.1.1.RELEASE.jar=lib/org.springframework.jms-3.1.1.RELEASE.jar +file.reference.org.springframework.orm-3.1.1.RELEASE.jar=lib/org.springframework.orm-3.1.1.RELEASE.jar +file.reference.org.springframework.oxm-3.1.1.RELEASE.jar=lib/org.springframework.oxm-3.1.1.RELEASE.jar +file.reference.org.springframework.test-3.1.1.RELEASE.jar=lib/org.springframework.test-3.1.1.RELEASE.jar +file.reference.org.springframework.transaction-3.1.1.RELEASE.jar=lib/org.springframework.transaction-3.1.1.RELEASE.jar +file.reference.org.springframework.web-3.1.1.RELEASE.jar=lib/org.springframework.web-3.1.1.RELEASE.jar +file.reference.org.springframework.web.servlet-3.1.1.RELEASE.jar=lib/org.springframework.web.servlet-3.1.1.RELEASE.jar +file.reference.slf4j-api-1.6.1.jar=lib/slf4j-api-1.6.1.jar +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.6-web +j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-3.7.2.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-util.jar +j2ee.server.type=Tomcat +jar.compress=false +javac.classpath=\ + ${file.reference.antlr-2.7.7.jar}:\ + ${file.reference.aopalliance-1.0.jar}:\ + ${file.reference.commons-collections-3.2.1.jar}:\ + ${file.reference.commons-dbcp-1.4.jar}:\ + ${file.reference.commons-logging-1.1.1.jar}:\ + ${file.reference.commons-pool-1.5.4.jar}:\ + ${file.reference.derbyclient.jar}:\ + ${file.reference.dom4j-1.6.1.jar}:\ + ${file.reference.hibernate-commons-annotations-4.0.1.Final.jar}:\ + ${file.reference.hibernate-core-4.1.0.Final.jar}:\ + ${file.reference.hibernate-entitymanager-4.1.0.Final.jar}:\ + ${file.reference.hibernate-envers-4.1.0.Final.jar}:\ + ${file.reference.hibernate-jpa-2.0-api-1.0.1.Final.jar}:\ + ${file.reference.jackson-all-1.9.6.jar}:\ + ${file.reference.jackson-annotations-2.0.0.jar}:\ + ${file.reference.jackson-core-2.0.0.jar}:\ + ${file.reference.jackson-databind-2.0.0.jar}:\ + ${file.reference.javassist-3.15.0-GA.jar}:\ + ${file.reference.jboss-logging-3.1.0.CR2.jar}:\ + ${file.reference.jboss-transaction-api_1.1_spec-1.0.0.Final.jar}:\ + ${file.reference.jettison-1.3.1.jar}:\ + ${file.reference.jstl-1.2.jar}:\ + ${file.reference.log4j-1.2.16.jar}:\ + ${file.reference.org.springframework.aop-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.asm-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.aspects-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.beans-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.context-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.context.support-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.core-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.expression-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.instrument-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.jdbc-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.jms-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.orm-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.oxm-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.test-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.transaction-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.web-3.1.1.RELEASE.jar}:\ + ${file.reference.org.springframework.web.servlet-3.1.1.RELEASE.jar}:\ + ${file.reference.slf4j-api-1.6.1.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.6 +javac.target=1.6 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit_4.classpath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=${war.name} +war.name=onlinegaragesale.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..31ab76c --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,186 @@ + + + org.netbeans.modules.web.project + + + onlinegaragesale + 1.6.5 + + + ${file.reference.antlr-2.7.7.jar} + WEB-INF/lib + + + ${file.reference.aopalliance-1.0.jar} + WEB-INF/lib + + + ${file.reference.commons-collections-3.2.1.jar} + WEB-INF/lib + + + ${file.reference.commons-dbcp-1.4.jar} + WEB-INF/lib + + + ${file.reference.commons-logging-1.1.1.jar} + WEB-INF/lib + + + ${file.reference.commons-pool-1.5.4.jar} + WEB-INF/lib + + + ${file.reference.derbyclient.jar} + WEB-INF/lib + + + ${file.reference.dom4j-1.6.1.jar} + WEB-INF/lib + + + ${file.reference.hibernate-commons-annotations-4.0.1.Final.jar} + WEB-INF/lib + + + ${file.reference.hibernate-core-4.1.0.Final.jar} + WEB-INF/lib + + + ${file.reference.hibernate-entitymanager-4.1.0.Final.jar} + WEB-INF/lib + + + ${file.reference.hibernate-envers-4.1.0.Final.jar} + WEB-INF/lib + + + ${file.reference.hibernate-jpa-2.0-api-1.0.1.Final.jar} + WEB-INF/lib + + + ${file.reference.jackson-all-1.9.6.jar} + WEB-INF/lib + + + ${file.reference.jackson-annotations-2.0.0.jar} + WEB-INF/lib + + + ${file.reference.jackson-core-2.0.0.jar} + WEB-INF/lib + + + ${file.reference.jackson-databind-2.0.0.jar} + WEB-INF/lib + + + ${file.reference.javassist-3.15.0-GA.jar} + WEB-INF/lib + + + ${file.reference.jboss-logging-3.1.0.CR2.jar} + WEB-INF/lib + + + ${file.reference.jboss-transaction-api_1.1_spec-1.0.0.Final.jar} + WEB-INF/lib + + + ${file.reference.jettison-1.3.1.jar} + WEB-INF/lib + + + ${file.reference.jstl-1.2.jar} + WEB-INF/lib + + + ${file.reference.log4j-1.2.16.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.aop-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.asm-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.aspects-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.beans-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.context-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.context.support-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.core-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.expression-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.instrument-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.jdbc-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.jms-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.orm-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.oxm-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.test-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.transaction-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.web-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.org.springframework.web.servlet-3.1.1.RELEASE.jar} + WEB-INF/lib + + + ${file.reference.slf4j-api-1.6.1.jar} + WEB-INF/lib + + + + + + + + + + + + .\lib\nblibraries.properties + + + diff --git a/src/conf/MANIFEST.MF b/src/conf/MANIFEST.MF new file mode 100644 index 0000000..58630c0 --- /dev/null +++ b/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/src/conf/persistence.xml b/src/conf/persistence.xml new file mode 100644 index 0000000..6d12760 --- /dev/null +++ b/src/conf/persistence.xml @@ -0,0 +1,7 @@ + + + + + com.onlinegaragesale.model.Student + + diff --git a/src/java/com/onlinegaragesale/app/conf/ApplicationContextProvider.java b/src/java/com/onlinegaragesale/app/conf/ApplicationContextProvider.java new file mode 100644 index 0000000..86c7372 --- /dev/null +++ b/src/java/com/onlinegaragesale/app/conf/ApplicationContextProvider.java @@ -0,0 +1,24 @@ +package com.onlinegaragesale.app.conf; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +/** + * File Name: ApplicationContextProvider.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.app.conf + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public class ApplicationContextProvider implements ApplicationContextAware +{ + + @Override + public void setApplicationContext(ApplicationContext ctx) throws BeansException + { + GetContext.setApplicationContext(ctx); + } +} \ No newline at end of file diff --git a/src/java/com/onlinegaragesale/app/conf/GetContext.java b/src/java/com/onlinegaragesale/app/conf/GetContext.java new file mode 100644 index 0000000..8160d86 --- /dev/null +++ b/src/java/com/onlinegaragesale/app/conf/GetContext.java @@ -0,0 +1,28 @@ +package com.onlinegaragesale.app.conf; + +import org.springframework.context.ApplicationContext; + +/** + * File Name: GetContext.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.app.conf + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public class GetContext +{ + + private static ApplicationContext ctx; + + public static void setApplicationContext(ApplicationContext applicationContext) + { + ctx = applicationContext; + } + + public static ApplicationContext getApplicationContext() + { + return ctx; + } +} diff --git a/src/java/com/onlinegaragesale/app/conf/applicationContext-connection.xml b/src/java/com/onlinegaragesale/app/conf/applicationContext-connection.xml new file mode 100644 index 0000000..3e5fa13 --- /dev/null +++ b/src/java/com/onlinegaragesale/app/conf/applicationContext-connection.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/onlinegaragesale/app/conf/servlet-context.xml b/src/java/com/onlinegaragesale/app/conf/servlet-context.xml new file mode 100644 index 0000000..7c6e92f --- /dev/null +++ b/src/java/com/onlinegaragesale/app/conf/servlet-context.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/onlinegaragesale/app/facade/Facade.java b/src/java/com/onlinegaragesale/app/facade/Facade.java new file mode 100644 index 0000000..54c0b5a --- /dev/null +++ b/src/java/com/onlinegaragesale/app/facade/Facade.java @@ -0,0 +1,28 @@ +package com.onlinegaragesale.app.facade; + +import com.onlinegaragesale.app.conf.GetContext; +import com.onlinegaragesale.services.crud.StudentCrudService; +import java.io.Serializable; +import org.springframework.context.ApplicationContext; + +/** + * File Name: Facade.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.app.facade + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public class Facade implements Serializable +{ + + private final static ApplicationContext ctx = GetContext.getApplicationContext(); + private StudentCrudService studentCrudService; + + public StudentCrudService getSampleCrudService() + { + studentCrudService = (StudentCrudService) ctx.getBean("studentCrudService"); + return studentCrudService; + } +} diff --git a/src/java/com/onlinegaragesale/app/factories/AppFactory.java b/src/java/com/onlinegaragesale/app/factories/AppFactory.java new file mode 100644 index 0000000..11ad4a2 --- /dev/null +++ b/src/java/com/onlinegaragesale/app/factories/AppFactory.java @@ -0,0 +1,22 @@ +package com.onlinegaragesale.app.factories; + +import com.onlinegaragesale.model.Student; +import java.util.Map; + +/** + * File Name: AppFactory.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.app.factories + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public class AppFactory +{ + + public static Student createSampleStudent(Map values) + { + return new Student(); + } +} diff --git a/src/java/com/onlinegaragesale/model/Name.java b/src/java/com/onlinegaragesale/model/Name.java new file mode 100644 index 0000000..84bcb65 --- /dev/null +++ b/src/java/com/onlinegaragesale/model/Name.java @@ -0,0 +1,41 @@ +package com.onlinegaragesale.model; + +import java.io.Serializable; +import javax.persistence.Embeddable; + +/** + * File Name: Name.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.model + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +@Embeddable +public class Name implements Serializable +{ + + private String firstName; + private String lastName; + + public String getFirstName() + { + return firstName; + } + + public void setFirstName(String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return lastName; + } + + public void setLastName(String lastName) + { + this.lastName = lastName; + } +} diff --git a/src/java/com/onlinegaragesale/model/Student.java b/src/java/com/onlinegaragesale/model/Student.java new file mode 100644 index 0000000..aced6cb --- /dev/null +++ b/src/java/com/onlinegaragesale/model/Student.java @@ -0,0 +1,108 @@ +package com.onlinegaragesale.model; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.*; + +/** + * File Name: Student.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.model + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +@Entity +public class Student implements Serializable +{ + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + private String studentNumber; + @Embedded + private Name name; + @Temporal(javax.persistence.TemporalType.DATE) + private Date dob; + + public Student() + { + } + + public Student(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setId(Long id) + { + this.id = id; + } + + public String getStudentNumber() + { + return studentNumber; + } + + public void setStudentNumber(String studentNumber) + { + this.studentNumber = studentNumber; + } + + public Name getName() + { + return name; + } + + public void setName(Name name) + { + this.name = name; + } + + public Date getDob() + { + return dob; + } + + public void setDob(Date dob) + { + this.dob = dob; + } + + @Override + public int hashCode() + { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @Override + public boolean equals(Object object) + { + // TODO: Warning - this method won't work in the case the id fields are not set + if (!(object instanceof Student)) + { + return false; + } + Student other = (Student) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) + { + return false; + } + return true; + } + + @Override + public String toString() + { + return "Student{" + "id=" + id + ", studentNumber=" + studentNumber + ", name=" + name + ", dob=" + dob + '}'; + } +} diff --git a/src/java/com/onlinegaragesale/presentation/web/controller/HomeController.java b/src/java/com/onlinegaragesale/presentation/web/controller/HomeController.java new file mode 100644 index 0000000..61c0987 --- /dev/null +++ b/src/java/com/onlinegaragesale/presentation/web/controller/HomeController.java @@ -0,0 +1,130 @@ +package com.onlinegaragesale.presentation.web.controller; + +import com.onlinegaragesale.app.facade.Facade; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * File Name: HomeController.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.presentation.web.controller + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +@Controller +public class HomeController +{ + + private final Facade facade = new Facade(); + private static final Logger logger = LoggerFactory.getLogger(HomeController.class); + + @RequestMapping( + { + "/" + }) + public String home() + { + return "index"; + } + + @RequestMapping(value = "/about.html", method = RequestMethod.GET) + public String getAbout(Model model) + { + return "about"; + } +// @RequestMapping(value = "/add.html", method = RequestMethod.GET) +// public String getAdd(Model model) +// { +// UniversityBean universityBean = new UniversityBean(); +// model.addAttribute("universityBean", universityBean); +// return "add"; +// } +// +// @RequestMapping(value = "/persist.html", method = RequestMethod.POST) +// public String persistUniversity(@Validated UniversityBean universityBean) +// { +// University university = new University(); +// university.setUniversityName(universityBean.getName()); +// +// facade.getUniversityCrudServcve().persist(university); +// +// return "index"; +// } +// +// @RequestMapping(value = "/delete.html", method = RequestMethod.GET) +// public String getDelete(Model model) +// { +// UniversityBean universityBean = new UniversityBean(); +// model.addAttribute("universityBean",universityBean); +// return "delete"; +// } +// +// @RequestMapping(value = "/deleteUniversity.html", method = RequestMethod.POST) +// public String getDeleteUniversity(@Validated UniversityBean universityBean) +// { +// +// University university = new University(); +// university.setUniversityName(universityBean.getName()); +// +// List universities = facade.getUniversityCrudServcve().findAll(); +// +// +// +// for(University uni:universities) +// { +// if(university.getUniversityName().equalsIgnoreCase( uni.getUniversityName())) +// { +// facade.getUniversityCrudServcve().removeById(uni.getId()); +// } +// } +// return "index"; +// } +// +// +// @RequestMapping(value = "/edit.html", method = RequestMethod.GET) +// public String getedit(Model model) +// { +// UniversityBean universityBean = new UniversityBean(); +// model.addAttribute("universityBean",universityBean); +// return "edit"; +// +// } +// +// @RequestMapping(value = "/editUniversity.html", method = RequestMethod.POST) +// public String geteditUniversity(@Validated UniversityBean universityBean) +// { +// University university = new University(); +// university.setUniversityName(universityBean.getName()); +// +// List universities = facade.getUniversityCrudServcve().findAll(); +// +// +// +// for(University uni:universities) +// { +// if(university.getUniversityName().equalsIgnoreCase( uni.getUniversityName())) +// { +// uni.setUniversityName(universityBean.getNewName()); +// facade.getUniversityCrudServcve().merge(uni); +// } +// } +// return "index"; +// +// } +// +// @RequestMapping(value = "/list.html", method = RequestMethod.GET) +// public String getList(Model model) +// { +// +// List universities = facade.getUniversityCrudServcve().findAll(); +// +// model.addAttribute("universities",universities); +// return "list"; +// } +} \ No newline at end of file diff --git a/src/java/com/onlinegaragesale/presentation/web/controller/SampleController.java b/src/java/com/onlinegaragesale/presentation/web/controller/SampleController.java new file mode 100644 index 0000000..6919f38 --- /dev/null +++ b/src/java/com/onlinegaragesale/presentation/web/controller/SampleController.java @@ -0,0 +1,96 @@ +package com.onlinegaragesale.presentation.web.controller; + +import com.onlinegaragesale.app.facade.Facade; +import com.onlinegaragesale.app.factories.AppFactory; +import com.onlinegaragesale.model.Student; +import com.onlinegaragesale.presentation.web.model.SampleBean; +import com.onlinegaragesale.services.crud.StudentCrudService; +import java.util.List; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * File Name: SampleController.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.presentation.web.controller + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +@Controller +public class SampleController +{ + + private final Facade facade = new Facade(); + + @RequestMapping(value = "sample/sampleindex.html", method = RequestMethod.GET) + public String getSampleIndex(Model model) + { + return "sample/sampleindex"; + } + + @RequestMapping(value = "sample/addsample.html", method = RequestMethod.GET) + public String addSample(Model model) + { + SampleBean sampleBean = new SampleBean(); + model.addAttribute(sampleBean); + return "sample/addsample"; + } + + @RequestMapping(value = "sample/persistsample.html", method = RequestMethod.POST) + public String addSample(@Validated SampleBean sampleBean) + { + StudentCrudService sampleCrudService = facade.getSampleCrudService(); + Student createSampleStudent = AppFactory.createSampleStudent(/*sampleBean.getFirstName()*/null); + sampleCrudService.persist(createSampleStudent); + return "sample/sampleindex"; + } + + @RequestMapping(value = "sample/deletesample.html", method = RequestMethod.GET) + public String deleteSample(Model model) + { + SampleBean sampleBean = new SampleBean(); + model.addAttribute(sampleBean); + return "sample/deletesample"; + } + + @RequestMapping(value = "sample/removesample.html", method = RequestMethod.POST) + public String deleteSample(@Validated SampleBean sampleBean) + { + StudentCrudService sampleCrudService = facade.getSampleCrudService(); + Student findById = sampleCrudService.findById(sampleBean.getId()); + sampleCrudService.remove(findById); + return "sample/sampleindex"; + } + + @RequestMapping(value = "sample/editsample.html", method = RequestMethod.GET) + public String editSample(Model model) + { + SampleBean sampleBean = new SampleBean(); + model.addAttribute(sampleBean); + return "sample/editsample"; + } + + @RequestMapping(value = "sample/mergesample.html", method = RequestMethod.POST) + public String editSample(@Validated SampleBean sampleBean) + { + StudentCrudService sampleCrudService = facade.getSampleCrudService(); + Student findById = sampleCrudService.findById(sampleBean.getId()); + findById.setStudentNumber(sampleBean.getStudentNumber()); + sampleCrudService.merge(findById); + return "sample/sampleindex"; + } + + @RequestMapping(value = "sample/listsamle.html", method = RequestMethod.GET) + public String listSample(Model model) + { + StudentCrudService sampleCrudService = facade.getSampleCrudService(); + List students = sampleCrudService.findAll(); + model.addAttribute("samples", students); + return "sample/listsamle"; + } +} diff --git a/src/java/com/onlinegaragesale/presentation/web/model/SampleBean.java b/src/java/com/onlinegaragesale/presentation/web/model/SampleBean.java new file mode 100644 index 0000000..f4f9ae4 --- /dev/null +++ b/src/java/com/onlinegaragesale/presentation/web/model/SampleBean.java @@ -0,0 +1,72 @@ +package com.onlinegaragesale.presentation.web.model; + +import java.util.Date; + +/** + * File Name: SampleBean.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.presentation.web.model + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public class SampleBean +{ + + private Long id; + private String studentNumber; + private String firstName; + private String lastName; + private Date dob; + + public Long getId() + { + return id; + } + + public void setId(Long id) + { + this.id = id; + } + + public String getStudentNumber() + { + return studentNumber; + } + + public void setStudentNumber(String studentNumber) + { + this.studentNumber = studentNumber; + } + + public String getFirstName() + { + return firstName; + } + + public void setFirstName(String firstName) + { + this.firstName = firstName; + } + + public String getLastName() + { + return lastName; + } + + public void setLastName(String lastName) + { + this.lastName = lastName; + } + + public Date getDob() + { + return dob; + } + + public void setDob(Date dob) + { + this.dob = dob; + } +} diff --git a/src/java/com/onlinegaragesale/repository/DAO.java b/src/java/com/onlinegaragesale/repository/DAO.java new file mode 100644 index 0000000..403c604 --- /dev/null +++ b/src/java/com/onlinegaragesale/repository/DAO.java @@ -0,0 +1,36 @@ +package com.onlinegaragesale.repository; + +import java.util.List; + +/** + * File Name: DAO.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.repository + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public interface DAO +{ + + public T findById(final ID id); + + public List< T> findAll(); + + public void persist(final T entity); + + public void merge(final T entity); + + public void remove(final T entity); + + public void removeById(final Long entityId); + + public List findInRange(int firstResult, int maxResults); + + public long count(); + + public T getByPropertyName(String name, String value); + + public List getEntitiesByProperName(String name, String value); +} diff --git a/src/java/com/onlinegaragesale/repository/GenericDAO.java b/src/java/com/onlinegaragesale/repository/GenericDAO.java new file mode 100644 index 0000000..032b213 --- /dev/null +++ b/src/java/com/onlinegaragesale/repository/GenericDAO.java @@ -0,0 +1,18 @@ +package com.onlinegaragesale.repository; + +import java.io.Serializable; + +/** + * File Name: GenericDAO.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.repository + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public interface GenericDAO< T extends Serializable> extends DAO< T, Long> +{ + + void setClazz(final Class< T> clazzToSet); +} diff --git a/src/java/com/onlinegaragesale/repository/jpa/GenericJPAImpl.java b/src/java/com/onlinegaragesale/repository/jpa/GenericJPAImpl.java new file mode 100644 index 0000000..75911f8 --- /dev/null +++ b/src/java/com/onlinegaragesale/repository/jpa/GenericJPAImpl.java @@ -0,0 +1,97 @@ +package com.onlinegaragesale.repository.jpa; + +import com.onlinegaragesale.repository.GenericDAO; +import java.io.Serializable; +import java.util.List; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.persistence.PersistenceContextType; +import org.springframework.stereotype.Repository; + +/** + * File Name: GenericJPAImpl.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.repository.jpa + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +@Repository("dao") +public class GenericJPAImpl implements GenericDAO +{ + + private Class clazz; + @PersistenceContext(type = PersistenceContextType.EXTENDED) + EntityManager em; + + @Override + public void setClazz(final Class clazzToSet) + { + this.clazz = clazzToSet; + } + + @Override + public T findById(final Long id) + { + return this.em.find(this.clazz, id); + } + + @Override + public List findAll() + { + return this.em.createQuery("FROM " + this.clazz.getName()).getResultList(); + } + + @Override + public void persist(final T entity) + { + this.em.persist(entity); + } + + @Override + public void merge(final T entity) + { + this.em.merge(entity); + } + + @Override + public void remove(final T entity) + { + this.em.remove(entity); + } + + @Override + public void removeById(final Long entityId) + { + final T entity = this.findById(entityId); + this.remove(entity); + } + + @Override + public List findInRange(int firstResult, int maxResults) + { + + return em.createQuery("SELECT a FROM " + this.clazz.getName() + " e").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); + } + + @Override + public long count() + { + return (Long) em.createQuery("SELECT count(e) FROM " + this.clazz.getName() + " e").getSingleResult(); + } + + @Override + public T getByPropertyName(String name, String value) + { + List list = em.createQuery("SELECT e FROM " + this.clazz.getName() + " e WHERE e." + name + "=?1").setParameter(1, value).getResultList(); + return (list.isEmpty()) ? null : list.get(0); + } + + @Override + public List getEntitiesByProperName(String name, String value) + { + List list = em.createQuery("SELECT e FROM " + this.clazz.getName() + " e WHERE e." + name + "=?1").setParameter(1, value).getResultList(); + return list; + } +} \ No newline at end of file diff --git a/src/java/com/onlinegaragesale/services/Service.java b/src/java/com/onlinegaragesale/services/Service.java new file mode 100644 index 0000000..332a305 --- /dev/null +++ b/src/java/com/onlinegaragesale/services/Service.java @@ -0,0 +1,36 @@ +package com.onlinegaragesale.services; + +import java.util.List; + +/** + * File Name: Service.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.services + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public interface Service +{ + + public T findById(final ID id); + + public List findAll(); + + public void persist(final T entity); + + public void merge(final T entity); + + public void remove(final T entity); + + public void removeById(final Long entityId); + + public List findInRange(int firstResult, int maxResults); + + public long count(); + + public T getByPropertyName(String name, String value); + + public List getEntitiesByProperName(String name, String value); +} diff --git a/src/java/com/onlinegaragesale/services/crud/StudentCrudService.java b/src/java/com/onlinegaragesale/services/crud/StudentCrudService.java new file mode 100644 index 0000000..99d5bf3 --- /dev/null +++ b/src/java/com/onlinegaragesale/services/crud/StudentCrudService.java @@ -0,0 +1,17 @@ +package com.onlinegaragesale.services.crud; + +import com.onlinegaragesale.model.Student; +import com.onlinegaragesale.services.Service; + +/** + * File Name: StudentCrudService.java + * Version: 1.0 + * Description: + * Package: .onlinegaragesale.services.crud + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public interface StudentCrudService extends Service +{ +} diff --git a/src/java/com/onlinegaragesale/services/crud/impl/StudentCrudServiceImpl.java b/src/java/com/onlinegaragesale/services/crud/impl/StudentCrudServiceImpl.java new file mode 100644 index 0000000..a8112bb --- /dev/null +++ b/src/java/com/onlinegaragesale/services/crud/impl/StudentCrudServiceImpl.java @@ -0,0 +1,109 @@ +package com.onlinegaragesale.services.crud.impl; + +import com.onlinegaragesale.model.Student; +import com.onlinegaragesale.repository.GenericDAO; +import com.onlinegaragesale.services.crud.StudentCrudService; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * File Name: StudentCrudServiceImpl.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.services.crud.impl + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +@Service("studentCrudService") +@Transactional +public class StudentCrudServiceImpl implements StudentCrudService +{ + + @Autowired + private GenericDAO dao; + + public final void setDao(final GenericDAO daoToSet) + { + this.dao = daoToSet; + this.dao.setClazz(Student.class); + } + + public StudentCrudServiceImpl() + { + } + + @Override + public Student findById(Long id) + { + setDao(dao); + return dao.findById(id); + } + + @Override + public List findAll() + { + setDao(dao); + return dao.findAll(); + } + + @Override + public void persist(Student entity) + { + setDao(dao); + dao.persist(entity); + } + + @Override + public void merge(Student entity) + { + setDao(dao); + dao.merge(entity); + } + + @Override + public void remove(Student entity) + { + setDao(dao); + dao.remove(entity); + } + + @Override + public void removeById(Long entityId) + { + setDao(dao); + Student v = dao.findById(entityId); + dao.remove(v); + } + + @Override + public List findInRange(int firstResult, int maxResults) + { + setDao(dao); + return dao.findInRange(firstResult, maxResults); + + } + + @Override + public long count() + { + setDao(dao); + return dao.count(); + } + + @Override + public Student getByPropertyName(String name, String value) + { + setDao(dao); + return dao.getByPropertyName(name, value); + } + + @Override + public List getEntitiesByProperName(String name, String value) + { + setDao(dao); + return dao.getEntitiesByProperName(name, value); + } +} diff --git a/src/java/database.properties b/src/java/database.properties new file mode 100644 index 0000000..dde30a8 --- /dev/null +++ b/src/java/database.properties @@ -0,0 +1,16 @@ +# To change this template, choose Tools | Templates +# and open the template in the editor. +# 1. Dialect: org.hibernate.dialect.DerbyDialect +# 2. JDBC Driver: org.apache.derby.jdbc.ClientDriver +# 3. url FOR DB: jdbc:derby://localhost:1527/university + +database.url=jdbc:derby://localhost:1527/sample +database.generateDdl=true +database.username=app +database.password=app +database.showSql=true +database.platform=org.hibernate.dialect.DerbyDialect +database.driverClassName=org.apache.derby.jdbc.ClientDriver + + + diff --git a/src/java/log4j.properties b/src/java/log4j.properties new file mode 100644 index 0000000..c75c27f --- /dev/null +++ b/src/java/log4j.properties @@ -0,0 +1,11 @@ +# Direct log messages to stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +# Root logger option +log4j.rootLogger=DEBUG, stdout + + + diff --git a/test/com/onlinegaragesale/services/crud/impl/StudentCrudServiceImplTest.java b/test/com/onlinegaragesale/services/crud/impl/StudentCrudServiceImplTest.java new file mode 100644 index 0000000..73d336a --- /dev/null +++ b/test/com/onlinegaragesale/services/crud/impl/StudentCrudServiceImplTest.java @@ -0,0 +1,239 @@ +package com.onlinegaragesale.services.crud.impl; + +import com.onlinegaragesale.app.facade.Facade; +import com.onlinegaragesale.app.factories.AppFactory; +import com.onlinegaragesale.model.Student; +import com.onlinegaragesale.services.crud.StudentCrudService; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + * File Name: StudentCrudServiceImplTest.java + * Version: 1.0 + * Description: + * Package: com.onlinegaragesale.services.crud.impl + * Author: Lance + * Date: 08 Sep 2012 + * Edited: 08 Sep 2012 + */ +public class StudentCrudServiceImplTest +{ + + private static Long studentID; + private static ApplicationContext ctx; + private static Facade facade; + private StudentCrudService studentCrudService; + + public StudentCrudServiceImplTest() + { + } + + @BeforeClass + public static void setUpClass() + { + ctx = new ClassPathXmlApplicationContext("classpath:com/onlinegaragesale/app/conf/applicationContext-*.xml"); + facade = new Facade(); + } + + @AfterClass + public static void tearDownClass() + { + } + + @Before + public void setUp() + { + } + + @After + public void tearDown() + { + } + + @Test + public void testStudentCrud() + { + Student createStudent = AppFactory.createSampleStudent(null); + + studentCrudService = facade.getSampleCrudService(); + studentCrudService.persist(createStudent); + studentID = createStudent.getId(); + Assert.assertNotNull(createStudent); + + studentCrudService.removeById(studentID); + createStudent = studentCrudService.findById(studentID); + Assert.assertNull(createStudent); + } +// /** +// * Test of setDao method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testStudentCrud() +// { +// System.out.println("setDao"); +// GenericDAO daoToSet = null; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// instance.setDao(daoToSet); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of findById method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testFindById() +// { +// System.out.println("findById"); +// Long id = null; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// Student expResult = null; +// Student result = instance.findById(id); +// assertEquals(expResult, result); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of findAll method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testFindAll() +// { +// System.out.println("findAll"); +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// List expResult = null; +// List result = instance.findAll(); +// assertEquals(expResult, result); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of persist method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testPersist() +// { +// System.out.println("persist"); +// Student entity = null; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// instance.persist(entity); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of merge method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testMerge() +// { +// System.out.println("merge"); +// Student entity = null; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// instance.merge(entity); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of remove method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testRemove() +// { +// System.out.println("remove"); +// Student entity = null; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// instance.remove(entity); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of removeById method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testRemoveById() +// { +// System.out.println("removeById"); +// Long entityId = null; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// instance.removeById(entityId); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of findInRange method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testFindInRange() +// { +// System.out.println("findInRange"); +// int firstResult = 0; +// int maxResults = 0; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// List expResult = null; +// List result = instance.findInRange(firstResult, maxResults); +// assertEquals(expResult, result); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of count method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testCount() +// { +// System.out.println("count"); +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// long expResult = 0L; +// long result = instance.count(); +// assertEquals(expResult, result); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of getByPropertyName method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testGetByPropertyName() +// { +// System.out.println("getByPropertyName"); +// String name = ""; +// String value = ""; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// Student expResult = null; +// Student result = instance.getByPropertyName(name, value); +// assertEquals(expResult, result); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +// +// /** +// * Test of getEntitiesByProperName method, of class StudentCrudServiceImpl. +// */ +// @Test +// public void testGetEntitiesByProperName() +// { +// System.out.println("getEntitiesByProperName"); +// String name = ""; +// String value = ""; +// StudentCrudServiceImpl instance = new StudentCrudServiceImpl(); +// List expResult = null; +// List result = instance.getEntitiesByProperName(name, value); +// assertEquals(expResult, result); +// // TODO review the generated test code and remove the default call to fail. +// fail("The test case is a prototype."); +// } +} diff --git a/web/META-INF/context.xml b/web/META-INF/context.xml new file mode 100644 index 0000000..f17764c --- /dev/null +++ b/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/web/WEB-INF/beans.xml b/web/WEB-INF/beans.xml new file mode 100644 index 0000000..cc7c587 --- /dev/null +++ b/web/WEB-INF/beans.xml @@ -0,0 +1,5 @@ + + + diff --git a/web/WEB-INF/public/index.jsp b/web/WEB-INF/public/index.jsp new file mode 100644 index 0000000..4cb582a --- /dev/null +++ b/web/WEB-INF/public/index.jsp @@ -0,0 +1,21 @@ + +<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%> + + + University Application + + + Title + + " /> + " /> + + + + +

Sample Application


+ Sample Test
+ + diff --git a/web/WEB-INF/public/sample/addsample.jsp b/web/WEB-INF/public/sample/addsample.jsp new file mode 100644 index 0000000..366635e --- /dev/null +++ b/web/WEB-INF/public/sample/addsample.jsp @@ -0,0 +1,25 @@ +<%-- + Document : addsample + Created on : 08 Sep 2012, 3:07:16 PM + Author : Lance +--%> + +<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + +

Add Sample

+ + + Enter a sample name

+ +
+ + diff --git a/web/WEB-INF/public/sample/deletesample.jsp b/web/WEB-INF/public/sample/deletesample.jsp new file mode 100644 index 0000000..f97b66f --- /dev/null +++ b/web/WEB-INF/public/sample/deletesample.jsp @@ -0,0 +1,25 @@ +<%-- + Document : deletesample + Created on : 08 Sep 2012, 3:07:28 PM + Author : Lance +--%> + +<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + +

Delete sample

+ + + Enter sample id to delete

+ +
+ + diff --git a/web/WEB-INF/public/sample/editsample.jsp b/web/WEB-INF/public/sample/editsample.jsp new file mode 100644 index 0000000..7b12aae --- /dev/null +++ b/web/WEB-INF/public/sample/editsample.jsp @@ -0,0 +1,25 @@ +<%-- + Document : editsample + Created on : 08 Sep 2012, 3:07:36 PM + Author : Lance +--%> + +<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + +

Edit sample

+ + Enter the old sample id :
+ Enter a new sample student number :
+ +
+ + diff --git a/web/WEB-INF/public/sample/listsamle.jsp b/web/WEB-INF/public/sample/listsamle.jsp new file mode 100644 index 0000000..e9a2e3e --- /dev/null +++ b/web/WEB-INF/public/sample/listsamle.jsp @@ -0,0 +1,25 @@ +<%-- + Document : listsamle + Created on : 08 Sep 2012, 3:07:51 PM + Author : Lance +--%> + +<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + +

List sample

+ + +
+
+
+ + diff --git a/web/WEB-INF/public/sample/sampleindex.jsp b/web/WEB-INF/public/sample/sampleindex.jsp new file mode 100644 index 0000000..7ee8b68 --- /dev/null +++ b/web/WEB-INF/public/sample/sampleindex.jsp @@ -0,0 +1,24 @@ +<%-- + Document : sampleindex + Created on : 08 Sep 2012, 2:52:02 PM + Author : Lance +--%> + +<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="f" uri="http://www.springframework.org/tags/form"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + JSP Page + + +

Sample index

+ >Add sample
+ >Delete sample
+ >Edit sample
+ >List sample
+ + diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml new file mode 100644 index 0000000..04f4e57 --- /dev/null +++ b/web/WEB-INF/web.xml @@ -0,0 +1,44 @@ + + + + + log4jConfigLocation + /WEB-INF/classes/log4j.properties + + + contextConfigLocation + /WEB-INF/classes/com/onlinegaragesale/app/conf/applicationContext-*.xml + + + productionMode + false + + + + org.springframework.web.util.Log4jConfigListener + + + + org.springframework.web.context.ContextLoaderListener + + + + appServlet + org.springframework.web.servlet.DispatcherServlet + + contextConfigLocation + /WEB-INF/classes/com/onlinegaragesale/app/conf/servlet-context.xml + + 1 + + + appServlet + / + + + + + 30 + + + diff --git a/web/resources/styles/style.css b/web/resources/styles/style.css new file mode 100644 index 0000000..4f1f85e --- /dev/null +++ b/web/resources/styles/style.css @@ -0,0 +1,18 @@ +/* + Document : style + Created on : 20 Aug 2012, 8:04:18 AM + Author : boniface + Description: + Purpose of the stylesheet follows. +*/ + +root { + display: block; +} + +#header{ + width: 960px; + height: 90px; + +} +