From 24c72563dbb5d80a676895ee34087b444fbf7b70 Mon Sep 17 00:00:00 2001 From: migueldiab Date: Sun, 14 Nov 2010 20:14:31 +0000 Subject: [PATCH] git-svn-id: https://xp-dev.com/svn/DisComp/trunk@5 c19039e0-b999-482a-a7c2-be7dbe6476a1 --- OhmVC/ContactAdmin/build.xml | 71 ++ OhmVC/ContactAdmin/catalog.xml | 8 + OhmVC/ContactAdmin/dist/ContactAdmin.war | Bin 0 -> 19327 bytes OhmVC/ContactAdmin/nbproject/ant-deploy.xml | 85 ++ OhmVC/ContactAdmin/nbproject/build-impl.xml | 1005 +++++++++++++++++ .../nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 6 + .../nbproject/private/private.xml | 4 + .../ContactAdmin/nbproject/project.properties | 98 ++ OhmVC/ContactAdmin/nbproject/project.xml | 37 + .../nbproject/xml_binding_build.xml | 18 + .../nbproject/xml_binding_cfg.xml | 3 + OhmVC/ContactAdmin/src/conf/MANIFEST.MF | 2 + .../src/java/app/LoginCommand.java | 21 + .../src/java/app/LogoutCommand.java | 26 + OhmVC/ContactAdmin/web/WEB-INF/mvc.xml | 38 + OhmVC/ContactAdmin/web/WEB-INF/sun-web.xml | 11 + OhmVC/ContactAdmin/web/WEB-INF/web.xml | 27 + OhmVC/ContactAdmin/web/css/custom.css | 6 + OhmVC/ContactAdmin/web/css/gt-styles.css | 283 +++++ OhmVC/ContactAdmin/web/css/override.css | 8 + OhmVC/ContactAdmin/web/css/reset-fonts.css | 12 + OhmVC/ContactAdmin/web/index.jsp | 79 ++ OhmVC/ContactAdmin/web/layout/error.jsp | 10 + OhmVC/ContactAdmin/web/layout/home.jsp | 7 + OhmVC/ContactAdmin/web/layout/nav.jsp | 15 + OhmVC/ContactAdmin/web/layout/side.jsp | 13 + OhmVC/ContactAdmin/web/lost.jsp | 67 ++ OhmVC/ContactAdmin/web/paginas/Bienvenido.jsp | 1 + OhmVC/ContactAdmin/web/paginas/Login.jsp | 1 + OhmVC/ContactAdmin/web/paginas/Principal.jsp | 1 + OhmVC/OhmVC/build.xml | 74 ++ OhmVC/OhmVC/catalog.xml | 5 + OhmVC/OhmVC/nbproject/ant-deploy.xml | 85 ++ OhmVC/OhmVC/nbproject/build-impl.xml | 993 ++++++++++++++++ OhmVC/OhmVC/nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 11 + OhmVC/OhmVC/nbproject/private/private.xml | 4 + OhmVC/OhmVC/nbproject/project.properties | 90 ++ OhmVC/OhmVC/nbproject/project.xml | 20 + OhmVC/OhmVC/src/conf/MANIFEST.MF | 3 + OhmVC/OhmVC/src/conf/application-client.xml | 4 + .../ort/discomp/framework/CommandFactory.java | 48 + .../discomp/framework/FrontController.java | 126 +++ .../ort/discomp/framework/HomeWebAction.java | 28 + .../framework/NotFound404WebAction.java | 29 + .../edu/ort/discomp/framework/WebAction.java | 87 ++ .../edu/ort/discomp/framework/WebAdmin.java | 61 + .../edu/ort/discomp/xml/MvcXMLReader.java | 45 + .../edu/ort/discomp/xml/jaxb/Command.java | 144 +++ .../ort/discomp/xml/jaxb/CommandMappings.java | 60 + .../edu/ort/discomp/xml/jaxb/Forward.java | 83 ++ .../edu/ort/discomp/xml/jaxb/MvcConfig.java | 55 + .../ort/discomp/xml/jaxb/ObjectFactory.java | 71 ++ .../xml-resources/jaxb/mvcConfig/mvc.dtd | 17 + .../xml-resources/jaxb/mvcConfig/mvc.xml | 39 + OhmVC/build.xml | 61 + OhmVC/nbproject/ant-deploy.xml | 85 ++ OhmVC/nbproject/build-impl.xml | 571 ++++++++++ OhmVC/nbproject/genfiles.properties | 8 + OhmVC/nbproject/private/private.properties | 8 + OhmVC/nbproject/private/private.xml | 6 + OhmVC/nbproject/project.properties | 41 + OhmVC/nbproject/project.xml | 42 + 64 files changed, 4983 insertions(+) create mode 100644 OhmVC/ContactAdmin/build.xml create mode 100644 OhmVC/ContactAdmin/catalog.xml create mode 100644 OhmVC/ContactAdmin/dist/ContactAdmin.war create mode 100644 OhmVC/ContactAdmin/nbproject/ant-deploy.xml create mode 100644 OhmVC/ContactAdmin/nbproject/build-impl.xml create mode 100644 OhmVC/ContactAdmin/nbproject/genfiles.properties create mode 100644 OhmVC/ContactAdmin/nbproject/private/private.properties create mode 100644 OhmVC/ContactAdmin/nbproject/private/private.xml create mode 100644 OhmVC/ContactAdmin/nbproject/project.properties create mode 100644 OhmVC/ContactAdmin/nbproject/project.xml create mode 100644 OhmVC/ContactAdmin/nbproject/xml_binding_build.xml create mode 100644 OhmVC/ContactAdmin/nbproject/xml_binding_cfg.xml create mode 100644 OhmVC/ContactAdmin/src/conf/MANIFEST.MF create mode 100644 OhmVC/ContactAdmin/src/java/app/LoginCommand.java create mode 100644 OhmVC/ContactAdmin/src/java/app/LogoutCommand.java create mode 100644 OhmVC/ContactAdmin/web/WEB-INF/mvc.xml create mode 100644 OhmVC/ContactAdmin/web/WEB-INF/sun-web.xml create mode 100644 OhmVC/ContactAdmin/web/WEB-INF/web.xml create mode 100644 OhmVC/ContactAdmin/web/css/custom.css create mode 100644 OhmVC/ContactAdmin/web/css/gt-styles.css create mode 100644 OhmVC/ContactAdmin/web/css/override.css create mode 100644 OhmVC/ContactAdmin/web/css/reset-fonts.css create mode 100644 OhmVC/ContactAdmin/web/index.jsp create mode 100644 OhmVC/ContactAdmin/web/layout/error.jsp create mode 100644 OhmVC/ContactAdmin/web/layout/home.jsp create mode 100644 OhmVC/ContactAdmin/web/layout/nav.jsp create mode 100644 OhmVC/ContactAdmin/web/layout/side.jsp create mode 100644 OhmVC/ContactAdmin/web/lost.jsp create mode 100644 OhmVC/ContactAdmin/web/paginas/Bienvenido.jsp create mode 100644 OhmVC/ContactAdmin/web/paginas/Login.jsp create mode 100644 OhmVC/ContactAdmin/web/paginas/Principal.jsp create mode 100644 OhmVC/OhmVC/build.xml create mode 100644 OhmVC/OhmVC/catalog.xml create mode 100644 OhmVC/OhmVC/nbproject/ant-deploy.xml create mode 100644 OhmVC/OhmVC/nbproject/build-impl.xml create mode 100644 OhmVC/OhmVC/nbproject/genfiles.properties create mode 100644 OhmVC/OhmVC/nbproject/private/private.properties create mode 100644 OhmVC/OhmVC/nbproject/private/private.xml create mode 100644 OhmVC/OhmVC/nbproject/project.properties create mode 100644 OhmVC/OhmVC/nbproject/project.xml create mode 100644 OhmVC/OhmVC/src/conf/MANIFEST.MF create mode 100644 OhmVC/OhmVC/src/conf/application-client.xml create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/framework/CommandFactory.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/framework/FrontController.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/framework/HomeWebAction.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/framework/NotFound404WebAction.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAction.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAdmin.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/xml/MvcXMLReader.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Command.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/CommandMappings.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Forward.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/MvcConfig.java create mode 100644 OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/ObjectFactory.java create mode 100644 OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.dtd create mode 100644 OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.xml create mode 100644 OhmVC/build.xml create mode 100644 OhmVC/nbproject/ant-deploy.xml create mode 100644 OhmVC/nbproject/build-impl.xml create mode 100644 OhmVC/nbproject/genfiles.properties create mode 100644 OhmVC/nbproject/private/private.properties create mode 100644 OhmVC/nbproject/private/private.xml create mode 100644 OhmVC/nbproject/project.properties create mode 100644 OhmVC/nbproject/project.xml diff --git a/OhmVC/ContactAdmin/build.xml b/OhmVC/ContactAdmin/build.xml new file mode 100644 index 0000000..7ca2926 --- /dev/null +++ b/OhmVC/ContactAdmin/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project ContactAdmin. + + + diff --git a/OhmVC/ContactAdmin/catalog.xml b/OhmVC/ContactAdmin/catalog.xml new file mode 100644 index 0000000..84d583b --- /dev/null +++ b/OhmVC/ContactAdmin/catalog.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/OhmVC/ContactAdmin/dist/ContactAdmin.war b/OhmVC/ContactAdmin/dist/ContactAdmin.war new file mode 100644 index 0000000000000000000000000000000000000000..5c315c3117344a01b6ea1e4ca5aeed18bb3a6f56 GIT binary patch literal 19327 zcmeHPU2G&*RxZy>Hko2)lT5NKu&~_e>?Gr%yQZI3fi!Xl-U9(Uh+&$;LCo^$TGxBAZ8XV002@tk4Y{jG4`D7?-a=Zy9C)?#h- z_KN-eZyUy)Z0Jv8sQb%jA3elydcTZ!HgtXQ_UcM|bIV#^S$9Ie%agQrkH?80g-zD5 z>KDw#u+XwNaNHheXhY}gR^x)X6muu#UhU=qji0sZ4;oXoPW>9YvN;Udy6?tOa*(9F zpRm=?wI(l^7tEZt@BGFn8{o`%w|!G^ar~$k3ZvY>NfMse`RMhMXoz2pQ;&8Ag91dE zig6I!8=e61BV*=d4A$X{gbG?dJ5=n?DY9w6z`ls#g|WkXTKj5F#P;) zj%w{3Ft|xk2jvmZVuas!wnr3I7CQ|JoP%h1lFZ0L2F|u0I>q_Qs3tM0taB^mX@@&u z^1vCUQQt{@_d#dq2VQPEWi;bNoTC{IJedB2m?zONc6pNHArlPPAN!(IMp2w(E#VaXs0 z6FxU7@Y#VAZrht_?1$S#nZiC{Ts=Ku0E^}16UJ+&q;kS|4q6nHOc+<52&8D9FwFM8 z%Lgf(W%8`?r3vGeDBjNO!`c*PvBr0Kuo#9>3X8+Q3FGAguN%8Oj(v}VTT_l-@kxs>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+ + + + + + + + + + + diff --git a/OhmVC/ContactAdmin/nbproject/build-impl.xml b/OhmVC/ContactAdmin/nbproject/build-impl.xml new file mode 100644 index 0000000..0c5b894 --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/build-impl.xml @@ -0,0 +1,1005 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +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 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OhmVC/ContactAdmin/nbproject/genfiles.properties b/OhmVC/ContactAdmin/nbproject/genfiles.properties new file mode 100644 index 0000000..7bf60db --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=f9e65022 +build.xml.script.CRC32=489411f5 +build.xml.stylesheet.CRC32=651128d4@1.24.2.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=f9e65022 +nbproject/build-impl.xml.script.CRC32=5ca15171 +nbproject/build-impl.xml.stylesheet.CRC32=8419264d@1.24.2.1 diff --git a/OhmVC/ContactAdmin/nbproject/private/private.properties b/OhmVC/ContactAdmin/nbproject/private/private.properties new file mode 100644 index 0000000..0fe0166 --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/private/private.properties @@ -0,0 +1,6 @@ +deploy.ant.properties.file=D:\\Users\\migueldiab.lorien\\.netbeans\\6.9\\gfv3-1241558004.properties +j2ee.platform.is.jsr109=true +j2ee.server.instance=[C:\\glassfish-3.0.1\\glassfish]deployer:gfv3ee6:localhost:4848 +javac.debug=true +javadoc.preview=true +user.properties.file=D:\\Users\\migueldiab.lorien\\.netbeans\\6.9\\build.properties diff --git a/OhmVC/ContactAdmin/nbproject/private/private.xml b/OhmVC/ContactAdmin/nbproject/private/private.xml new file mode 100644 index 0000000..cc2c0e5 --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/OhmVC/ContactAdmin/nbproject/project.properties b/OhmVC/ContactAdmin/nbproject/project.properties new file mode 100644 index 0000000..86c7bdb --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/project.properties @@ -0,0 +1,98 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +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= +includes=** +j2ee.deploy.on.save=true +j2ee.platform=1.6 +j2ee.platform.classpath=\ + ${libs.GlassFish_Server_3.classpath} +j2ee.platform.embeddableejb.classpath=${libs.GlassFish_Server_3.embeddableejb} +j2ee.platform.jwsdp.classpath=\ + ${libs.GlassFish_Server_3.wsjwsdp} +j2ee.platform.wscompile.classpath=\ + ${libs.GlassFish_Server_3.wscompile} +j2ee.platform.wsgen.classpath=\ + ${libs.GlassFish_Server_3.wsgenerate} +j2ee.platform.wsimport.classpath=\ + ${libs.GlassFish_Server_3.wsimport} +j2ee.platform.wsit.classpath=\ + ${libs.GlassFish_Server_3.wsinterop} +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath=\ + ${reference.OhmVC.dist} +# 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.classpath}:\ + ${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= +jaxbwiz.gensrc.classpath=${libs.jaxb.classpath} +jaxbwiz.xjcdef.classpath=${libs.jaxb.classpath} +jaxbwiz.xjcrun.classpath=${libs.jaxb.classpath} +lib.dir=${web.docbase.dir}/WEB-INF/lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +project.OhmVC=../OhmVC +reference.OhmVC.dist=${project.OhmVC}/dist/OhmVC.jar +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=ContactAdmin.war +war.name=ContactAdmin.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/OhmVC/ContactAdmin/nbproject/project.xml b/OhmVC/ContactAdmin/nbproject/project.xml new file mode 100644 index 0000000..79b4b90 --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/project.xml @@ -0,0 +1,37 @@ + + + org.netbeans.modules.web.project + + + + ContactAdmin + 1.6.5 + + + ${reference.OhmVC.dist} + WEB-INF/lib + + + + + + + + + + + + ../lib/nblibraries.properties + + + + OhmVC + jar + + dist + clean + dist + + + + diff --git a/OhmVC/ContactAdmin/nbproject/xml_binding_build.xml b/OhmVC/ContactAdmin/nbproject/xml_binding_build.xml new file mode 100644 index 0000000..4847c14 --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/xml_binding_build.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/OhmVC/ContactAdmin/nbproject/xml_binding_cfg.xml b/OhmVC/ContactAdmin/nbproject/xml_binding_cfg.xml new file mode 100644 index 0000000..7dbc0a9 --- /dev/null +++ b/OhmVC/ContactAdmin/nbproject/xml_binding_cfg.xml @@ -0,0 +1,3 @@ + + + diff --git a/OhmVC/ContactAdmin/src/conf/MANIFEST.MF b/OhmVC/ContactAdmin/src/conf/MANIFEST.MF new file mode 100644 index 0000000..58630c0 --- /dev/null +++ b/OhmVC/ContactAdmin/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/OhmVC/ContactAdmin/src/java/app/LoginCommand.java b/OhmVC/ContactAdmin/src/java/app/LoginCommand.java new file mode 100644 index 0000000..56e333d --- /dev/null +++ b/OhmVC/ContactAdmin/src/java/app/LoginCommand.java @@ -0,0 +1,21 @@ +package app; + +import edu.ort.discomp.framework.CommandFactory; +import edu.ort.discomp.framework.WebAction; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author migueldiab + */ +public class LoginCommand extends WebAction { + + @Override + public String execute(final CommandFactory servlet, final HttpServletRequest request, final HttpServletResponse response) + throws ServletException { + return "entrar"; + } + +} diff --git a/OhmVC/ContactAdmin/src/java/app/LogoutCommand.java b/OhmVC/ContactAdmin/src/java/app/LogoutCommand.java new file mode 100644 index 0000000..5af6e03 --- /dev/null +++ b/OhmVC/ContactAdmin/src/java/app/LogoutCommand.java @@ -0,0 +1,26 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package app; + +import edu.ort.discomp.framework.CommandFactory; +import edu.ort.discomp.framework.FrontController; +import edu.ort.discomp.framework.WebAction; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * + * @author migueldiab + */ +public class LogoutCommand extends WebAction { + + @Override + public String execute(CommandFactory servlet, HttpServletRequest request, HttpServletResponse response) throws ServletException { + return "ok"; + } + +} diff --git a/OhmVC/ContactAdmin/web/WEB-INF/mvc.xml b/OhmVC/ContactAdmin/web/WEB-INF/mvc.xml new file mode 100644 index 0000000..b4f343b --- /dev/null +++ b/OhmVC/ContactAdmin/web/WEB-INF/mvc.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/WEB-INF/sun-web.xml b/OhmVC/ContactAdmin/web/WEB-INF/sun-web.xml new file mode 100644 index 0000000..cb8d393 --- /dev/null +++ b/OhmVC/ContactAdmin/web/WEB-INF/sun-web.xml @@ -0,0 +1,11 @@ + + + + /OhmVC_Imp + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/OhmVC/ContactAdmin/web/WEB-INF/web.xml b/OhmVC/ContactAdmin/web/WEB-INF/web.xml new file mode 100644 index 0000000..4b523b3 --- /dev/null +++ b/OhmVC/ContactAdmin/web/WEB-INF/web.xml @@ -0,0 +1,27 @@ + + + + FrontController + edu.ort.discomp.framework.FrontController + + + FrontController + *.cmd + /Bienvenido + /LoginSubmit + /Login + /Logout + + + + 30 + + + + index.jsp + + + 404 + /lost.jsp + + diff --git a/OhmVC/ContactAdmin/web/css/custom.css b/OhmVC/ContactAdmin/web/css/custom.css new file mode 100644 index 0000000..2e79063 --- /dev/null +++ b/OhmVC/ContactAdmin/web/css/custom.css @@ -0,0 +1,6 @@ +/* +Template: GT-FREE +File: custom.css - Use this file to add any custom styles you need + +If you add styles to this template, be sure to include it in your template files. +*/ \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/css/gt-styles.css b/OhmVC/ContactAdmin/web/css/gt-styles.css new file mode 100644 index 0000000..68e4295 --- /dev/null +++ b/OhmVC/ContactAdmin/web/css/gt-styles.css @@ -0,0 +1,283 @@ +/* +Template: GT-FREE +File: gt-styles.css - This contains all the Gooey styles for the template. + +All the styles are separted into the following groups: +HTML, Body - for the html and body tags +Layout - any style that defines how the site is laid out (position and size of objects) +Modules - styles for modules +Nav - navigation bar +Headings - headings like h1, h2, etc +Text Styles - Styles for text +Lists - unordered and ordered lists +Forms - html forms +Links - links +Misc - anything that doesn't fit elsewhere +*/ + +/* @group HTML, Body */ +body { + font-family: "Trebuchet MS", sans-serif; +} +/* @end */ + +/* @group Layout */ +/* Heading Styles */ +.gt-hd { + background-color: #2c2c2c; + padding-top: 1px; +} +.gt-hd .gt-logo { + margin-left: 25px; + margin-bottom: 10px; + margin-top: 15px; + color: #fff; + font-size: 215%; + font-weight: normal; + float: left; + display: inline; +} + +/* Body Styles */ +.gt-bd { + padding: 15px 35px; +} +.gt-cols .gt-content { + width: 65%; + float: left; + display: inline; +} +.gt-cols .gt-sidebar { + width: 30%; + float: right; + display: inline; +} +.gt-left-col { + width: 48%; + float: left; + display: inline; +} +.gt-right-col { + width: 48%; + float: right; + display: inline; +} + +/* Footer Styles */ +.gt-footer { + clear: both; + border-top: 1px solid #aaa; + font-size: 93%; + color: #666666; + padding: 10px; + margin: 20px 35px; + text-align: center; +} +/* @end */ + +/* @group Modules */ +/* Width Styles */ +.gt-width-33 { + width: 33%; +} +.gt-width-66 { + width: 66%; +} +.gt-width-99 { + width: 99%; +} +.gt-width-25 { + width: 25%; +} +.gt-width-50 { + width: 50%; +} +.gt-width-75 { + width: 75%; +} +.gt-width-100 { + width: 100%; +} + + +/* @end */ + +/* @group Nav */ +/* Main Navigation */ +.gt-nav { + margin-left: 20px; + clear: both; +} +.gt-nav ul li { + background-color: #ccc; + margin: 0 2px; + float: left; + display: inline; +} +.gt-nav ul li a { + display: block; + padding: .75em 2.2em; + font-weight: bold; + float: left; + display: inline; +} +.gt-nav a:link, .gt-nav a:visited { + color: #333; + text-decoration: none; + font-size: 108%; +} +.gt-nav a:hover { + color: #000; +} + + +/* @end */ + +/* @group Headings */ +h1 { + font-size: 182%; + color: #6caa00; + margin-bottom: 10px; +} + +/* H2 */ +h2 { + font-size: 161.6%; + color: #6caa00; + margin-bottom: 10px; +} +h3 { + font-size: 138.5%; + color: #333; + margin-bottom: 10px; +} +h4 { + font-size: 123.1%; + color: #333; + margin-bottom: 10px; + font-weight: bold; +} +h5 { + font-size: 123.1%; + color: #333; + margin-bottom: 10px; +} +h6 { + font-size: 100%; + color: #6caa00; + margin-bottom: 10px; + font-weight: bold; +} +/* @end */ + +/* @group Text Styles */ +address { + margin-bottom: 10px; +} +blockquote { + margin: 10px 40px 20px 40px; + font-style: italic; +} +code { + font-family: monospace; +} +dl { + margin-left: 30px; + margin-bottom: 20px; +} +dl dt { + font-weight: bold; +} +dl dd { + margin-left: 10px; + margin-bottom: 5px; +} +em { + font-style: italic; +} +p { + margin-bottom: 10px; + line-height: 130%; +} +q { + font-style: italic; +} +strong { + font-weight: bold; +} +tt { + font-family: monospace; +} + + +/* Custom Text Classes */ +.gt-error { + background-color: #cc0000; + padding: .5em; + color: #fff; +} +.gt-notice-box { + border: 3px solid #aaa; + padding: 1em; + background-color: #f5f9ea; +} +.gt-success { + background-color: #6caa00; + padding: .5em; + color: #fff; +} +/* @end */ + +/* @group Lists */ +ol { + margin-bottom: 20px; +} +ol li { + list-style-type: decimal; + margin-left: 40px; + margin-bottom: 2px; +} +ul { + margin-bottom: 20px; +} +ul li { + list-style-type: disc; + margin-left: 35px; + margin-bottom: 2px; +} +/* @end */ + +/* @group Forms */ +/* Default Form */ + +/* @end */ + +/* @group Links - link visited hover active */ +a:link, a:visited { + color: #6caa00; + text-decoration: underline; +} +a:hover { + text-decoration: none; +} +/* @end */ + +/* @group Misc */ +.clear { + clear: both; +} +.clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.clearfix {display: inline-block;} + +/* Hides from IE-mac \*/ +* html .clearfix {height: 1%;} +.clearfix {display: block;} +/* End hide from IE-mac */ +/* @end */ \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/css/override.css b/OhmVC/ContactAdmin/web/css/override.css new file mode 100644 index 0000000..c7448ce --- /dev/null +++ b/OhmVC/ContactAdmin/web/css/override.css @@ -0,0 +1,8 @@ +/* +Template: GT-FREE +File: override.css - Use this file to override any template styles +To override a style, just copy and paste the style from gt-styles.css into this file. +You can then use !important to override the style. + +If you add styles to this template, be sure to include it in your template files. +*/ \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/css/reset-fonts.css b/OhmVC/ContactAdmin/web/css/reset-fonts.css new file mode 100644 index 0000000..9baf1ef --- /dev/null +++ b/OhmVC/ContactAdmin/web/css/reset-fonts.css @@ -0,0 +1,12 @@ +/* +THIS IS THE RESET CSS FILE, DO NOT MODIFY THIS FILE. +IF YOU NEED TO MAKE CHANGES TO ANY OF THESE STYLES, MAKE THE CHANGES IN OVERRIDE.CSS + +Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.3.0 +*/ +/*reset.css*/body{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup,sub{line-height:-1px;vertical-align:text-top;}sub{vertical-align:text-bottom;}input, textarea, select{font-family:inherit;font-size:inherit;font-weight:inherit;} + +/*fonts.css*/body {font:13px/1.22 arial,helvetica,clean,sans-serif;font-size:small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;font-size:108%;line-height:99%;} \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/index.jsp b/OhmVC/ContactAdmin/web/index.jsp new file mode 100644 index 0000000..5d15bf8 --- /dev/null +++ b/OhmVC/ContactAdmin/web/index.jsp @@ -0,0 +1,79 @@ +<%-- + Document : index + Created on : 23/10/2010, 09:48:00 AM + Author : migueldiab +--%> + +<%@page import="edu.ort.discomp.framework.CommandFactory"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + Contact Admin + + + + + + + +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + +
+ <% + String view; + if (request.getAttribute(CommandFactory.VIEW)==null) { + view = "/layout/home.jsp"; + } + else { + view = request.getAttribute(CommandFactory.VIEW).toString(); + } + %> + + +
+ + + + +
+ + +
+ <% if (request.getAttribute(CommandFactory.ERROR) != null) { %> +
Error : <%= request.getAttribute(CommandFactory.ERROR) %>
+ <% } %> + +
+ + +
+ + + + + + + diff --git a/OhmVC/ContactAdmin/web/layout/error.jsp b/OhmVC/ContactAdmin/web/layout/error.jsp new file mode 100644 index 0000000..bb7f835 --- /dev/null +++ b/OhmVC/ContactAdmin/web/layout/error.jsp @@ -0,0 +1,10 @@ +<%-- + Document : home + Created on : 21/06/2010, 02:01:20 PM + Author : Administrator +--%> + +

404 Not Found

+ +

I haz broken teh internet!

+ diff --git a/OhmVC/ContactAdmin/web/layout/home.jsp b/OhmVC/ContactAdmin/web/layout/home.jsp new file mode 100644 index 0000000..3d30ed9 --- /dev/null +++ b/OhmVC/ContactAdmin/web/layout/home.jsp @@ -0,0 +1,7 @@ +<%-- + Document : home + Created on : 21/06/2010, 02:01:20 PM + Author : Administrator +--%> + +Homepage \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/layout/nav.jsp b/OhmVC/ContactAdmin/web/layout/nav.jsp new file mode 100644 index 0000000..4c0c2fa --- /dev/null +++ b/OhmVC/ContactAdmin/web/layout/nav.jsp @@ -0,0 +1,15 @@ +<%-- + Document : newjspnav + Created on : 21/06/2010, 01:50:56 PM + Author : Administrator +--%> + + + \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/layout/side.jsp b/OhmVC/ContactAdmin/web/layout/side.jsp new file mode 100644 index 0000000..4d0eda1 --- /dev/null +++ b/OhmVC/ContactAdmin/web/layout/side.jsp @@ -0,0 +1,13 @@ +<%-- + Document : newjspnav + Created on : 21/06/2010, 01:50:56 PM + Author : Administrator +--%> + +Bienvenido Usuario +
+

Opciones

+ + \ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/lost.jsp b/OhmVC/ContactAdmin/web/lost.jsp new file mode 100644 index 0000000..61bc37a --- /dev/null +++ b/OhmVC/ContactAdmin/web/lost.jsp @@ -0,0 +1,67 @@ +<%-- + Document : index + Created on : 23/10/2010, 09:48:00 AM + Author : migueldiab +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + Estás perdido? + + + + + + + +
+ + + + + +
+ +
+ + + + +
+ + + +
+ +
+

Estás perdido?

+ Tal vez podamos sugerirte algo... +
+ + + +
+ + +
+ <% if (request.getAttribute("error") != null) { %> +
Error : <%= request.getAttribute("error") %>
+ <% } %> + +
+ + +
+ + + + + + + diff --git a/OhmVC/ContactAdmin/web/paginas/Bienvenido.jsp b/OhmVC/ContactAdmin/web/paginas/Bienvenido.jsp new file mode 100644 index 0000000..65529a9 --- /dev/null +++ b/OhmVC/ContactAdmin/web/paginas/Bienvenido.jsp @@ -0,0 +1 @@ +

Bienvenido!

diff --git a/OhmVC/ContactAdmin/web/paginas/Login.jsp b/OhmVC/ContactAdmin/web/paginas/Login.jsp new file mode 100644 index 0000000..9d8b1ad --- /dev/null +++ b/OhmVC/ContactAdmin/web/paginas/Login.jsp @@ -0,0 +1 @@ +

Login

\ No newline at end of file diff --git a/OhmVC/ContactAdmin/web/paginas/Principal.jsp b/OhmVC/ContactAdmin/web/paginas/Principal.jsp new file mode 100644 index 0000000..2f5fab7 --- /dev/null +++ b/OhmVC/ContactAdmin/web/paginas/Principal.jsp @@ -0,0 +1 @@ +

Principal

\ No newline at end of file diff --git a/OhmVC/OhmVC/build.xml b/OhmVC/OhmVC/build.xml new file mode 100644 index 0000000..cdbba2d --- /dev/null +++ b/OhmVC/OhmVC/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project OhmVC. + + + diff --git a/OhmVC/OhmVC/catalog.xml b/OhmVC/OhmVC/catalog.xml new file mode 100644 index 0000000..c3bb0d5 --- /dev/null +++ b/OhmVC/OhmVC/catalog.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OhmVC/OhmVC/nbproject/ant-deploy.xml b/OhmVC/OhmVC/nbproject/ant-deploy.xml new file mode 100644 index 0000000..b03100d --- /dev/null +++ b/OhmVC/OhmVC/nbproject/ant-deploy.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OhmVC/OhmVC/nbproject/build-impl.xml b/OhmVC/OhmVC/nbproject/build-impl.xml new file mode 100644 index 0000000..fa8e92d --- /dev/null +++ b/OhmVC/OhmVC/nbproject/build-impl.xml @@ -0,0 +1,993 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set build.generated.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.jar + + + + + + + + + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Main class must be set. Go to OhmVC project properties -> Run and set the main class there. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + diff --git a/OhmVC/OhmVC/nbproject/genfiles.properties b/OhmVC/OhmVC/nbproject/genfiles.properties new file mode 100644 index 0000000..6eda963 --- /dev/null +++ b/OhmVC/OhmVC/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=98ce1e7b +build.xml.script.CRC32=70961b4f +build.xml.stylesheet.CRC32=2c379194@1.16.2.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=98ce1e7b +nbproject/build-impl.xml.script.CRC32=a11df02c +nbproject/build-impl.xml.stylesheet.CRC32=b21e29a6@1.16.2.1 diff --git a/OhmVC/OhmVC/nbproject/private/private.properties b/OhmVC/OhmVC/nbproject/private/private.properties new file mode 100644 index 0000000..712236e --- /dev/null +++ b/OhmVC/OhmVC/nbproject/private/private.properties @@ -0,0 +1,11 @@ +deploy.ant.properties.file=D:\\Users\\migueldiab.lorien\\.netbeans\\6.9\\gfv3-1241558004.properties +j2ee.appclient.tool.jvmoptions=-Djava.endorsed.dirs="C:\\glassfish-3.0.1\\glassfish\\lib\\endorsed";"C:\\glassfish-3.0.1\\glassfish\\modules\\endorsed" -javaagent:"C:\\glassfish-3.0.1\\glassfish\\modules\\gf-client.jar"=mode=acscript,arg=-configxml,arg="C:\\glassfish-3.0.1\\glassfish\\domains\\domain1\\config\\sun-acc.xml",client=jar= +j2ee.appclient.tool.mainclass=org.glassfish.appclient.client.AppClientFacade +j2ee.appclient.tool.runtime= +j2ee.platform.is.jsr109=true +j2ee.server.instance=[C:\\glassfish-3.0.1\\glassfish]deployer:gfv3ee6:localhost:4848 +javac.debug=true +javadoc.preview=true +source.encoding=UTF-8 +user.properties.file=D:\\Users\\migueldiab.lorien\\.netbeans\\6.9\\build.properties +wa.copy.client.jar.from=C:\\glassfish-3.0.1\\glassfish\\domains\\domain1\\generated\\xml diff --git a/OhmVC/OhmVC/nbproject/private/private.xml b/OhmVC/OhmVC/nbproject/private/private.xml new file mode 100644 index 0000000..cc2c0e5 --- /dev/null +++ b/OhmVC/OhmVC/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/OhmVC/OhmVC/nbproject/project.properties b/OhmVC/OhmVC/nbproject/project.properties new file mode 100644 index 0000000..a3f6fb2 --- /dev/null +++ b/OhmVC/OhmVC/nbproject/project.properties @@ -0,0 +1,90 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +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.dir}/jar +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.ear.classes.dir=${build.dir}/jar +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.ear.jar=${dist.dir}/${jar.name} +dist.jar=${dist.dir}/${jar.name} +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +includes=** +j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args} +j2ee.platform=1.6 +j2ee.platform.classpath=\ + ${libs.GlassFish_Server_3.classpath} +j2ee.platform.embeddableejb.classpath=${libs.GlassFish_Server_3.embeddableejb} +j2ee.platform.jwsdp.classpath=\ + ${libs.GlassFish_Server_3.wsjwsdp} +j2ee.platform.wscompile.classpath=\ + ${libs.GlassFish_Server_3.wscompile} +j2ee.platform.wsgen.classpath=\ + ${libs.GlassFish_Server_3.wsgenerate} +j2ee.platform.wsimport.classpath=\ + ${libs.GlassFish_Server_3.wsimport} +j2ee.platform.wsit.classpath=\ + ${libs.GlassFish_Server_3.wsinterop} +j2ee.server.type=gfv3ee6 +jar.compress=false +jar.name=OhmVC.jar +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +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.classpath}:\ + ${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.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=obligatorio.Main +manifest.file=${meta.inf}/MANIFEST.MF +meta.inf=${source.root}/conf +platform.active=default_platform +resource.dir=setup +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.root=src +src.dir=${source.root}/java +test.src.dir=test diff --git a/OhmVC/OhmVC/nbproject/project.xml b/OhmVC/OhmVC/nbproject/project.xml new file mode 100644 index 0000000..fbc6c8a --- /dev/null +++ b/OhmVC/OhmVC/nbproject/project.xml @@ -0,0 +1,20 @@ + + + org.netbeans.modules.j2ee.clientproject + + + OhmVC + 1.6.5 + + + + + + + + + ../lib/nblibraries.properties + + + + diff --git a/OhmVC/OhmVC/src/conf/MANIFEST.MF b/OhmVC/OhmVC/src/conf/MANIFEST.MF new file mode 100644 index 0000000..1574df4 --- /dev/null +++ b/OhmVC/OhmVC/src/conf/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/OhmVC/OhmVC/src/conf/application-client.xml b/OhmVC/OhmVC/src/conf/application-client.xml new file mode 100644 index 0000000..34ff2b0 --- /dev/null +++ b/OhmVC/OhmVC/src/conf/application-client.xml @@ -0,0 +1,4 @@ + + + OhmVC + diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/CommandFactory.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/CommandFactory.java new file mode 100644 index 0000000..9230628 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/CommandFactory.java @@ -0,0 +1,48 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package edu.ort.discomp.framework; + +import java.util.HashMap; +import java.util.Map; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpServlet; + +/** + * + * @author migueldiab + */ +public class CommandFactory extends HttpServlet { + + /** + * Mapa de acciones del framework. + */ + private Map> actionMap = new HashMap>(); + + @Override + public void init() throws ServletException { + super.init(); + actionMap.put("home", HomeWebAction.class); + actionMap.put("error", NotFound404WebAction.class); + } + + + protected String forwardByReflection(String type, HttpServletRequest request, HttpServletResponse response) + throws ClassNotFoundException, InstantiationException, ServletException, IllegalAccessException { + final Class webActionClass = (Class) Class.forName(type); + final WebAction webAction = (WebAction) webActionClass.newInstance(); + return webAction.execute(this, request, response); + } + + void forwardByActionMap(String key, HttpServletRequest request, HttpServletResponse response) + throws InstantiationException, IllegalAccessException, ServletException { + final Class webActionClass = (Class) actionMap.get(key); + final WebAction webAction = (WebAction) webActionClass.newInstance(); + webAction.execute(this, request, response); + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/FrontController.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/FrontController.java new file mode 100644 index 0000000..ca2fcb7 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/FrontController.java @@ -0,0 +1,126 @@ +package edu.ort.discomp.framework; + +import edu.ort.discomp.xml.MvcXMLReader; +import edu.ort.discomp.xml.jaxb.Command; +import edu.ort.discomp.xml.jaxb.CommandMappings; +import edu.ort.discomp.xml.jaxb.Forward; +import edu.ort.discomp.xml.jaxb.MvcConfig; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class FrontController extends HttpServlet { + + @Override + public void init() throws ServletException { + super.init(); + MvcXMLReader.loadMvcConfig(getServletContext().getResourceAsStream("/WEB-INF/mvc.xml")); + } + + /** + * Method 'FrontController'. + */ + public FrontController() { + + } + + public void doRedirect(final HttpServletRequest request, final HttpServletResponse response) throws ServletException { + + } + + /** + * Method 'doPost' + * + * @param request + * @param response + * @throws ServletException + */ + @Override + public void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException { + try { + processFrontControllerRequest(request, response); + } catch (InstantiationException ex) { + Logger.getLogger(FrontController.class.getName()).log(Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + Logger.getLogger(FrontController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + /** + * Redirecciona toda llamada por GET al mismo maejador de POST + * + * @param request HttpServletRequest + * @param response HttpServletResponse + * @throws ServletException Exception + */ + @Override + public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException { + doPost(request, response); + } + + private void processFrontControllerRequest(final HttpServletRequest request, final HttpServletResponse response) + throws InstantiationException, ServletException, IllegalAccessException { + String servletPath = request.getRequestURI(); + String contextPath = getServletContext().getContextPath(); + + String servletName = getServletName(); + String pathInfo = request.getPathInfo(); + System.out.println("1" + servletPath); + System.out.println("2" + contextPath); + System.out.println("3" + servletName); + System.out.println("4" + pathInfo); + + String commandCalled = servletPath.replaceAll(contextPath, ""); + MvcConfig mvcConfig = MvcXMLReader.getMvcConfig(); + CommandMappings commandMappings = mvcConfig.getCommandMappings(); + for (Command command : commandMappings.getCommand()) { + if (command.getPath().equals(commandCalled)) { + if (command.getUrl() != null) { + try { + forwardByURL(command.getUrl(), request, response); + } catch (IOException ex) { + Logger.getLogger(FrontController.class.getName()).log(Level.SEVERE, null, ex); + } + } else if (command.getType() != null) { + try { + forwardByType(command, request, response); + } catch (ClassNotFoundException ex) { + Logger.getLogger(FrontController.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + } + new CommandFactory().forwardByActionMap("error", request, response); + + } + + private void forwardByURL(String url, HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + request.setAttribute("view", url); + ServletContext ctx = getServletContext(); + RequestDispatcher dispatcher = ctx.getRequestDispatcher("/index.jsp"); + dispatcher.forward(request, response); + } + + private void forwardByType(Command command, HttpServletRequest request, HttpServletResponse response) + throws ClassNotFoundException, InstantiationException, ServletException, IllegalAccessException { + final String responseForward = new CommandFactory().forwardByReflection(command.getType(), request, response); + if (responseForward != null && !responseForward.isEmpty()) { + for (Forward forward : command.getForward()) { + if (forward.getName().equals(responseForward) && forward.getPath() != null) { + try { + forwardByURL(forward.getPath(), request, response); + } catch (IOException ex) { + Logger.getLogger(FrontController.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + } + } +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/HomeWebAction.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/HomeWebAction.java new file mode 100644 index 0000000..644a530 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/HomeWebAction.java @@ -0,0 +1,28 @@ +package edu.ort.discomp.framework; + +import javax.servlet.*; +import javax.servlet.http.*; + +public class HomeWebAction extends WebAction +{ + /** + * Method 'execute' + * + * @param servlet + * @param request + * @param response + * @throws ServletException + */ + @Override + public String execute(CommandFactory servlet, HttpServletRequest request, HttpServletResponse response) throws ServletException + { + try { + forward( servlet, request, response, "/index.jsp" ); + } + catch (Exception e) { + throw new ServletException( "Failed to process request", e ); + } + return null; + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/NotFound404WebAction.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/NotFound404WebAction.java new file mode 100644 index 0000000..4689393 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/NotFound404WebAction.java @@ -0,0 +1,29 @@ +package edu.ort.discomp.framework; + +import javax.servlet.*; +import javax.servlet.http.*; + +public class NotFound404WebAction extends WebAction +{ + /** + * Method 'execute' + * + * @param servlet + * @param request + * @param response + * @throws ServletException + */ + @Override + public String execute(CommandFactory servlet, HttpServletRequest request, HttpServletResponse response) throws ServletException + { + try { + request.setAttribute( "view", "/layout/error.jsp" ); + forward( servlet, request, response, "/index.jsp" ); + } + catch (Exception e) { + throw new ServletException( "Failed to process request", e ); + } + return null; + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAction.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAction.java new file mode 100644 index 0000000..7798ed6 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAction.java @@ -0,0 +1,87 @@ +package edu.ort.discomp.framework; + +import javax.servlet.*; +import javax.servlet.http.*; +import java.util.Date; +import java.text.SimpleDateFormat; +import java.text.ParseException; +import java.math.BigDecimal; + +public abstract class WebAction +{ + private static final SimpleDateFormat df = new SimpleDateFormat( "dd-MMM-yyyy" ); + + /** + * Method 'execute' + * + * @param servlet + * @param request + * @param response + * @throws ServletException + */ + public abstract String execute(CommandFactory servlet, HttpServletRequest request, HttpServletResponse response) throws ServletException; + + /** + * Method 'forward' + * + * @param servlet + * @param request + * @param response + * @param page + * @throws ServletException + */ + public void forward(CommandFactory servlet, HttpServletRequest request, HttpServletResponse response, String page) throws ServletException + { + try { + ServletContext ctx = servlet.getServletContext(); + RequestDispatcher dispatcher = ctx.getRequestDispatcher(page); + if (dispatcher == null) { + throw new RuntimeException( "No dispatcher found for " + page ); + } + dispatcher.forward(request, response); + } + catch (Exception e) { + e.printStackTrace(); + throw new ServletException( "Failed to process request", e ); + } + + } + + public String parseString(HttpServletRequest request, String paramName) { + return request.getParameter( paramName ); + } + + public BigDecimal parseBigDecimal(HttpServletRequest request, String paramName) { + return new BigDecimal( parseString(request, paramName) ); + } + + public Date parseDate(HttpServletRequest request, String paramName) + throws ParseException { + + synchronized (df) { + return df.parse(request.getParameter( paramName )); + } + } + + public short parseShort(HttpServletRequest request, String paramName) { + return Short.parseShort( parseString(request, paramName) ); + } + + public int parseInt(HttpServletRequest request, String paramName) { + return Integer.parseInt( parseString(request, paramName) ); + } + + public long parseLong(HttpServletRequest request, String paramName) { + return Long.parseLong( parseString(request, paramName) ); + } + + public float parseFloat(HttpServletRequest request, String paramName) { + return Float.parseFloat( parseString(request, paramName) ); + } + + public double parseDouble(HttpServletRequest request, String paramName) { + return Double.parseDouble( parseString(request, paramName) ); + } +} + + diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAdmin.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAdmin.java new file mode 100644 index 0000000..63392f4 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/framework/WebAdmin.java @@ -0,0 +1,61 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package edu.ort.discomp.framework; + +import java.util.Date; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; + +/** + * + * @author Administrator + */ +public class WebAdmin { + + public static Cookie registrarCookie(String nombreCookie, String valorCookie) { +// Date now = new Date(); +// String timestamp = now.toString(); + Cookie cookie = new Cookie (nombreCookie,valorCookie); + cookie.setMaxAge(1 * 8 * 60 * 60); + return cookie; + } + public static Cookie expirarCookie(String nombreCookie) { +// Date now = new Date(); +// String timestamp = now.toString(); + Cookie cookie = new Cookie (nombreCookie,""); + cookie.setMaxAge(0); + return cookie; + } + + public static boolean usuarioAutenticado(HttpServletRequest request) { + if (obtenerCookie(request, "usuario")!=null) { + return true; + } + return false; + } + + public static String obtenerUsuario(HttpServletRequest request) { + return obtenerCookie(request, "usuario").getValue(); + } + + private static Cookie obtenerCookie(HttpServletRequest request, String cookieName) { + Cookie cookies [] = request.getCookies (); + Cookie cookieResponse = null; + if (cookies != null) + { + for (int i = 0; i < cookies.length; i++) + { + if (cookies[i].getName().equals(cookieName)) + { + cookieResponse = cookies[i]; + return cookieResponse; + } + } + } + return null; + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/MvcXMLReader.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/MvcXMLReader.java new file mode 100644 index 0000000..f99ef1d --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/MvcXMLReader.java @@ -0,0 +1,45 @@ +package edu.ort.discomp.xml; + +import edu.ort.discomp.xml.jaxb.MvcConfig; +import java.io.File; +import java.io.InputStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; + +/** + * + * @author migueldiab + */ +public class MvcXMLReader { + + private static MvcConfig mvcConfig; + + public static MvcConfig getMvcConfig() { + return mvcConfig; + } + + public static void loadMvcConfig(InputStream is) { + try { + JAXBContext jc = JAXBContext.newInstance("edu.ort.discomp.xml.jaxb"); + Unmarshaller unmarshaller = jc.createUnmarshaller(); + mvcConfig = (MvcConfig) unmarshaller.unmarshal(is); + } catch (JAXBException ex) { + Logger.getLogger(MvcXMLReader.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public static void loadMvcConfig(File myFile) { + try { + JAXBContext jc = JAXBContext.newInstance("edu.ort.discomp.xml.jaxb"); + Unmarshaller unmarshaller = jc.createUnmarshaller(); + mvcConfig = (MvcConfig) unmarshaller.unmarshal(myFile); + } catch (JAXBException ex) { + Logger.getLogger(MvcXMLReader.class.getName()).log(Level.SEVERE, null, ex); + } + + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Command.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Command.java new file mode 100644 index 0000000..f4dc059 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Command.java @@ -0,0 +1,144 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-7 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.11.08 at 10:21:47 PM UYST +// + + +package edu.ort.discomp.xml.jaxb; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.NormalizedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "forward" +}) +@XmlRootElement(name = "command") +public class Command { + + @XmlAttribute(name = "type") + @XmlJavaTypeAdapter(NormalizedStringAdapter.class) + protected String type; + @XmlAttribute(name = "url") + @XmlJavaTypeAdapter(NormalizedStringAdapter.class) + protected String url; + @XmlAttribute(name = "path") + @XmlJavaTypeAdapter(NormalizedStringAdapter.class) + protected String path; + protected List forward; + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the url property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getUrl() { + return url; + } + + /** + * Sets the value of the url property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setUrl(String value) { + this.url = value; + } + + /** + * Gets the value of the path property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPath() { + return path; + } + + /** + * Sets the value of the path property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPath(String value) { + this.path = value; + } + + /** + * Gets the value of the forward property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the forward property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getForward().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Forward } + * + * + */ + public List getForward() { + if (forward == null) { + forward = new ArrayList(); + } + return this.forward; + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/CommandMappings.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/CommandMappings.java new file mode 100644 index 0000000..f622541 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/CommandMappings.java @@ -0,0 +1,60 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-7 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.11.08 at 10:21:47 PM UYST +// + + +package edu.ort.discomp.xml.jaxb; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "command" +}) +@XmlRootElement(name = "command-mappings") +public class CommandMappings { + + protected List command; + + /** + * Gets the value of the command property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the command property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCommand().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Command } + * + * + */ + public List getCommand() { + if (command == null) { + command = new ArrayList(); + } + return this.command; + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Forward.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Forward.java new file mode 100644 index 0000000..278f025 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/Forward.java @@ -0,0 +1,83 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-7 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.11.08 at 10:21:47 PM UYST +// + + +package edu.ort.discomp.xml.jaxb; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.NormalizedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "forward") +public class Forward { + + @XmlAttribute(name = "path") + @XmlJavaTypeAdapter(NormalizedStringAdapter.class) + protected String path; + @XmlAttribute(name = "name") + @XmlJavaTypeAdapter(NormalizedStringAdapter.class) + protected String name; + + /** + * Gets the value of the path property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPath() { + return path; + } + + /** + * Sets the value of the path property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPath(String value) { + this.path = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/MvcConfig.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/MvcConfig.java new file mode 100644 index 0000000..54ec332 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/MvcConfig.java @@ -0,0 +1,55 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-7 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.11.08 at 10:21:47 PM UYST +// + + +package edu.ort.discomp.xml.jaxb; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "commandMappings" +}) +@XmlRootElement(name = "mvc-config") +public class MvcConfig { + + @XmlElement(name = "command-mappings", required = true) + protected CommandMappings commandMappings; + + /** + * Gets the value of the commandMappings property. + * + * @return + * possible object is + * {@link CommandMappings } + * + */ + public CommandMappings getCommandMappings() { + return commandMappings; + } + + /** + * Sets the value of the commandMappings property. + * + * @param value + * allowed object is + * {@link CommandMappings } + * + */ + public void setCommandMappings(CommandMappings value) { + this.commandMappings = value; + } + +} diff --git a/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/ObjectFactory.java b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/ObjectFactory.java new file mode 100644 index 0000000..6eb2b72 --- /dev/null +++ b/OhmVC/OhmVC/src/java/edu/ort/discomp/xml/jaxb/ObjectFactory.java @@ -0,0 +1,71 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-7 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2010.11.08 at 10:21:47 PM UYST +// + + +package edu.ort.discomp.xml.jaxb; + +import javax.xml.bind.annotation.XmlRegistry; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the generated package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link CommandMappings } + * + */ + public CommandMappings createCommandMappings() { + return new CommandMappings(); + } + + /** + * Create an instance of {@link MvcConfig } + * + */ + public MvcConfig createMvcConfig() { + return new MvcConfig(); + } + + /** + * Create an instance of {@link Command } + * + */ + public Command createCommand() { + return new Command(); + } + + /** + * Create an instance of {@link Forward } + * + */ + public Forward createForward() { + return new Forward(); + } + +} diff --git a/OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.dtd b/OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.dtd new file mode 100644 index 0000000..44a5e2c --- /dev/null +++ b/OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.dtd @@ -0,0 +1,17 @@ + + + + + + + + + + \ No newline at end of file diff --git a/OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.xml b/OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.xml new file mode 100644 index 0000000..81fe219 --- /dev/null +++ b/OhmVC/OhmVC/xml-resources/jaxb/mvcConfig/mvc.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OhmVC/build.xml b/OhmVC/build.xml new file mode 100644 index 0000000..242f2e7 --- /dev/null +++ b/OhmVC/build.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + Builds, tests, and runs the project OhmVC. + + + diff --git a/OhmVC/nbproject/ant-deploy.xml b/OhmVC/nbproject/ant-deploy.xml new file mode 100644 index 0000000..b03100d --- /dev/null +++ b/OhmVC/nbproject/ant-deploy.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OhmVC/nbproject/build-impl.xml b/OhmVC/nbproject/build-impl.xml new file mode 100644 index 0000000..39a2495 --- /dev/null +++ b/OhmVC/nbproject/build-impl.xml @@ -0,0 +1,571 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set build.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.excludes + Must set dist.jar + + + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OhmVC/nbproject/genfiles.properties b/OhmVC/nbproject/genfiles.properties new file mode 100644 index 0000000..e17b274 --- /dev/null +++ b/OhmVC/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=a66c29a2 +build.xml.script.CRC32=927e6c93 +build.xml.stylesheet.CRC32=a5d15b16@1.18.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=a66c29a2 +nbproject/build-impl.xml.script.CRC32=a6dcc664 +nbproject/build-impl.xml.stylesheet.CRC32=56fd2fa2@1.18.1 diff --git a/OhmVC/nbproject/private/private.properties b/OhmVC/nbproject/private/private.properties new file mode 100644 index 0000000..cdba24c --- /dev/null +++ b/OhmVC/nbproject/private/private.properties @@ -0,0 +1,8 @@ +deploy.ant.properties.file=D:\\Users\\migueldiab.lorien\\.netbeans\\6.9\\gfv3-1241558004.properties +j2ee.appclient.tool.jvmoptions=-Djava.endorsed.dirs="C:\\glassfish-3.0.1\\glassfish\\lib\\endorsed";"C:\\glassfish-3.0.1\\glassfish\\modules\\endorsed" -javaagent:"C:\\glassfish-3.0.1\\glassfish\\modules\\gf-client.jar"=mode=acscript,arg=-configxml,arg="C:\\glassfish-3.0.1\\glassfish\\domains\\domain1\\config\\sun-acc.xml",client=jar= +j2ee.appclient.tool.mainclass=org.glassfish.appclient.client.AppClientFacade +j2ee.appclient.tool.runtime= +j2ee.platform.is.jsr109=true +j2ee.server.instance=[C:\\glassfish-3.0.1\\glassfish]deployer:gfv3ee6:localhost:4848 +netbeans.user=D:\\Users\\migueldiab.lorien\\.netbeans\\6.9 +wa.copy.client.jar.from=C:\\glassfish-3.0.1\\glassfish\\domains\\domain1\\generated\\xml diff --git a/OhmVC/nbproject/private/private.xml b/OhmVC/nbproject/private/private.xml new file mode 100644 index 0000000..05a47d7 --- /dev/null +++ b/OhmVC/nbproject/private/private.xml @@ -0,0 +1,6 @@ + + + + file:/D:/Users/migueldiab.lorien/Documents/Ort/DisComp/Obligatorio/OhmVC/nbproject/build-impl.xml + + diff --git a/OhmVC/nbproject/project.properties b/OhmVC/nbproject/project.properties new file mode 100644 index 0000000..487fea5 --- /dev/null +++ b/OhmVC/nbproject/project.properties @@ -0,0 +1,41 @@ +build.classes.excludes=**/*.java,**/*.form,**/.nbattrs +build.dir=build +build.generated.dir=${build.dir}/generated +client.module.uri=ContactAdmin +client.urlPart= +debug.classpath=${javac.classpath}::${jar.content.additional}:${run.classpath} +display.browser=true +dist.dir=dist +dist.jar=${dist.dir}/${jar.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args} +j2ee.deploy.on.save=true +j2ee.platform=1.6 +j2ee.platform.classpath=${libs.GlassFish_Server_3.classpath} +j2ee.platform.embeddableejb.classpath=${libs.GlassFish_Server_3.embeddableejb} +j2ee.platform.jwsdp.classpath=${libs.GlassFish_Server_3.wsjwsdp} +j2ee.platform.wscompile.classpath=${libs.GlassFish_Server_3.wscompile} +j2ee.platform.wsgen.classpath=${libs.GlassFish_Server_3.wsgenerate} +j2ee.platform.wsimport.classpath=${libs.GlassFish_Server_3.wsimport} +j2ee.platform.wsit.classpath=${libs.GlassFish_Server_3.wsinterop} +j2ee.server.type=gfv3ee6 +jar.compress=false +jar.content.additional=\ + ${reference.OhmVC.j2ee-module-car}:\ + ${reference.ContactAdmin.dist-ear} +jar.name=OhmVC.ear +javac.debug=true +javac.deprecation=false +javac.source=1.6 +javac.target=1.6 +meta.inf=src/conf +no.dependencies=false +platform.active=default_platform +project.ContactAdmin=ContactAdmin +project.OhmVC=OhmVC +reference.ContactAdmin.dist-ear=${project.ContactAdmin}/dist/ContactAdmin.war +reference.OhmVC.j2ee-module-car=${project.OhmVC}/dist/OhmVC.jar +resource.dir=setup +run.classpath= +source.root=. diff --git a/OhmVC/nbproject/project.xml b/OhmVC/nbproject/project.xml new file mode 100644 index 0000000..15d8a07 --- /dev/null +++ b/OhmVC/nbproject/project.xml @@ -0,0 +1,42 @@ + + + org.netbeans.modules.j2ee.earproject + + + OhmVC + 1.6.5 + + + + ${reference.OhmVC.j2ee-module-car} + / + + + ${reference.ContactAdmin.dist-ear} + / + + + + + .\lib\nblibraries.properties + + + + ContactAdmin + j2ee_ear_archive + + dist-ear + clean-ear + dist-ear + + + OhmVC + j2ee_ear_archive + + dist-ear + clean-ear + j2ee-module-car + + + +