commit 44ab97887221d6fef7eb099e53efe7f75910a133 Author: ktalamantes Date: Fri May 10 09:16:43 2024 -0500 version god login diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4ad5dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/inventario-ejb/build/ +/inventario-ejb/dist/ +/inventario-war/build/ +/inventario-war/dist/ +/build/ diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..5875d08 --- /dev/null +++ b/build.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + Builds, tests, and runs the project inventario. + + + diff --git a/inventario-ejb/build.xml b/inventario-ejb/build.xml new file mode 100644 index 0000000..47bd690 --- /dev/null +++ b/inventario-ejb/build.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + Builds, tests, and runs the project inventario-ejb. + + + diff --git a/inventario-ejb/nbproject/ant-deploy.xml b/inventario-ejb/nbproject/ant-deploy.xml new file mode 100644 index 0000000..fdc06d5 --- /dev/null +++ b/inventario-ejb/nbproject/ant-deploy.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inventario-ejb/nbproject/build-impl.xml b/inventario-ejb/nbproject/build-impl.xml new file mode 100644 index 0000000..fea089e --- /dev/null +++ b/inventario-ejb/nbproject/build-impl.xml @@ -0,0 +1,1235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set platform.home + Must set platform.bootcp + Must set platform.java + Must set platform.javac + + The J2SE Platform is not correctly set up. + Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. + Either open the project in the IDE and setup the Platform with the same name or add it manually. + For example like this: + ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file) + or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set main.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + 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/inventario-ejb/nbproject/genfiles.properties b/inventario-ejb/nbproject/genfiles.properties new file mode 100644 index 0000000..9538dd7 --- /dev/null +++ b/inventario-ejb/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=2131a66c +build.xml.script.CRC32=4fa0940f +build.xml.stylesheet.CRC32=a737d6c5@1.75 +# 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=2131a66c +nbproject/build-impl.xml.script.CRC32=4bc75cbf +nbproject/build-impl.xml.stylesheet.CRC32=62693482@1.75 diff --git a/inventario-ejb/nbproject/project.properties b/inventario-ejb/nbproject/project.properties new file mode 100644 index 0000000..3928464 --- /dev/null +++ b/inventario-ejb/nbproject/project.properties @@ -0,0 +1,78 @@ +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.dir}/classes +build.classes.excludes=**/*.java,**/*.form,**/.nbattrs +build.dir=build +build.ear.classes.dir=${build.dir}/classes +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 +debug.classpath=${javac.classpath}:${build.classes.dir} +debug.test.classpath=\ + ${run.test.classpath} +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-7.0.classpath} +excludes= +file.reference.primefaces-12.0.0.jar=..\\inventario-war\\libs\\primefaces-12.0.0.jar +includes=** +j2ee.compile.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7 +j2ee.platform.classpath=${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv4ee7 +jar.compress=false +jar.name=inventario-ejb.jar +jars.in.ejbjar=false +javac.classpath=\ + ${file.reference.primefaces-12.0.0.jar} +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath}:\ + ${libs.EclipseLink-GlassFish-v3.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +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= +meta.inf=${source.root}/conf +meta.inf.excludes=sun-cmp-mappings.xml +platform.active=JDK_1.8 +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 diff --git a/inventario-ejb/nbproject/project.xml b/inventario-ejb/nbproject/project.xml new file mode 100644 index 0000000..116a3fe --- /dev/null +++ b/inventario-ejb/nbproject/project.xml @@ -0,0 +1,18 @@ + + + org.netbeans.modules.j2ee.ejbjarproject + + + inventario-ejb + 1.6.5 + + file.reference.primefaces-12.0.0.jar + + + + + + + + + diff --git a/inventario-ejb/src/conf/MANIFEST.MF b/inventario-ejb/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/inventario-ejb/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/inventario-ejb/src/conf/META-INF/glassfish-resources.xml b/inventario-ejb/src/conf/META-INF/glassfish-resources.xml new file mode 100644 index 0000000..3a5a773 --- /dev/null +++ b/inventario-ejb/src/conf/META-INF/glassfish-resources.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/inventario-ejb/src/conf/persistence.xml b/inventario-ejb/src/conf/persistence.xml new file mode 100644 index 0000000..290c5fc --- /dev/null +++ b/inventario-ejb/src/conf/persistence.xml @@ -0,0 +1,8 @@ + + + + jdbc/inventario + false + + + diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/CategoriasBL.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/CategoriasBL.java new file mode 100644 index 0000000..234a1e0 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/CategoriasBL.java @@ -0,0 +1,107 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Stateless; +import mx.edu.tsj.chapala.sistemas.modelo.dao.CategoriasDAO; +import mx.edu.tsj.chapala.sistemas.modelos.Categorias; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Stateless +public class CategoriasBL implements CategoriasBLLocal { + + @Override + public Mensaje agregar(Categorias categorias) { + System.out.println("Llegaste al metodo de agregar!!"); + CategoriasDAO categoriasDAO = new CategoriasDAO(); + + //Usuarios existeUsuario = usuariosDao.buscarPorId(usuarios); + //Categorias existeCategorias = categoriasDAO.buscarPorId(categorias); + Categorias existeCategorias = categoriasDAO.buscarPorId(categorias); + + if(categorias.getNombre().isEmpty() || categorias.getDescripcion().isEmpty()){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(categorias.getNombre().length()>=45 || categorias.getDescripcion().length()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if (existeCategorias != null) { + return Mensaje.ELEMENTO_DUPLICADO; + }else{ + categoriasDAO.agregar(categorias); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Mensaje buscarId(Categorias categorias) { + + //UsuariosDAO usuariosDao = new UsuariosDAO(); + CategoriasDAO categoriasDAO = new CategoriasDAO(); + //Usuarios existeUsuario = usuariosDao.buscarPorId(usuarios); + Categorias existeCategorias = categoriasDAO.buscarPorId(categorias); + + if (existeCategorias== null) { + return Mensaje.ELEMENTO_NO_ENCONTRADO; + }else{ + //usuariosDao.buscarPorId(usuarios); + categoriasDAO.buscarPorId(categorias); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Categorias buscarIdLi(Categorias categorias) { + CategoriasDAO c = new CategoriasDAO(); + //Aqui le movi + return c.buscarPorId(categorias); + } + + @Override + public Mensaje editar(Categorias categorias) { + System.out.println("Llegaste al metodo de agregar!!"); + CategoriasDAO categoriasDAO = new CategoriasDAO(); + + //Usuarios existeUsuario = usuariosDao.buscarPorId(usuarios); + //Categorias existeCategorias = categoriasDAO.buscarPorId(categorias); + Categorias existeCategorias = categoriasDAO.buscarPorId(categorias); + + if(categorias.getNombre().isEmpty() || categorias.getDescripcion().isEmpty()){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(categorias.getNombre().length()>=45 || categorias.getDescripcion().length()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if(categorias.getId()==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + } + else{ + //usuariosDao.editar(usuarios); + categoriasDAO.editar(categorias); + return Mensaje.SIN_ERROR; + } + //autorDao.editar(autor); + } + + public List getAll(){ + //UsuariosDAO usuariosDAO = new UsuariosDAO(); + CategoriasDAO categoriasDAO = new CategoriasDAO(); + //return usuariosDAO.getTodos(true); + return categoriasDAO.getTodos(); + } + + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/CategoriasBLLocal.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/CategoriasBLLocal.java new file mode 100644 index 0000000..07a6e5d --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/CategoriasBLLocal.java @@ -0,0 +1,30 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Local; +import mx.edu.tsj.chapala.sistemas.modelos.Categorias; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Local +public interface CategoriasBLLocal { + Mensaje agregar(Categorias categorias); + + Mensaje buscarId(Categorias categorias); + + Categorias buscarIdLi(Categorias categorias); + + //Mensaje eliminar(Categorias categorias); + + Mensaje editar(Categorias categorias); + + List getAll(); + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/DetallespBL.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/DetallespBL.java new file mode 100644 index 0000000..ec695f7 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/DetallespBL.java @@ -0,0 +1,127 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Stateless; +import mx.edu.tsj.chapala.sistemas.modelo.dao.DetallespDAO; +import mx.edu.tsj.chapala.sistemas.modelo.dao.ProductosDAO; +import mx.edu.tsj.chapala.sistemas.modelos.Detallesp; +import mx.edu.tsj.chapala.sistemas.modelos.Productos; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Stateless +public class DetallespBL implements DetallespBLLocal { + + @Override + public Mensaje agregar(Detallesp detallesp) { + System.out.println("Llegaste al metodo de agregar!!"); + //roductosDAO productosDAO = new ProductosDAO(); + DetallespDAO detallesDAO = new DetallespDAO(); + + //Productos existeProductos = productosDAO.buscarPorId(productos); + Detallesp existeDetalles = detallesDAO.buscarPorId(detallesp); + + if(detallesp.getCantidad().isEmpty() || detallesp.getPrecioU() == 0){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(detallesp.getCantidad().length()>=45 || detallesp.getPrecioU()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if (existeDetalles != null) { + return Mensaje.ELEMENTO_DUPLICADO; + } else { + detallesDAO.agregar(detallesp); + return Mensaje.SIN_ERROR; + + } + } + + // Add business logic below. (Right-click in editor and choose + // "Insert Code > Add Business Method") + + @Override + public Mensaje buscarId(Detallesp detallesp) { + DetallespDAO detallesDAO = new DetallespDAO(); + //Productos existeProductos = productosDAO.buscarPorId(productos); + Detallesp existeDetalles = detallesDAO.buscarPorId(detallesp); + + if (existeDetalles == null) { + return Mensaje.ELEMENTO_NO_ENCONTRADO; + }else{ + detallesDAO.buscarPorId(detallesp); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Detallesp buscarIdLi(Detallesp detallesp) { + //ProductosDAO a = new ProductosDAO(); + DetallespDAO a = new DetallespDAO(); + //Aqui le movi + //return a.buscarPorId(productos); + return a.buscarPorId(detallesp); + } + + @Override + public Mensaje eliminar(Detallesp detallesp) { + //ProductosDAO a = new ProductosDAO(); + DetallespDAO a = new DetallespDAO(); + //Productos existe = a.buscarPorId(productos); + Detallesp existe = a.buscarPorId(detallesp); + if(existe==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + + } + else{ + //a.eliminar(productos); + //a.eliminar(detallesp); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Mensaje editar(Detallesp detallesp) { + System.out.println("Llegaste al metodo de editar"); + //ProductosDAO productosDao = new ProductosDAO(); + DetallespDAO detallesDAO = new DetallespDAO(); + //Productos existeProductos = productosDao.buscarPorIdLi(productos); + Detallesp existeDetalles = detallesDAO.buscarPorIdLi(detallesp); + //Test de validaciones + if(detallesp.getCantidad().isEmpty() || detallesp.getPrecioU() == 0){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(detallesp.getCantidad().length()>=45 || detallesp.getPrecioU()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if(detallesp.getId()==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + } + else{ + //productosDao.editar(productos); + detallesDAO.editar(detallesp); + return Mensaje.SIN_ERROR; + + } + + } + + public List getAll(){ + //UsuariosDAO usuariosDAO = new UsuariosDAO(); + DetallespDAO detallespDAO = new DetallespDAO(); + //return usuariosDAO.getTodos(true); + return detallespDAO.getTodos(); + } +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/DetallespBLLocal.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/DetallespBLLocal.java new file mode 100644 index 0000000..d14ab08 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/DetallespBLLocal.java @@ -0,0 +1,31 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Local; +import mx.edu.tsj.chapala.sistemas.modelos.Categorias; +import mx.edu.tsj.chapala.sistemas.modelos.Detallesp; +import mx.edu.tsj.chapala.sistemas.modelos.Productos; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Local +public interface DetallespBLLocal { + Mensaje agregar(Detallesp detallesp); + + Mensaje buscarId(Detallesp detallesp); + + Detallesp buscarIdLi(Detallesp detallesp); + + Mensaje eliminar(Detallesp detallesp); + + Mensaje editar(Detallesp detallesp); + + List getAll(); +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/PedidosBL.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/PedidosBL.java new file mode 100644 index 0000000..895f41a --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/PedidosBL.java @@ -0,0 +1,132 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Stateless; +import mx.edu.tsj.chapala.sistemas.modelo.dao.PedidosDAO; +import mx.edu.tsj.chapala.sistemas.modelos.Pedidos; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + + + + +/** + * + * @author + */ +@Stateless +public class PedidosBL implements PedidosBLLocal { + + @Override + public Mensaje agregar(Pedidos pedidos) { + System.out.println("Llegaste al metodo de agregar!!"); + PedidosDAO pedidosDAO = new PedidosDAO(); + + Pedidos existePedidos = pedidosDAO.buscarPorId(pedidos); + + + if(pedidos.getFecha() != null || pedidos.getTotal().isEmpty() ){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(pedidos.getFecha() != null || pedidos.getTotal().length()>=45 ){ + return Mensaje.DATOS_INCORRECTOS; + } + + if (existePedidos != null) { + return Mensaje.ELEMENTO_DUPLICADO; + }else{ + pedidosDAO.agregar(pedidos); + return Mensaje.SIN_ERROR; + + } + } + + // Add business logic below. (Right-click in editor and choose + // "Insert Code > Add Business Method") + + @Override + public Mensaje buscarId(Pedidos pedidos) { + PedidosDAO pedidosDAO = new PedidosDAO(); + Pedidos existePedidos = pedidosDAO.buscarPorId(pedidos); + + if (existePedidos == null) { + return Mensaje.ELEMENTO_NO_ENCONTRADO; + }else{ + pedidosDAO.buscarPorId(pedidos); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Pedidos buscarIdLi(Pedidos pedidos) { + PedidosDAO a = new PedidosDAO(); + //Aqui le movi + return a.buscarPorId(pedidos); + } + + @Override + public Mensaje eliminar(Pedidos pedidos) { + PedidosDAO a = new PedidosDAO(); + Pedidos existe = a.buscarPorId(pedidos); + if(existe==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + + } + else{ + a.eliminar(pedidos); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Mensaje editar(Pedidos pedidos) { + System.out.println("Llegaste al metodo de editar"); + PedidosDAO pedidosDAO = new PedidosDAO(); + + Pedidos existePedidos = pedidosDAO.buscarPorIdLi(pedidos); + //Test de validaciones + + if(pedidos.getFecha() != null || pedidos.getTotal().isEmpty() ) { + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(pedidos.getFecha() != null || pedidos.getTotal().length()>=45 ){ + return Mensaje.DATOS_INCORRECTOS; + } + + if(pedidos.getId() !=null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + } + else{ + pedidosDAO.editar(pedidos); + return Mensaje.SIN_ERROR; + + } + + } + + public List getAll(){ + PedidosDAO pedidosDAO = new PedidosDAO(); + return pedidosDAO.getTodos(true); + } + + @Override + public Mensaje desactivarPedidos(Pedidos pedidos) { + PedidosDAO a = new PedidosDAO(); + Pedidos existe = a.buscarPorId(pedidos); + if(existe==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + + } + else{ + a.eliminar(pedidos); + return Mensaje.SIN_ERROR; + } + } +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/PedidosBLLocal.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/PedidosBLLocal.java new file mode 100644 index 0000000..1f196d6 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/PedidosBLLocal.java @@ -0,0 +1,33 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Local; +import mx.edu.tsj.chapala.sistemas.modelos.Pedidos; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author lwyou + */ +@Local +public interface PedidosBLLocal { + + Mensaje agregar(Pedidos pedidos); + + Mensaje buscarId(Pedidos pedidos); + + Pedidos buscarIdLi(Pedidos pedidos); + + Mensaje eliminar(Pedidos pedidos); + + Mensaje editar(Pedidos pedidos); + + List getAll(); + + Mensaje desactivarPedidos(Pedidos pedidos); + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProductosBL.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProductosBL.java new file mode 100644 index 0000000..e6b2704 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProductosBL.java @@ -0,0 +1,127 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Stateless; +import mx.edu.tsj.chapala.sistemas.modelo.dao.ProductosDAO; +import mx.edu.tsj.chapala.sistemas.modelo.dao.UsuariosDAO; +import mx.edu.tsj.chapala.sistemas.modelos.Productos; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author lwyou + */ +@Stateless +public class ProductosBL implements ProductosBLLocal { + + @Override + public Mensaje agregar(Productos productos) { + System.out.println("Llegaste al metodo de agregar!!"); + ProductosDAO productosDAO = new ProductosDAO(); + + Productos existeProductos = productosDAO.buscarPorId(productos); + //TO DO: agregar la logica + + //Test de validaciones + //if(autor.getNombre().isEmpty() || autor.getPaterno().isEmpty() || autor.getMaterno().isEmpty() || + // autor.getMail().isEmpty()){ + + if(productos.getNombre().isEmpty() || productos.getDescripcion().isEmpty() || productos.getPrecio().isEmpty() || + productos.getStock().isEmpty()){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(productos.getNombre().length()>=45 || productos.getDescripcion().length()>=45 || productos.getPrecio().length()>=45 || + productos.getStock().length()>=45 || productos.getEstatus()>=45 ){ + return Mensaje.DATOS_INCORRECTOS; + } + + if (existeProductos != null) { + return Mensaje.ELEMENTO_DUPLICADO; + }else{ + productosDAO.agregar(productos); + return Mensaje.SIN_ERROR; + + } + } + + // Add business logic below. (Right-click in editor and choose + // "Insert Code > Add Business Method") + + @Override + public Mensaje buscarId(Productos productos) { + ProductosDAO productosDAO = new ProductosDAO(); + Productos existeProductos = productosDAO.buscarPorId(productos); + + if (existeProductos == null) { + return Mensaje.ELEMENTO_NO_ENCONTRADO; + }else{ + productosDAO.buscarPorId(productos); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Productos buscarIdLi(Productos productos) { + ProductosDAO a = new ProductosDAO(); + //Aqui le movi + return a.buscarPorId(productos); + } + + @Override + public Mensaje eliminar(Productos productos) { + ProductosDAO a = new ProductosDAO(); + Productos existe = a.buscarPorId(productos); + if(existe==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + + } + else{ + a.eliminar(productos); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Mensaje editar(Productos productos) { + System.out.println("Llegaste al metodo de editar"); + ProductosDAO productosDao = new ProductosDAO(); + Productos existeProductos = productosDao.buscarPorIdLi(productos); + //Test de validaciones + if(productos.getNombre().isEmpty() || productos.getDescripcion().isEmpty() || productos.getPrecio().isEmpty() || + productos.getStock().isEmpty() ) { + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(productos.getNombre().length()>=45 || productos.getDescripcion().length()>=45 || productos.getPrecio().length()>=45 || + productos.getStock().length()>=45 || productos.getEstatus()>=45 ){ + return Mensaje.DATOS_INCORRECTOS; + } + + if(productos.getId()==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + } + else{ + productosDao.editar(productos); + return Mensaje.SIN_ERROR; + + } + + } + + public List getAll(){ + //UsuariosDAO usuariosDAO = new UsuariosDAO(); + ProductosDAO productosDAO = new ProductosDAO(); + return productosDAO.getTodos(true); + //return usuariosDAO.getTodos(true); + } + + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProductosBLLocal.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProductosBLLocal.java new file mode 100644 index 0000000..72adae5 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProductosBLLocal.java @@ -0,0 +1,31 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Local; +import mx.edu.tsj.chapala.sistemas.modelos.Productos; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author lwyou + */ +@Local +public interface ProductosBLLocal { + + Mensaje agregar(Productos productos); + + Mensaje buscarId(Productos productos); + + Productos buscarIdLi(Productos productos); + + Mensaje eliminar(Productos productos); + + Mensaje editar(Productos productos); + + List getAll(); + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProveedoresBL.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProveedoresBL.java new file mode 100644 index 0000000..6f5de7c --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProveedoresBL.java @@ -0,0 +1,134 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Stateless; +import mx.edu.tsj.chapala.sistemas.modelo.dao.ProveedoresDAO; +import mx.edu.tsj.chapala.sistemas.modelos.Proveedores; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author lwyou + */ +@Stateless +public class ProveedoresBL implements ProveedoresBLLocal { + + @Override + public Mensaje agregar(Proveedores proveedores) { + System.out.println("Llegaste al metodo de agregar!!"); + ProveedoresDAO proveedoresDAO = new ProveedoresDAO(); + + Proveedores existeProveedores = proveedoresDAO.buscarPorId(proveedores); + + + if(proveedores.getNombre().isEmpty() || proveedores.getDireccion().isEmpty() || proveedores.getPais().isEmpty() || + proveedores.getCantidad().isEmpty()){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(proveedores.getNombre().length()>=45 || proveedores.getDireccion().length()>=45 || proveedores.getPais().length()>=45 || + proveedores.getCantidad().length()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if (existeProveedores != null) { + return Mensaje.ELEMENTO_DUPLICADO; + }else{ + proveedoresDAO.agregar(proveedores); + return Mensaje.SIN_ERROR; + + } + } + + // Add business logic below. (Right-click in editor and choose + // "Insert Code > Add Business Method") + + @Override + public Mensaje buscarId(Proveedores proveedores) { + ProveedoresDAO proveedoresDAO = new ProveedoresDAO(); + Proveedores existeProveedores = proveedoresDAO.buscarPorId(proveedores); + + if (existeProveedores == null) { + return Mensaje.ELEMENTO_NO_ENCONTRADO; + }else{ + proveedoresDAO.buscarPorId(proveedores); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Proveedores buscarIdLi(Proveedores proveedores) { + ProveedoresDAO a = new ProveedoresDAO(); + //Aqui le movi + return a.buscarPorId(proveedores); + } + + @Override + public Mensaje eliminar(Proveedores proveedores) { + ProveedoresDAO a = new ProveedoresDAO(); + Proveedores existe = a.buscarPorId(proveedores); + if(existe==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + + } + else{ + a.eliminar(proveedores); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Mensaje editar(Proveedores proveedores) { + System.out.println("Llegaste al metodo de editar"); + ProveedoresDAO proveedoresDAO = new ProveedoresDAO(); + + Proveedores existeProveedores = proveedoresDAO.buscarPorIdLi(proveedores); + //Test de validaciones + + if(proveedores.getNombre().isEmpty() || proveedores.getDireccion().isEmpty() || proveedores.getPais().isEmpty() || + proveedores.getCantidad().isEmpty()){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(proveedores.getNombre().length()>=45 || proveedores.getDireccion().length()>=45 || proveedores.getPais().length()>=45 || + proveedores.getCantidad().length()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if(proveedores.getId()==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + } + else{ + proveedoresDAO.editar(proveedores); + return Mensaje.SIN_ERROR; + + } + + } + + public List getAll(){ + ProveedoresDAO proveedoresDAO = new ProveedoresDAO(); + return proveedoresDAO.getTodos(true); + } + + @Override + public Mensaje desactivarProveedores(Proveedores proveedores) { + ProveedoresDAO a = new ProveedoresDAO(); + Proveedores existe = a.buscarPorId(proveedores); + if(existe==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + + } + else{ + a.eliminar(proveedores); + return Mensaje.SIN_ERROR; + } + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProveedoresBLLocal.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProveedoresBLLocal.java new file mode 100644 index 0000000..c2b1dc9 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/ProveedoresBLLocal.java @@ -0,0 +1,33 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Local; +import mx.edu.tsj.chapala.sistemas.modelos.Proveedores; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author lwyou + */ +@Local +public interface ProveedoresBLLocal { + + Mensaje agregar(Proveedores proveedores); + + Mensaje buscarId(Proveedores proveedores); + + Proveedores buscarIdLi(Proveedores proveedores); + + Mensaje eliminar(Proveedores proveedores); + + Mensaje editar(Proveedores proveedores); + + List getAll(); + + Mensaje desactivarProveedores(Proveedores proveedores); + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/UsuariosBL.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/UsuariosBL.java new file mode 100644 index 0000000..03de45c --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/UsuariosBL.java @@ -0,0 +1,140 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/StatelessEjbClass.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Stateless; +import mx.edu.tsj.chapala.sistemas.modelo.dao.UsuariosDAO; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Stateless +public class UsuariosBL implements UsuariosBLLocal { + + @Override + public Mensaje agregar(Usuarios usuarios) { + System.out.println("Llegaste al metodo de agregar!!"); + UsuariosDAO usuariosDao = new UsuariosDAO(); + + + + Usuarios existeUsuario = usuariosDao.buscarPorId(usuarios); + + if(usuarios.getNombre().isEmpty() || usuarios.getApellidoP().isEmpty() || + usuarios.getApellidoM().isEmpty() || usuarios.getEmail().isEmpty() || usuarios.getTelefono().isEmpty()){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(usuarios.getNombre().length()>=45 || usuarios.getApellidoP().length()>=45 || usuarios.getApellidoM().length()>=45 || + usuarios.getEmail().length()>=45 || usuarios.getTelefono().length()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if (existeUsuario != null) { + return Mensaje.ELEMENTO_DUPLICADO; + }else{ + + usuariosDao.agregar(usuarios); + return Mensaje.SIN_ERROR; + + } + } + + + @Override + public Mensaje buscarId(Usuarios usuarios) { + + UsuariosDAO usuariosDao = new UsuariosDAO(); + Usuarios existeUsuario = usuariosDao.buscarPorId(usuarios); + + if (existeUsuario == null) { + return Mensaje.ELEMENTO_NO_ENCONTRADO; + }else{ + usuariosDao.buscarPorId(usuarios); + return Mensaje.SIN_ERROR; + + } + } + + @Override + public Usuarios buscarIdLi(Usuarios usuarios) { + UsuariosDAO u = new UsuariosDAO(); + //Aqui le movi + return u.buscarPorId(usuarios); + } + + + @Override + public Mensaje eliminar(Usuarios usuarios) { + UsuariosDAO u = new UsuariosDAO(); + Usuarios existe = u.buscarPorId(usuarios); + if(existe==null && existe.getEstatus()==0){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + } + else{ + u.eliminar(usuarios); + return Mensaje.SIN_ERROR; + } + + } + + + @Override + public Mensaje editar(Usuarios usuarios) { + System.out.println("Llegaste al metodo de editar"); + UsuariosDAO usuariosDao = new UsuariosDAO(); + + Usuarios existeUsuario = usuariosDao.buscarPorIdLi(usuarios); + //Test de validaciones + if(usuarios.getNombre().isEmpty() || usuarios.getApellidoP().isEmpty() || + usuarios.getApellidoM().isEmpty() || usuarios.getEmail().isEmpty() || usuarios.getTelefono().isEmpty()){ + return Mensaje.CAMPOS_INCOMPLETOS; + } + + if(usuarios.getNombre().length()>=45 || usuarios.getApellidoP().length()>=45 || usuarios.getApellidoM().length()>=45 || + usuarios.getEmail().length()>=45 || usuarios.getTelefono().length()>=45){ + return Mensaje.DATOS_INCORRECTOS; + } + + if(usuarios.getId()==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + } + else{ + usuariosDao.editar(usuarios); + return Mensaje.SIN_ERROR; + + } + //autorDao.editar(autor); + } + + @Override + public Mensaje desactivarUsuarios(Usuarios usuarios) { + UsuariosDAO a = new UsuariosDAO(); + Usuarios existe = a.buscarPorId(usuarios); + if(existe==null){ + return Mensaje.ELEMENTO_NO_ENCONTRADO; + + } + else{ + a.eliminar(usuarios); + return Mensaje.SIN_ERROR; + } + } + + public List getAll(){ + UsuariosDAO usuariosDAO = new UsuariosDAO(); + return usuariosDAO.getTodos(true); + } + + //Test validar contraseña + public Usuarios buscarPorLoginStatus(boolean status, Usuarios a) { + UsuariosDAO usuariosDAO = new UsuariosDAO(); + return (Usuarios) usuariosDAO.buscarLogin(status, a.getNombre(), a.getContrasena()); +} +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/UsuariosBLLocal.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/UsuariosBLLocal.java new file mode 100644 index 0000000..29da715 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/bl/UsuariosBLLocal.java @@ -0,0 +1,33 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/J2EE/EJB30/SessionLocal.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.bl; + +import java.util.List; +import javax.ejb.Local; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Local +public interface UsuariosBLLocal { + Mensaje agregar(Usuarios usuarios); + + Mensaje buscarId(Usuarios usuarios); + + Usuarios buscarIdLi(Usuarios usuarios); + + Mensaje eliminar(Usuarios usuarios); + + Mensaje editar(Usuarios usuarios); + + List getAll(); + + Mensaje desactivarUsuarios(Usuarios usuarios); + + public Usuarios buscarPorLoginStatus(boolean status, Usuarios a); +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/CategoriasDAO.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/CategoriasDAO.java new file mode 100644 index 0000000..6ee5daf --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/CategoriasDAO.java @@ -0,0 +1,78 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.dao; + +import java.util.List; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; +import javax.persistence.Query; +import mx.edu.tsj.chapala.sistemas.modelos.Categorias; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; + +/** + * + * @author sktal + */ +public class CategoriasDAO { + private EntityManager em; //MANEJADOR DE ENTIDADES + + public CategoriasDAO(){ + EntityManagerFactory emf = Persistence.createEntityManagerFactory("inventario-ejbPU"); + em=emf.createEntityManager(); + } + + public void agregar(Categorias c){ + em.getTransaction().begin(); + em.persist(c); //Agrega en la BD + em.getTransaction().commit(); + } + + public void editar(Categorias c){ + em.getTransaction().begin(); + //em.remove(em.merge(usuarios)); + em.merge(c); // Edita en la BD + em.getTransaction().commit(); + } + + + //-----------IMPLEMENTAR ESTA PARTE EN WORKBENCH----------------- + /*public void eliminar(Categorias c){ + em.getTransaction().begin(); + //em.remove(em.merge(m)); + c.setEstatus((short)0); + em.merge(c); + em.getTransaction().commit(); + }*/ + + public Categorias buscarPorIdLi(Categorias c){ + Query q = em.createNamedQuery("Categorias.findById"); + q.setParameter("id", c.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Categorias) q.getResultList().get(0); + } + + } + + public Categorias buscarPorId(Categorias c){ + if (c == null || c.getId()== null) { + return null; + } + Query q = em.createNamedQuery("Categorias.findById"); + q.setParameter("id", c.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Categorias) q.getResultList().get(0); + } + } + + public List getTodos() { + Query q = em.createNamedQuery("Categorias.findAll"); + return q.getResultList(); + } +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/DetallespDAO.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/DetallespDAO.java new file mode 100644 index 0000000..af397bc --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/DetallespDAO.java @@ -0,0 +1,81 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.dao; + +import java.util.List; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; +import javax.persistence.Query; +import mx.edu.tsj.chapala.sistemas.modelos.Detallesp; +import mx.edu.tsj.chapala.sistemas.modelos.Productos; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; +//import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; + +/** + * + * @author sktal + */ +public class DetallespDAO { + private EntityManager em; //MANEJADOR DE ENTIDADES + + public DetallespDAO(){ + EntityManagerFactory emf = Persistence.createEntityManagerFactory("inventario-ejbPU"); + em=emf.createEntityManager(); + } + + public void agregar(Detallesp d){ + em.getTransaction().begin(); + em.persist(d); //Agrega en la BD + em.getTransaction().commit(); + } + + public void editar(Detallesp d){ + em.getTransaction().begin(); + //em.remove(em.merge(usuarios)); + em.merge(d); // Edita en la BD + em.getTransaction().commit(); + } + + + //-----------IMPLEMENTAR ESTA PARTE EN WORKBENCH------------- + /*public void eliminar(Detallesp d) { + em.getTransaction().begin(); + //em.remove(em.merge(m)); + d.setEstatus((short) 0); + em.merge(d); + em.getTransaction().commit(); + }*/ + + public Detallesp buscarPorIdLi(Detallesp d){ + Query q = em.createNamedQuery("Detallesp.findById"); + q.setParameter("id", d.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Detallesp) q.getResultList().get(0); + } + + } + + public Detallesp buscarPorId(Detallesp d){ + if (d == null || d.getId()== null) { + return null; + } + Query q = em.createNamedQuery("Detallesp.findById"); + q.setParameter("id", d.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Detallesp) q.getResultList().get(0); + } + } + + public List getTodos() { + Query q = em.createNamedQuery("Detallesp.findAll"); + return q.getResultList(); + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/PedidosDAO.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/PedidosDAO.java new file mode 100644 index 0000000..5b02a94 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/PedidosDAO.java @@ -0,0 +1,76 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.dao; + +import java.util.List; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; +import javax.persistence.Query; +import mx.edu.tsj.chapala.sistemas.modelos.Pedidos; + + +public class PedidosDAO { + private EntityManager em; //MANEJADOR DE ENTIDADES + + public PedidosDAO(){ + EntityManagerFactory emf = Persistence.createEntityManagerFactory("inventario-ejbPU"); + em=emf.createEntityManager(); + } + + public void agregar(Pedidos p){ + em.getTransaction().begin(); + em.persist(p); //Agrega en la BD + em.getTransaction().commit(); + } + + public void editar(Pedidos p){ + em.getTransaction().begin(); + //em.remove(em.merge(usuarios)); + em.merge(p); // Edita en la BD + em.getTransaction().commit(); + } + + public void eliminar(Pedidos p){ + em.getTransaction().begin(); + //em.remove(em.merge(u)); // Elimina en la BD + //usuarios.setStatus(0); + //em.marge(usuarios); + em.getTransaction().commit(); + } + + public Pedidos buscarPorIdLi(Pedidos p){ + Query q = em.createNamedQuery("Pedidos.findById"); + q.setParameter("id", p.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Pedidos) q.getResultList().get(0); + } + + } + + public Pedidos buscarPorId(Pedidos p){ + if (p == null || p.getId()== null) { + return null; + } + Query q = em.createNamedQuery("Pedidos.findById"); + q.setParameter("id", p.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Pedidos) q.getResultList().get(0); + } + } + + public List getTodos(boolean status){ + Query q = em.createNamedQuery("Pedidos.findByEstatus"); + int s = status?1:0; + q.setParameter("estatus", s); + return q.getResultList(); + } + + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/ProductosDAO.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/ProductosDAO.java new file mode 100644 index 0000000..05dbef7 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/ProductosDAO.java @@ -0,0 +1,78 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.dao; + +import java.util.List; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; +import javax.persistence.Query; +import mx.edu.tsj.chapala.sistemas.modelos.Productos; +//import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; + +/** + * + * @author sktal + */ +public class ProductosDAO { + private EntityManager em; //MANEJADOR DE ENTIDADES + + public ProductosDAO(){ + EntityManagerFactory emf = Persistence.createEntityManagerFactory("inventario-ejbPU"); + em=emf.createEntityManager(); + } + + public void agregar(Productos p){ + em.getTransaction().begin(); + em.persist(p); //Agrega en la BD + em.getTransaction().commit(); + } + + public void editar(Productos p){ + em.getTransaction().begin(); + //em.remove(em.merge(usuarios)); + em.merge(p); // Edita en la BD + em.getTransaction().commit(); + } + + public void eliminar(Productos p){ + em.getTransaction().begin(); + //em.remove(em.merge(u)); // Elimina en la BD + p.setEstatus((short)0); + em.merge(p); + em.getTransaction().commit(); + } + + public Productos buscarPorIdLi(Productos p){ + Query q = em.createNamedQuery("Productos.findById"); + q.setParameter("id", p.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Productos) q.getResultList().get(0); + } + + } + + public Productos buscarPorId(Productos p){ + if (p == null || p.getId()== null) { + return null; + } + Query q = em.createNamedQuery("Productos.findById"); + q.setParameter("id", p.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Productos) q.getResultList().get(0); + } + } + + public List getTodos(boolean status){ + Query q = em.createNamedQuery("Productos.findByEstatus"); + int s = status?1:0; + q.setParameter("estatus", s); + return q.getResultList(); + } +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/ProveedoresDAO.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/ProveedoresDAO.java new file mode 100644 index 0000000..6c5e3b2 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/ProveedoresDAO.java @@ -0,0 +1,74 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.dao; + +import java.util.List; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; +import javax.persistence.Query; +import mx.edu.tsj.chapala.sistemas.modelos.Proveedores; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; + +public class ProveedoresDAO { + private EntityManager em; //MANEJADOR DE ENTIDADES + + public ProveedoresDAO(){ + EntityManagerFactory emf = Persistence.createEntityManagerFactory("inventario-ejbPU"); + em=emf.createEntityManager(); + } + + public void agregar(Proveedores p){ + em.getTransaction().begin(); + em.persist(p); //Agrega en la BD + em.getTransaction().commit(); + } + + public void editar(Proveedores p){ + em.getTransaction().begin(); + //em.remove(em.merge(usuarios)); + em.merge(p); // Edita en la BD + em.getTransaction().commit(); + } + + public void eliminar(Proveedores p){ + em.getTransaction().begin(); + //em.remove(em.merge(u)); // Elimina en la BD + //usuarios.setStatus(0); + //em.marge(usuarios); + em.getTransaction().commit(); + } + + public Proveedores buscarPorIdLi(Proveedores p){ + Query q = em.createNamedQuery("Proveedores.findById"); + q.setParameter("id", p.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Proveedores) q.getResultList().get(0); + } + + } + + public Proveedores buscarPorId(Proveedores p){ + if (p == null || p.getId()== null) { + return null; + } + Query q = em.createNamedQuery("Usuarios.findById"); + q.setParameter("id", p.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Proveedores) q.getResultList().get(0); + } + } + + public List getTodos(boolean status){ + Query q = em.createNamedQuery("Proveedores.findByEstatus"); + int s = status?1:0; + q.setParameter("estatus", s); + return q.getResultList(); + } +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/UsuariosDAO.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/UsuariosDAO.java new file mode 100644 index 0000000..0bd2986 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelo/dao/UsuariosDAO.java @@ -0,0 +1,96 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelo.dao; + +import java.util.List; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; +import javax.persistence.Query; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; + +/** + * + * @author sktal + */ +public class UsuariosDAO { + private EntityManager em; //MANEJADOR DE ENTIDADES + + public UsuariosDAO(){ + EntityManagerFactory emf = Persistence.createEntityManagerFactory("inventario-ejbPU"); + em=emf.createEntityManager(); + } + + public void agregar(Usuarios u){ + em.getTransaction().begin(); + em.persist(u); //Agrega en la BD + em.getTransaction().commit(); + } + + public void editar(Usuarios u){ + em.getTransaction().begin(); + //em.remove(em.merge(usuarios)); + em.merge(u); // Edita en la BD + em.getTransaction().commit(); + } + + public void eliminar(Usuarios u){ + em.getTransaction().begin(); + //em.remove(em.merge(m)); + u.setEstatus((short)0); + em.merge(u); + em.getTransaction().commit(); + } + + + + public Usuarios buscarPorIdLi(Usuarios u) { + Query q = em.createNamedQuery("Usuarios.findById"); + q.setParameter("id", u.getId()); + if (q.getResultList().isEmpty()) { + return null; + } else { + return (Usuarios) q.getResultList().get(0); + } + } + + public Usuarios buscarPorId(Usuarios u){ + if (u == null || u.getId()== null) { + return null; + } + Query q = em.createNamedQuery("Usuarios.findById"); + q.setParameter("id", u.getId()); + if(q.getResultList().isEmpty()){ + return null; + }else{ + return (Usuarios) q.getResultList().get(0); + } + } + + public List getTodos(boolean status){ + Query q = em.createNamedQuery("Usuarios.findByEstatus"); + int s = status?1:0; + q.setParameter("estatus", s); + return q.getResultList(); + } + + //Test para validar el login + public Usuarios buscarLogin(boolean status, String username, String password) { + if (username == null) { + return null; + } + Query q = em.createNamedQuery("Usuarios.validar"); + int s = status ? 1 : 0; + q.setParameter("estatus", s); + q.setParameter("nombre", username); + q.setParameter("contrasena", password); + List resultList = q.getResultList(); + if (resultList.isEmpty()) { + return null; + } else { + return resultList.get(0); // Devuelve el primer elemento de la lista + } + } +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Categorias.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Categorias.java new file mode 100644 index 0000000..5288b44 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Categorias.java @@ -0,0 +1,125 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelos; + +import java.io.Serializable; +import java.util.List; +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * + * @author sktal + */ +@Entity +@Table(name = "categorias") +@NamedQueries({ + @NamedQuery(name = "Categorias.findAll", query = "SELECT c FROM Categorias c"), + @NamedQuery(name = "Categorias.findById", query = "SELECT c FROM Categorias c WHERE c.id = :id"), + @NamedQuery(name = "Categorias.findByNombre", query = "SELECT c FROM Categorias c WHERE c.nombre = :nombre"), + @NamedQuery(name = "Categorias.findByDescripcion", query = "SELECT c FROM Categorias c WHERE c.descripcion = :descripcion")}) +public class Categorias implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Basic(optional = false) + @Column(name = "id") + private Integer id; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "nombre") + private String nombre; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "descripcion") + private String descripcion; + @OneToMany(cascade = CascadeType.ALL, mappedBy = "categoriasId") + private List productosList; + + public Categorias() { + } + + public Categorias(Integer id) { + this.id = id; + } + + public Categorias(Integer id, String nombre, String descripcion) { + this.id = id; + this.nombre = nombre; + this.descripcion = descripcion; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getDescripcion() { + return descripcion; + } + + public void setDescripcion(String descripcion) { + this.descripcion = descripcion; + } + + public List getProductosList() { + return productosList; + } + + public void setProductosList(List productosList) { + this.productosList = productosList; + } + + @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 Categorias)) { + return false; + } + Categorias other = (Categorias) 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 "mx.edu.tsj.chapala.sistemas.modelos.Categorias[ id=" + id + " ]"; + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Detallesp.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Detallesp.java new file mode 100644 index 0000000..4b6a776 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Detallesp.java @@ -0,0 +1,135 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelos; + +import java.io.Serializable; +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.Table; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * + * @author sktal + */ +@Entity +@Table(name = "detallesp") +@NamedQueries({ + @NamedQuery(name = "Detallesp.findAll", query = "SELECT d FROM Detallesp d"), + @NamedQuery(name = "Detallesp.findById", query = "SELECT d FROM Detallesp d WHERE d.id = :id"), + @NamedQuery(name = "Detallesp.findByCantidad", query = "SELECT d FROM Detallesp d WHERE d.cantidad = :cantidad"), + @NamedQuery(name = "Detallesp.findByPrecioU", query = "SELECT d FROM Detallesp d WHERE d.precioU = :precioU")}) +public class Detallesp implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Basic(optional = false) + @Column(name = "id") + private Integer id; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "cantidad") + private String cantidad; + @Basic(optional = false) + @NotNull + @Column(name = "precioU") + private long precioU; + @JoinColumn(name = "pedidos_id", referencedColumnName = "id") + @ManyToOne(optional = false) + private Pedidos pedidosId; + @JoinColumn(name = "productos_id", referencedColumnName = "id") + @ManyToOne(optional = false) + private Productos productosId; + + public Detallesp() { + } + + public Detallesp(Integer id) { + this.id = id; + } + + public Detallesp(Integer id, String cantidad, long precioU) { + this.id = id; + this.cantidad = cantidad; + this.precioU = precioU; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCantidad() { + return cantidad; + } + + public void setCantidad(String cantidad) { + this.cantidad = cantidad; + } + + public long getPrecioU() { + return precioU; + } + + public void setPrecioU(long precioU) { + this.precioU = precioU; + } + + public Pedidos getPedidosId() { + return pedidosId; + } + + public void setPedidosId(Pedidos pedidosId) { + this.pedidosId = pedidosId; + } + + public Productos getProductosId() { + return productosId; + } + + public void setProductosId(Productos productosId) { + this.productosId = productosId; + } + + @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 Detallesp)) { + return false; + } + Detallesp other = (Detallesp) 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 "mx.edu.tsj.chapala.sistemas.modelos.Detallesp[ id=" + id + " ]"; + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Pedidos.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Pedidos.java new file mode 100644 index 0000000..c6060cc --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Pedidos.java @@ -0,0 +1,155 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelos; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * + * @author sktal + */ +@Entity +@Table(name = "pedidos") +@NamedQueries({ + @NamedQuery(name = "Pedidos.findAll", query = "SELECT p FROM Pedidos p"), + @NamedQuery(name = "Pedidos.findById", query = "SELECT p FROM Pedidos p WHERE p.id = :id"), + @NamedQuery(name = "Pedidos.findByFecha", query = "SELECT p FROM Pedidos p WHERE p.fecha = :fecha"), + @NamedQuery(name = "Pedidos.findByTotal", query = "SELECT p FROM Pedidos p WHERE p.total = :total"), + @NamedQuery(name = "Pedidos.findByEstatus", query = "SELECT p FROM Pedidos p WHERE p.estatus = :estatus")}) +public class Pedidos implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Basic(optional = false) + @Column(name = "id") + private Integer id; + @Basic(optional = false) + @NotNull + @Column(name = "fecha") + @Temporal(TemporalType.DATE) + private Date fecha; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "total") + private String total; + @Basic(optional = false) + @NotNull + @Column(name = "estatus") + private short estatus; + @OneToMany(cascade = CascadeType.ALL, mappedBy = "pedidosId") + private List detallespList; + @JoinColumn(name = "usuarios_id", referencedColumnName = "id") + @ManyToOne(optional = false) + private Usuarios usuariosId; + + public Pedidos() { + } + + public Pedidos(Integer id) { + this.id = id; + } + + public Pedidos(Integer id, Date fecha, String total, short estatus) { + this.id = id; + this.fecha = fecha; + this.total = total; + this.estatus = estatus; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Date getFecha() { + return fecha; + } + + public void setFecha(Date fecha) { + this.fecha = fecha; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public short getEstatus() { + return estatus; + } + + public void setEstatus(short estatus) { + this.estatus = estatus; + } + + public List getDetallespList() { + return detallespList; + } + + public void setDetallespList(List detallespList) { + this.detallespList = detallespList; + } + + public Usuarios getUsuariosId() { + return usuariosId; + } + + public void setUsuariosId(Usuarios usuariosId) { + this.usuariosId = usuariosId; + } + + @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 Pedidos)) { + return false; + } + Pedidos other = (Pedidos) 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 "mx.edu.tsj.chapala.sistemas.modelos.Pedidos[ id=" + id + " ]"; + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Productos.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Productos.java new file mode 100644 index 0000000..fa3c35e --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Productos.java @@ -0,0 +1,193 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelos; + +import java.io.Serializable; +import java.util.List; +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * + * @author sktal + */ +@Entity +@Table(name = "productos") +@NamedQueries({ + @NamedQuery(name = "Productos.findAll", query = "SELECT p FROM Productos p"), + @NamedQuery(name = "Productos.findById", query = "SELECT p FROM Productos p WHERE p.id = :id"), + @NamedQuery(name = "Productos.findByNombre", query = "SELECT p FROM Productos p WHERE p.nombre = :nombre"), + @NamedQuery(name = "Productos.findByDescripcion", query = "SELECT p FROM Productos p WHERE p.descripcion = :descripcion"), + @NamedQuery(name = "Productos.findByPrecio", query = "SELECT p FROM Productos p WHERE p.precio = :precio"), + @NamedQuery(name = "Productos.findByStock", query = "SELECT p FROM Productos p WHERE p.stock = :stock"), + @NamedQuery(name = "Productos.findByEstatus", query = "SELECT p FROM Productos p WHERE p.estatus = :estatus")}) +public class Productos implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Basic(optional = false) + @Column(name = "id") + private Integer id; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "nombre") + private String nombre; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "descripcion") + private String descripcion; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "precio") + private String precio; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "stock") + private String stock; + @Basic(optional = false) + @NotNull + @Column(name = "estatus") + private short estatus; + @OneToMany(cascade = CascadeType.ALL, mappedBy = "productosId") + private List detallespList; + @JoinColumn(name = "categorias_id", referencedColumnName = "id") + @ManyToOne(optional = false) + private Categorias categoriasId; + @JoinColumn(name = "proveedores_id", referencedColumnName = "id") + @ManyToOne(optional = false) + private Proveedores proveedoresId; + + public Productos() { + } + + public Productos(Integer id) { + this.id = id; + } + + public Productos(Integer id, String nombre, String descripcion, String precio, String stock, short estatus) { + this.id = id; + this.nombre = nombre; + this.descripcion = descripcion; + this.precio = precio; + this.stock = stock; + this.estatus = estatus; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getDescripcion() { + return descripcion; + } + + public void setDescripcion(String descripcion) { + this.descripcion = descripcion; + } + + public String getPrecio() { + return precio; + } + + public void setPrecio(String precio) { + this.precio = precio; + } + + public String getStock() { + return stock; + } + + public void setStock(String stock) { + this.stock = stock; + } + + public short getEstatus() { + return estatus; + } + + public void setEstatus(short estatus) { + this.estatus = estatus; + } + + public List getDetallespList() { + return detallespList; + } + + public void setDetallespList(List detallespList) { + this.detallespList = detallespList; + } + + public Categorias getCategoriasId() { + return categoriasId; + } + + public void setCategoriasId(Categorias categoriasId) { + this.categoriasId = categoriasId; + } + + public Proveedores getProveedoresId() { + return proveedoresId; + } + + public void setProveedoresId(Proveedores proveedoresId) { + this.proveedoresId = proveedoresId; + } + + @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 Productos)) { + return false; + } + Productos other = (Productos) 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 "mx.edu.tsj.chapala.sistemas.modelos.Productos[ id=" + id + " ]"; + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Proveedores.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Proveedores.java new file mode 100644 index 0000000..ce1298b --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Proveedores.java @@ -0,0 +1,169 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelos; + +import java.io.Serializable; +import java.util.List; +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * + * @author sktal + */ +@Entity +@Table(name = "proveedores") +@NamedQueries({ + @NamedQuery(name = "Proveedores.findAll", query = "SELECT p FROM Proveedores p"), + @NamedQuery(name = "Proveedores.findById", query = "SELECT p FROM Proveedores p WHERE p.id = :id"), + @NamedQuery(name = "Proveedores.findByNombre", query = "SELECT p FROM Proveedores p WHERE p.nombre = :nombre"), + @NamedQuery(name = "Proveedores.findByDireccion", query = "SELECT p FROM Proveedores p WHERE p.direccion = :direccion"), + @NamedQuery(name = "Proveedores.findByPais", query = "SELECT p FROM Proveedores p WHERE p.pais = :pais"), + @NamedQuery(name = "Proveedores.findByCantidad", query = "SELECT p FROM Proveedores p WHERE p.cantidad = :cantidad"), + @NamedQuery(name = "Proveedores.findByEstatus", query = "SELECT p FROM Proveedores p WHERE p.estatus = :estatus")}) +public class Proveedores implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Basic(optional = false) + @Column(name = "id") + private Integer id; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "nombre") + private String nombre; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "direccion") + private String direccion; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "pais") + private String pais; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "cantidad") + private String cantidad; + @Basic(optional = false) + @NotNull + @Column(name = "estatus") + private short estatus; + @OneToMany(cascade = CascadeType.ALL, mappedBy = "proveedoresId") + private List productosList; + + public Proveedores() { + } + + public Proveedores(Integer id) { + this.id = id; + } + + public Proveedores(Integer id, String nombre, String direccion, String pais, String cantidad, short estatus) { + this.id = id; + this.nombre = nombre; + this.direccion = direccion; + this.pais = pais; + this.cantidad = cantidad; + this.estatus = estatus; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getDireccion() { + return direccion; + } + + public void setDireccion(String direccion) { + this.direccion = direccion; + } + + public String getPais() { + return pais; + } + + public void setPais(String pais) { + this.pais = pais; + } + + public String getCantidad() { + return cantidad; + } + + public void setCantidad(String cantidad) { + this.cantidad = cantidad; + } + + public short getEstatus() { + return estatus; + } + + public void setEstatus(short estatus) { + this.estatus = estatus; + } + + public List getProductosList() { + return productosList; + } + + public void setProductosList(List productosList) { + this.productosList = productosList; + } + + @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 Proveedores)) { + return false; + } + Proveedores other = (Proveedores) 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 "mx.edu.tsj.chapala.sistemas.modelos.Proveedores[ id=" + id + " ]"; + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Usuarios.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Usuarios.java new file mode 100644 index 0000000..d973c8c --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/modelos/Usuarios.java @@ -0,0 +1,190 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.modelos; + +import java.io.Serializable; +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.NamedQueries; +import javax.persistence.NamedQuery; +import javax.persistence.Table; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author sktal + */ +@Entity +@Table(name = "usuarios") +@XmlRootElement +@NamedQueries({ + @NamedQuery(name = "Usuarios.findAll", query = "SELECT u FROM Usuarios u"), + @NamedQuery(name = "Usuarios.findById", query = "SELECT u FROM Usuarios u WHERE u.id = :id"), + @NamedQuery(name = "Usuarios.findByNombre", query = "SELECT u FROM Usuarios u WHERE u.nombre = :nombre"), + @NamedQuery(name = "Usuarios.findByApellidoP", query = "SELECT u FROM Usuarios u WHERE u.apellidoP = :apellidoP"), + @NamedQuery(name = "Usuarios.findByApellidoM", query = "SELECT u FROM Usuarios u WHERE u.apellidoM = :apellidoM"), + @NamedQuery(name = "Usuarios.findByEmail", query = "SELECT u FROM Usuarios u WHERE u.email = :email"), + @NamedQuery(name = "Usuarios.findByTelefono", query = "SELECT u FROM Usuarios u WHERE u.telefono = :telefono"), + @NamedQuery(name = "Usuarios.findByEstatus", query = "SELECT u FROM Usuarios u WHERE u.estatus = :estatus"), + @NamedQuery(name = "Usuarios.findByContrasena", query = "SELECT u FROM Usuarios u WHERE u.contrasena = :contrasena"), + @NamedQuery(name = "Usuarios.validar", query = "SELECT u FROM Usuarios u WHERE u.estatus = :estatus and u.nombre = :nombre and u.contrasena = :contrasena")}) +public class Usuarios implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Basic(optional = false) + @Column(name = "id") + private Integer id; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "nombre") + private String nombre; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "apellidoP") + private String apellidoP; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "apellidoM") + private String apellidoM; + // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "email") + private String email; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 45) + @Column(name = "telefono") + private String telefono; + @Basic(optional = false) + @NotNull + @Column(name = "estatus") + private short estatus; + @Basic(optional = false) + @NotNull + @Size(min = 1, max = 20) + @Column(name = "contrasena") + private String contrasena; + + public Usuarios() { + } + + public Usuarios(Integer id) { + this.id = id; + } + + public Usuarios(Integer id, String nombre, String apellidoP, String apellidoM, String email, String telefono, short estatus, String contrasena) { + this.id = id; + this.nombre = nombre; + this.apellidoP = apellidoP; + this.apellidoM = apellidoM; + this.email = email; + this.telefono = telefono; + this.estatus = estatus; + this.contrasena = contrasena; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNombre() { + return nombre; + } + + public void setNombre(String nombre) { + this.nombre = nombre; + } + + public String getApellidoP() { + return apellidoP; + } + + public void setApellidoP(String apellidoP) { + this.apellidoP = apellidoP; + } + + public String getApellidoM() { + return apellidoM; + } + + public void setApellidoM(String apellidoM) { + this.apellidoM = apellidoM; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getTelefono() { + return telefono; + } + + public void setTelefono(String telefono) { + this.telefono = telefono; + } + + public short getEstatus() { + return estatus; + } + + public void setEstatus(short estatus) { + this.estatus = estatus; + } + + public String getContrasena() { + return contrasena; + } + + public void setContrasena(String contrasena) { + this.contrasena = contrasena; + } + + @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 Usuarios)) { + return false; + } + Usuarios other = (Usuarios) 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 "mx.edu.tsj.chapala.sistemas.modelos.Usuarios[ id=" + id + " ]"; + } + +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/msj/Mensaje.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/msj/Mensaje.java new file mode 100644 index 0000000..ac876f9 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/msj/Mensaje.java @@ -0,0 +1,18 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.msj; + +/** + * + * @author sktal + */ +public enum Mensaje { + SIN_ERROR, + CAMPOS_INCOMPLETOS, + DATOS_INCORRECTOS, + ELEMENTO_DUPLICADO, + ELEMENTO_NO_ENCONTRADO, + AUTOR_O_EDITORIAL_INCOMPLETOS, +} diff --git a/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/msj/ejemplo.java b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/msj/ejemplo.java new file mode 100644 index 0000000..332b550 --- /dev/null +++ b/inventario-ejb/src/java/mx/edu/tsj/chapala/sistemas/msj/ejemplo.java @@ -0,0 +1,13 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.msj; + +/** + * + * @author sktal + */ +public class ejemplo { + +} diff --git a/inventario-war/build.xml b/inventario-war/build.xml new file mode 100644 index 0000000..acd79f6 --- /dev/null +++ b/inventario-war/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project inventario-war. + + + diff --git a/inventario-war/libs/primefaces-12.0.0.jar b/inventario-war/libs/primefaces-12.0.0.jar new file mode 100644 index 0000000..88dab24 Binary files /dev/null and b/inventario-war/libs/primefaces-12.0.0.jar differ diff --git a/inventario-war/nbproject/ant-deploy.xml b/inventario-war/nbproject/ant-deploy.xml new file mode 100644 index 0000000..fdc06d5 --- /dev/null +++ b/inventario-war/nbproject/ant-deploy.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inventario-war/nbproject/build-impl.xml b/inventario-war/nbproject/build-impl.xml new file mode 100644 index 0000000..4f359b4 --- /dev/null +++ b/inventario-war/nbproject/build-impl.xml @@ -0,0 +1,1438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/inventario-war/nbproject/faces-config.NavData b/inventario-war/nbproject/faces-config.NavData new file mode 100644 index 0000000..e69de29 diff --git a/inventario-war/nbproject/genfiles.properties b/inventario-war/nbproject/genfiles.properties new file mode 100644 index 0000000..ec0e94b --- /dev/null +++ b/inventario-war/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=9a6c4398 +build.xml.script.CRC32=2c5921fb +build.xml.stylesheet.CRC32=1707db4f@1.96.0.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=9a6c4398 +nbproject/build-impl.xml.script.CRC32=dede17b0 +nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.96.0.1 diff --git a/inventario-war/nbproject/project.properties b/inventario-war/nbproject/project.properties new file mode 100644 index 0000000..6e392d7 --- /dev/null +++ b/inventario-war/nbproject/project.properties @@ -0,0 +1,95 @@ +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 +auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets +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 +# Files to be excluded from distribution war +dist.archive.excludes= +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-7.0.classpath} +excludes= +file.reference.primefaces-12.0.0.jar=libs\\primefaces-12.0.0.jar +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7 +j2ee.platform.classpath=${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv4ee7 +jar.compress=false +javac.classpath=\ + ${reference.inventario-ejb.dist}:\ + ${file.reference.primefaces-12.0.0.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +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 +no.dependencies=false +persistence.xml.dir=${conf.dir} +platform.active=default_platform +project.inventario-ejb=../inventario-ejb +reference.inventario-ejb.dist=${project.inventario-ejb}/dist/inventario-ejb.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=${war.name} +war.name=inventario-war.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/inventario-war/nbproject/project.xml b/inventario-war/nbproject/project.xml new file mode 100644 index 0000000..fe28813 --- /dev/null +++ b/inventario-war/nbproject/project.xml @@ -0,0 +1,36 @@ + + + org.netbeans.modules.web.project + + + inventario-war + 1.6.5 + + + ${reference.inventario-ejb.dist} + + + ${file.reference.primefaces-12.0.0.jar} + WEB-INF/lib + + + + + + + + + + + + + inventario-ejb + jar + + dist + clean + dist + + + + diff --git a/inventario-war/src/conf/MANIFEST.MF b/inventario-war/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/inventario-war/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/seguridad/AutorizacionListener.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/seguridad/AutorizacionListener.java new file mode 100644 index 0000000..276b4ee --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/seguridad/AutorizacionListener.java @@ -0,0 +1,61 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.seguridad; + +import java.io.IOException; +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import javax.faces.application.NavigationHandler; +import javax.faces.context.FacesContext; +import javax.faces.event.PhaseEvent; +import javax.faces.event.PhaseId; +import javax.faces.event.PhaseListener; + +/** + * + * @author sktal + */ +@Named(value = "autorizacionListener") +@SessionScoped +public class AutorizacionListener implements PhaseListener { + + /** + * Creates a new instance of AutorizacionListener + */ + public AutorizacionListener() { + } + + private static final long serialVersionUID = 1L; + + @Override + public void afterPhase(PhaseEvent event) { + try { + //Obtener la pagina actual para validar la sesion + String paginaActual = event.getFacesContext().getViewRoot().getViewId(); + + //inicializar la sesion en caso de no haber sesion + Login.getSesion(); + + //Revisar que no sea la pafina index y que no estes logueado + //para redireccionar + if (!paginaActual.contains("index.xhtml") && Login.getEstatus() == false) { + FacesContext.getCurrentInstance().getExternalContext().redirect("faces/index.xhtml?faces-redirect=true"); + + NavigationHandler nh = event.getFacesContext().getApplication().getNavigationHandler(); + nh.handleNavigation(event.getFacesContext(), null, "index"); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void beforePhase(PhaseEvent event) {} + + @Override + public PhaseId getPhaseId() { + return PhaseId.RESTORE_VIEW; + } +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/seguridad/Login.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/seguridad/Login.java new file mode 100644 index 0000000..1a8d277 --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/seguridad/Login.java @@ -0,0 +1,127 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.seguridad; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import javax.annotation.PostConstruct; +import javax.faces.context.FacesContext; +import javax.servlet.http.HttpSession; +import mx.edu.tsj.chapala.sistemas.modelo.bl.UsuariosBL; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; + +/** + * + * @author sktal + */ +@Named(value = "loginDem") +@SessionScoped +public class Login implements Serializable { + + //Variable + private static HttpSession httpSession; + private UsuariosBL usuariosBL; + private String username; + private String password; + + public Login() { + } + + @PostConstruct + public void init() { + usuariosBL = new UsuariosBL(); // O cualquier método adecuado para inicializar usuariosBL + } + + public static void getSesion(){ + httpSession = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false); + } + + public String logout(){ + httpSession.removeAttribute("sesionActiva"); + httpSession.invalidate(); + username = ""; + password = ""; + return "index.xhtml"; + } + /* + public static String logout(){ + httpSession.removeAttribute("sesionActiva"); + httpSession.invalidate(); + return "index.xhtml"; + } + */ + + public String buscarPorLogin() { + Usuarios usuario = new Usuarios(); + usuario.setNombre(username); + usuario.setContrasena(password); + short status = 1; + usuario.setEstatus(status); + //usuario.setStatus(true); + usuario = usuariosBL.buscarPorLoginStatus(true, usuario); + if (usuario != null) { + httpSession.setAttribute("sesionActiva", true); + // Aquí podrías redirigir a otra página si el login fue exitoso + return "UsuariosLista.xhtml"; + } else { + // Aquí podrías mostrar un mensaje de error si el login falló + return "index.xhtml"; + } + } + + + //Codigo de validacion de usuario + public static String login(){ + //Llamar a BL para autenticar que regresa un boolean + //TODO: hacer un metodo en el BL que reciba el usuario y password + boolean login = true; + + if(login){ + httpSession.setAttribute("sesionActiva", "true"); + return "UsuariosLista.xhtml"; + }else{ + return "index.xhtml"; + } + } + + public UsuariosBL getUsuariosBL() { + return usuariosBL; + } + + public void setUsuariosBL(UsuariosBL usuariosBL) { + this.usuariosBL = usuariosBL; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + + public static boolean getEstatus(){ + if(httpSession!=null&& + httpSession.getId()!=null&& + !httpSession.getId().isEmpty()&& + httpSession.getAttribute("sesionActiva")!=null){ + return true; + }else{ + return false; + } + } + +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/SelectOneMenuConverter.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/SelectOneMenuConverter.java new file mode 100644 index 0000000..080de9d --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/SelectOneMenuConverter.java @@ -0,0 +1,86 @@ +package mx.edu.itsj.vista; + +import java.util.List; +import javax.faces.component.UIComponent; +import javax.faces.component.UISelectItem; +import javax.faces.component.UISelectItems; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.FacesConverter; + +/** + * The Class SelectOneMenuConverter. + */ +@FacesConverter("selectOneMenuConverter") +public class SelectOneMenuConverter implements Converter { + + @Override + public Object getAsObject(final FacesContext arg0, final UIComponent arg1, final String objectString) { + if (objectString == null) { + return null; + } + + return fromSelect(arg1, objectString); + } + + /** + * Serialize. + * + * @param object + * the object + * @return the string + */ + private String serialize(final Object object) { + if (object == null) { + return null; + } + return object.getClass() + "@" + object.hashCode(); + } + + /** + * From select. + * + * @param currentcomponent + * the currentcomponent + * @param objectString + * the object string + * @return the object + */ + private Object fromSelect(final UIComponent currentcomponent, final String objectString) { + + if (currentcomponent.getClass() == UISelectItem.class) { + final UISelectItem item = (UISelectItem) currentcomponent; + final Object value = item.getValue(); + if (objectString.equals(serialize(value))) { + return value; + } + } + + if (currentcomponent.getClass() == UISelectItems.class) { + final UISelectItems items = (UISelectItems) currentcomponent; + final List elements = (List) items.getValue(); + for (final Object element : elements) { + if (objectString.equals(serialize(element))) { + return element; + } + } + } + + + if (!currentcomponent.getChildren().isEmpty()) { + for (final UIComponent component : currentcomponent.getChildren()) { + final Object result = fromSelect(component, objectString); + if (result != null) { + return result; + } + } + } + return null; + } + + @Override + public String getAsString(final FacesContext arg0, final UIComponent arg1, final Object object) { + return serialize(object); + } + +} \ No newline at end of file diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanCategorias.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanCategorias.java new file mode 100644 index 0000000..17bb2c7 --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanCategorias.java @@ -0,0 +1,101 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.vista; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.util.List; +import javax.ejb.EJB; +import mx.edu.tsj.chapala.sistemas.modelo.bl.CategoriasBLLocal; +import mx.edu.tsj.chapala.sistemas.modelos.Categorias; + + +/** + * + * @author sktal + */ +@Named(value = "demoBeanCategorias") +@SessionScoped +public class demoBeanCategorias implements Serializable { + + @EJB + private CategoriasBLLocal categoriasBL; + + private Categorias categorias = new Categorias(); + + private boolean nuevo; + + private String titulo; + + public CategoriasBLLocal getCategoriasBL() { + return categoriasBL; + } + + + public void setCategoriasBL(CategoriasBLLocal categoriasBL) { + this.categoriasBL = categoriasBL; + } + + public Categorias getCategorias() { + return categorias; + } + + public void setCategorias(Categorias categorias) { + this.categorias = categorias; + } + + public demoBeanCategorias() { + } + + /*public void eliminarCategoria(){ + usuariosBL.eliminar(usuarios); + //usuariosBL.desactivarUsuarios(usuarios); + }*/ + + public String agregarC(){ + //categorias.setEstatus((short)1); + //usuariosBL.agregar(usuarios); + categoriasBL.agregar(categorias); + //usuarios = new Usuarios(); + categorias = new Categorias(); + return "CategoriasLista.xhtml"; + } + + public List getAll(){ + return categoriasBL.getAll(); + } + + public String getTitulo() { + return titulo; + } + + public boolean isNuevo() { + return nuevo; + } + + public void prepararEditar(Categorias categorias){ + nuevo = false; + titulo = "Editando categoria"; + this.categorias = categorias; + } + + public void prepararNuevo(){ + nuevo = true; + titulo = "Agregando Categoria"; + categorias = new Categorias(); + } + + public void editarCategoria(){ + //usuariosBL.editar(usuarios); + categoriasBL.editar(categorias); + } + + public void prepararEliminar(Categorias categorias){ + this.categorias = categorias; + titulo = "Eliminando categoria"; + } + +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanDetallesp.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanDetallesp.java new file mode 100644 index 0000000..fd3ec52 --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanDetallesp.java @@ -0,0 +1,185 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.vista; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.util.List; +import javax.ejb.EJB; +import mx.edu.tsj.chapala.sistemas.modelo.bl.DetallespBLLocal; +import mx.edu.tsj.chapala.sistemas.modelo.bl.UsuariosBLLocal; +import mx.edu.tsj.chapala.sistemas.modelos.Detallesp; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Named(value = "demoBeanDetallesp") +@SessionScoped +public class demoBeanDetallesp implements Serializable { + + @EJB + private DetallespBLLocal detallesBL; + + private Detallesp detalles = new Detallesp(); + + private boolean nuevo; + + //Creado clase 19 de marzo + private String titulo; + + public DetallespBLLocal getDetallespBL() { + return detallesBL; + } + + + public void setDetallesp(DetallespBLLocal detallesBL) { + this.detallesBL = detallesBL; + } + public Detallesp getDetallesp() { + return detalles; + } + + public void setDetallesp(Detallesp detallesp) { + this.detalles = detalles; + } + + /** + * Creates a new instance of demoBeanDetallesp + */ + public demoBeanDetallesp() { + } + + public void eliminarDetalle(){ + //usuariosBL.eliminar(usuarios); + detallesBL.eliminar(detalles); + //usuariosBL.desactivarUsuarios(usuarios); + } + + public String agregarDetalle(){ + //detallesp.setEstatus(1); + detallesBL.agregar(detalles); + detalles = new Detallesp(); + return "index.xhtml"; + } + + public String metodo() { + Detallesp d = new Detallesp(); + + /*u.setNombre("Kevin"); + u.setApellidoP("Talamantes"); + u.setApellidoM("Talamantes"); + u.setEmail("skta@gmail.com"); + u.setTelefono("3314457485"); + */ + d.setCantidad("30"); + d.setPrecioU((long) 45.00); + + //Mensaje m = editorialBL.agregar(a); + Mensaje m = detallesBL.agregar(d); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE AGREGRO"); + } else { + System.out.println("NO SE AGREGO"); + } + + //editorialBL.agregar(a); + return "usuarios.xhtml"; + } + + public String buscar() { + //Usuarios u = new Usuarios(); + Detallesp d = new Detallesp(); + //u.setId(2); + d.setId(2); + + Mensaje m = detallesBL.buscarId(d); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("Encontre al usuario: "); + System.out.println(detallesBL.buscarId(d)); + } else { + System.out.println("NO SE ENCONTRO"); + } + return "usuarios.xhtml"; + } + + public String eliminar() { + Detallesp d = detallesBL.buscarIdLi(new Detallesp(2)); + //Mensaje m = editorialBL.eliminar(a); + Mensaje m = detallesBL.eliminar(d); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE ELIMINO"); + } else { + System.out.println("NO SE PUDO"); + } + //System.out.println("Editorial eliminada: "); + //System.out.println(editorialBL.eliminar(a)); + return "usuarios.xhtml"; + } + + + public String editar() { + try { + Detallesp d = detallesBL.buscarIdLi(new Detallesp(2)); + + d.setCantidad("50"); + d.setPrecioU((long) 55.00); + + + //editorialBL.editar(a); + //Mensaje m = editorialBL.editar(a); + Mensaje m = detallesBL.editar(d); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE EDITO"); + } else { + System.out.println("NO SE PUDO"); + } + } catch (Exception e) { + System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); + } + + return "editorial.xhtml"; + } + + public List getAll(){ + return detallesBL.getAll(); + } + + public String getTitulo() { + return titulo; + } + + public boolean isNuevo() { + return nuevo; + } + + public void prepararEditar(Detallesp detalles){ + nuevo = false; + titulo = "Editando usuario"; + this.detalles = detalles; + } + + public void prepararNuevo(){ + nuevo = true; + titulo = "Agregando Detalles"; + detalles = new Detallesp(); + } + + public void editarDetalles(){ + detallesBL.editar(detalles); + } + + public void prepararEliminar(Detallesp detalles){ + this.detalles = detalles; + titulo = "Eliminando detalles"; + } +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanPedidos.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanPedidos.java new file mode 100644 index 0000000..35bce4d --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanPedidos.java @@ -0,0 +1,102 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.vista; + +import java.io.Serializable; +import java.util.List; +import javax.ejb.EJB; +import javax.enterprise.context.SessionScoped; +import javax.inject.Named; +import mx.edu.tsj.chapala.sistemas.modelo.bl.PedidosBLLocal; +import mx.edu.tsj.chapala.sistemas.modelos.Pedidos; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + + + +/** + * + * @author lwyou + */ +@Named(value = "demoBeanPedidos") +@SessionScoped +public class demoBeanPedidos implements Serializable { + + @EJB + private PedidosBLLocal pedidosBL; + + private Pedidos pedidos = new Pedidos(); + + private boolean nuevo; + + private String titulo; + + public PedidosBLLocal getPedidosBL() { + return pedidosBL; + } + + public void setPedidosBL(PedidosBLLocal pedidosBL) { + this.pedidosBL = pedidosBL; + } + + public Pedidos getPedidos() { + return pedidos; + } + + + public void setPedidos(Pedidos pedidos) { + this.pedidos = pedidos; + } + /** + * Creates a new instance of demoBeanProductos + */ + public demoBeanPedidos() { + } + + public void eliminarPedidos(){ + pedidosBL.eliminar(pedidos); + //usuariosBL.desactivarUsuarios(usuarios); + } + + public String agregarP(){ + pedidos.setEstatus((short)1); + pedidosBL.agregar(pedidos); + //usuarios = new Usuarios(); + pedidos = new Pedidos(); + return "PedidosLista.xhtml"; + } + + public List getAll(){ + return pedidosBL.getAll(); + } + + public String getTitulo() { + return titulo; + } + + public boolean isNuevo() { + return nuevo; + } + + public void prepararEditar(Pedidos pedidos){ + nuevo = false; + titulo = "Editando pedidos"; + this.pedidos= pedidos; + } + + public void prepararNuevo(){ + nuevo = true; + titulo = "Agregando pedidos"; + pedidos = new Pedidos(); + } + + public void editarPedidos(){ + pedidosBL.editar(pedidos); + } + + public void prepararEliminar(Pedidos pedidos){ + this.pedidos = pedidos; + titulo = "Eliminando pedidos"; + } +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanProductos.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanProductos.java new file mode 100644 index 0000000..7b7428f --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanProductos.java @@ -0,0 +1,100 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.vista; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.util.List; +import javax.ejb.EJB; +import mx.edu.tsj.chapala.sistemas.modelo.bl.ProductosBLLocal; +import mx.edu.tsj.chapala.sistemas.modelo.bl.UsuariosBLLocal; +import mx.edu.tsj.chapala.sistemas.modelos.Productos; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; + +/** + * + * @author sktal + */ +@Named(value = "demoBeanProductos") +@SessionScoped +public class demoBeanProductos implements Serializable { + + @EJB + private ProductosBLLocal productosBL; + + private Productos productos = new Productos(); + + private boolean nuevo; + + private String titulo; + + public ProductosBLLocal getProductosBL() { + return productosBL; + } + + public void setProductosBL(ProductosBLLocal productosBL) { + this.productosBL = productosBL; + } + + public Productos getProductos() { + return productos; + } + + public void setProductos(Productos productos) { + this.productos = productos; + } + /** + * Creates a new instance of demoBeanProductos + */ + public demoBeanProductos() { + } + + public void eliminarProducto(){ + productosBL.eliminar(productos); + //usuariosBL.desactivarUsuarios(usuarios); + } + + public String agregarP(){ + productos.setEstatus((short)1); + productosBL.agregar(productos); + //usuarios = new Usuarios(); + productos = new Productos(); + return "ProductosLista.xhtml"; + } + + public List getAll(){ + return productosBL.getAll(); + } + + public String getTitulo() { + return titulo; + } + + public boolean isNuevo() { + return nuevo; + } + + public void prepararEditar(Productos productos){ + nuevo = false; + titulo = "Editando producto"; + this.productos = productos; + } + + public void prepararNuevo(){ + nuevo = true; + titulo = "Agregando producto"; + productos = new Productos(); + } + + public void editarProductos(){ + productosBL.editar(productos); + } + + public void prepararEliminar(Productos productos){ + this.productos = productos; + titulo = "Eliminando productos"; + } +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanProveedores.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanProveedores.java new file mode 100644 index 0000000..994ebd7 --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanProveedores.java @@ -0,0 +1,189 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.vista; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.util.List; +import javax.ejb.EJB; +import mx.edu.tsj.chapala.sistemas.modelo.bl.ProveedoresBLLocal; +import mx.edu.tsj.chapala.sistemas.modelos.Proveedores; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Named(value = "demoBeanProveedores") +@SessionScoped +public class demoBeanProveedores implements Serializable { + + @EJB + private ProveedoresBLLocal proveedoresBL; + + private boolean nuevo; + + private String titulo; + + + private Proveedores proveedores = new Proveedores(); + + public ProveedoresBLLocal getProveedoresBL() { + return proveedoresBL; + } + + public void setProveedoresBL(ProveedoresBLLocal proveedoresBL) { + this.proveedoresBL = proveedoresBL; + } + + public Proveedores getProveedores() { + return proveedores; + } + + public void setProveedores(Proveedores proveedores) { + this.proveedores = proveedores; + } + + + /** + * Creates a new instance of demoBeanProveedores + */ + public demoBeanProveedores() { + } + + + + public void eliminarProveedores(){ + //proveedoresBL.eliminar(proveedores); + proveedoresBL.desactivarProveedores(proveedores); + } + + public String agregarP(){ + proveedores.setEstatus((short)1); + proveedoresBL.agregar(proveedores); + proveedores = new Proveedores(); + return "ProveedoresLista.xhtml"; + } + + + public String metodo() { + //Editorial a = new Editorial(); + Proveedores u = new Proveedores(); + + // u.setNombre("Kevin"); + //u.setApellidoP("Talamantes"); + // u.setApellidoM("Talamantes"); + //u.setEmail("skta@gmail.com"); + //u.setTelefono("3314457485"); + + //Mensaje m = editorialBL.agregar(a); + Mensaje m = proveedoresBL.agregar(u); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE AGREGRO"); + } else { + System.out.println("NO SE AGREGO"); + } + + //editorialBL.agregar(a); + return "Proveedores.xhtml"; + } + + public String buscar() { + Proveedores u = new Proveedores(); + u.setId(2); + + Mensaje m = proveedoresBL.buscarId(u); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("Encontre al usuario: "); + System.out.println(proveedoresBL.buscarId(u)); + } else { + System.out.println("NO SE ENCONTRO"); + } + return "Proveedores.xhtml"; + } + + public String eliminar() { + //Editorial a = editorialBL.buscarIdLi(new Editorial(2)); + Proveedores u = proveedoresBL.buscarIdLi(new Proveedores(2)); + //Mensaje m = editorialBL.eliminar(a); + Mensaje m = proveedoresBL.eliminar(u); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE ELIMINO"); + } else { + System.out.println("NO SE PUDO"); + } + //System.out.println("Editorial eliminada: "); + //System.out.println(editorialBL.eliminar(a)); + return "Proveedores.xhtml"; + } + + + public String editar() { + try { + //Editorial a = editorialBL.buscarIdLi(new Editorial(2)); + Proveedores u = proveedoresBL.buscarIdLi(new Proveedores(2)); + + // u.setNombre("Pancho"); + // u.setApellidoP("Galvez"); + // u.setApellidoM("Santillan"); + // u.setEmail("santillan@gmail.com"); + //u.setTelefono("331254781"); + + //editorialBL.editar(a); + //Mensaje m = editorialBL.editar(a); + Mensaje m = proveedoresBL.editar(u); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE EDITO"); + } else { + System.out.println("NO SE PUDO"); + } + } catch (Exception e) { + System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); + } + + return "Proveedores.xhtml"; + } + + public List getAll(){ + return proveedoresBL.getAll(); + } + + public boolean isNuevo() { + return nuevo; + } + + public String getTitulo() { + return titulo; + } + + + + public void prepararEditar(Proveedores proveedores){ + nuevo = false; + titulo = "Editando Proveedor"; + this.proveedores = proveedores; + } + + public void prepararNuevo(){ + nuevo = true; + titulo = "Agregando Proveedor"; + proveedores = new Proveedores(); + } + + public void editarProveedores(){ + proveedoresBL.editar(proveedores); + } + + public void prepararEliminar(Proveedores proveedores){ + this.proveedores = proveedores; + titulo = "Eliminando proveedor"; + } + +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanUsuarios.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanUsuarios.java new file mode 100644 index 0000000..35af3ec --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/demoBeanUsuarios.java @@ -0,0 +1,188 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.vista; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.util.List; +import javax.ejb.EJB; +import mx.edu.tsj.chapala.sistemas.modelo.bl.UsuariosBLLocal; +import mx.edu.tsj.chapala.sistemas.modelos.Usuarios; +import mx.edu.tsj.chapala.sistemas.msj.Mensaje; + +/** + * + * @author sktal + */ +@Named(value = "demoBeanUsuarios") +@SessionScoped +public class demoBeanUsuarios implements Serializable { + + @EJB + private UsuariosBLLocal usuariosBL; + + private Usuarios usuarios = new Usuarios(); + + private boolean nuevo; + + //Creado clase 19 de marzo + private String titulo; + + public UsuariosBLLocal getUsuariosBL() { + return usuariosBL; + } + + + + public void setUsuariosBL(UsuariosBLLocal usuariosBL) { + this.usuariosBL = usuariosBL; + } + + public Usuarios getUsuarios() { + return usuarios; + } + + public void setUsuarios(Usuarios usuarios) { + this.usuarios = usuarios; + } + + + + /** + * Creates a new instance of demoBeanUsuarios + */ + public demoBeanUsuarios() { + } + + public void eliminarUsuario(){ + usuariosBL.eliminar(usuarios); + //usuariosBL.desactivarUsuarios(usuarios); + } + + public String agregarU(){ + usuarios.setEstatus((short)1); + usuariosBL.agregar(usuarios); + usuarios = new Usuarios(); + return "UsuariosLista.xhtml"; + } + + + public String metodo() { + //Editorial a = new Editorial(); + Usuarios u = new Usuarios(); + + u.setNombre("Kevin"); + u.setApellidoP("Talamantes"); + u.setApellidoM("Talamantes"); + u.setEmail("skta@gmail.com"); + u.setTelefono("3314457485"); + + //Mensaje m = editorialBL.agregar(a); + Mensaje m = usuariosBL.agregar(u); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE AGREGRO"); + } else { + System.out.println("NO SE AGREGO"); + } + + //editorialBL.agregar(a); + return "usuarios.xhtml"; + } + + public String buscar() { + Usuarios u = new Usuarios(); + u.setId(2); + + Mensaje m = usuariosBL.buscarId(u); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("Encontre al usuario: "); + System.out.println(usuariosBL.buscarId(u)); + } else { + System.out.println("NO SE ENCONTRO"); + } + return "usuarios.xhtml"; + } + + public String eliminar() { + //Editorial a = editorialBL.buscarIdLi(new Editorial(2)); + Usuarios u = usuariosBL.buscarIdLi(new Usuarios(2)); + //Mensaje m = editorialBL.eliminar(a); + if(u.getEstatus()==0){ + System.out.println("No existe. "); + } else{ + u.setEstatus((short)0); + usuariosBL.eliminar(u); + System.out.println("Fue eliminado con exito. "); + } + //System.out.println("Editorial eliminada: "); + //System.out.println(editorialBL.eliminar(a)); + return "usuarios.xhtml"; + } + + + public String editar() { + try { + //Editorial a = editorialBL.buscarIdLi(new Editorial(2)); + Usuarios u = usuariosBL.buscarIdLi(new Usuarios(2)); + + u.setNombre("Pancho"); + u.setApellidoP("Galvez"); + u.setApellidoM("Santillan"); + u.setEmail("santillan@gmail.com"); + u.setTelefono("331254781"); + + //editorialBL.editar(a); + //Mensaje m = editorialBL.editar(a); + Mensaje m = usuariosBL.editar(u); + System.out.println(m); + if (m.compareTo(Mensaje.SIN_ERROR) == 0) { + System.out.println("SE EDITO"); + } else { + System.out.println("NO SE PUDO"); + } + } catch (Exception e) { + System.out.println("Ha ocurrido un error: " + Mensaje.ELEMENTO_NO_ENCONTRADO); + } + + return "editorial.xhtml"; + } + + public List getAll(){ + return usuariosBL.getAll(); + } + + public String getTitulo() { + return titulo; + } + + public boolean isNuevo() { + return nuevo; + } + + public void prepararEditar(Usuarios usuarios){ + nuevo = false; + titulo = "Editando usuario"; + this.usuarios = usuarios; + } + + public void prepararNuevo(){ + nuevo = true; + titulo = "Agregando Usuario"; + usuarios = new Usuarios(); + } + + public void editarUsuario(){ + usuariosBL.editar(usuarios); + } + + public void prepararEliminar(Usuarios usuarios){ + this.usuarios = usuarios; + titulo = "Eliminando usuario"; + } + +} diff --git a/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/ejemplo.java b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/ejemplo.java new file mode 100644 index 0000000..72489cc --- /dev/null +++ b/inventario-war/src/java/mx/edu/tsj/chapala/sistemas/vista/ejemplo.java @@ -0,0 +1,13 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package mx.edu.tsj.chapala.sistemas.vista; + +/** + * + * @author sktal + */ +public class ejemplo { + +} diff --git a/inventario-war/web/CategoriasCrearEditar.xhtml b/inventario-war/web/CategoriasCrearEditar.xhtml new file mode 100644 index 0000000..4667848 --- /dev/null +++ b/inventario-war/web/CategoriasCrearEditar.xhtml @@ -0,0 +1,88 @@ + + + + + + + + + +
CATEGORIAS
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + +

+ + + + + + + + + + + + + +
+
+
+ +
+ +
+ + + diff --git a/inventario-war/web/CategoriasEliminar.xhtml b/inventario-war/web/CategoriasEliminar.xhtml new file mode 100644 index 0000000..5066f1f --- /dev/null +++ b/inventario-war/web/CategoriasEliminar.xhtml @@ -0,0 +1,81 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +

+ + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/CategoriasLista.xhtml b/inventario-war/web/CategoriasLista.xhtml new file mode 100644 index 0000000..ba150b7 --- /dev/null +++ b/inventario-war/web/CategoriasLista.xhtml @@ -0,0 +1,107 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ +
+ + + diff --git a/inventario-war/web/PedidosCrearEditar.xhtml b/inventario-war/web/PedidosCrearEditar.xhtml new file mode 100644 index 0000000..cc1bece --- /dev/null +++ b/inventario-war/web/PedidosCrearEditar.xhtml @@ -0,0 +1,91 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +

+ + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/PedidosEliminar.xhtml b/inventario-war/web/PedidosEliminar.xhtml new file mode 100644 index 0000000..85f9fde --- /dev/null +++ b/inventario-war/web/PedidosEliminar.xhtml @@ -0,0 +1,86 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +

+ + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/PedidosLista.xhtml b/inventario-war/web/PedidosLista.xhtml new file mode 100644 index 0000000..c0f67f0 --- /dev/null +++ b/inventario-war/web/PedidosLista.xhtml @@ -0,0 +1,120 @@ + + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ + + diff --git a/inventario-war/web/ProductosCrearEditar.xhtml b/inventario-war/web/ProductosCrearEditar.xhtml new file mode 100644 index 0000000..12d931a --- /dev/null +++ b/inventario-war/web/ProductosCrearEditar.xhtml @@ -0,0 +1,105 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/ProductosEliminar.xhtml b/inventario-war/web/ProductosEliminar.xhtml new file mode 100644 index 0000000..b02495f --- /dev/null +++ b/inventario-war/web/ProductosEliminar.xhtml @@ -0,0 +1,91 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +

+ + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/ProductosLista.xhtml b/inventario-war/web/ProductosLista.xhtml new file mode 100644 index 0000000..79038ce --- /dev/null +++ b/inventario-war/web/ProductosLista.xhtml @@ -0,0 +1,136 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ + + diff --git a/inventario-war/web/ProveedoresCrearEditar.xhtml b/inventario-war/web/ProveedoresCrearEditar.xhtml new file mode 100644 index 0000000..6c0b5c1 --- /dev/null +++ b/inventario-war/web/ProveedoresCrearEditar.xhtml @@ -0,0 +1,88 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +

+ + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/ProveedoresLista.xhtml b/inventario-war/web/ProveedoresLista.xhtml new file mode 100644 index 0000000..f30e119 --- /dev/null +++ b/inventario-war/web/ProveedoresLista.xhtml @@ -0,0 +1,125 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +       + +
+ +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/UsuariosCrearEditar.xhtml b/inventario-war/web/UsuariosCrearEditar.xhtml new file mode 100644 index 0000000..b6c77da --- /dev/null +++ b/inventario-war/web/UsuariosCrearEditar.xhtml @@ -0,0 +1,91 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +

+ + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/UsuariosLista.xhtml b/inventario-war/web/UsuariosLista.xhtml new file mode 100644 index 0000000..df6b9ba --- /dev/null +++ b/inventario-war/web/UsuariosLista.xhtml @@ -0,0 +1,138 @@ + + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/WEB-INF/faces-config.xml b/inventario-war/web/WEB-INF/faces-config.xml new file mode 100644 index 0000000..dc5eb08 --- /dev/null +++ b/inventario-war/web/WEB-INF/faces-config.xml @@ -0,0 +1,30 @@ + + + + + mx.edu.tsj.chapala.sistemas.seguridad.AutorizacionListener + + + diff --git a/inventario-war/web/WEB-INF/glassfish-web.xml b/inventario-war/web/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..584a477 --- /dev/null +++ b/inventario-war/web/WEB-INF/glassfish-web.xml @@ -0,0 +1,25 @@ + + + + + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/inventario-war/web/WEB-INF/web.xml b/inventario-war/web/WEB-INF/web.xml new file mode 100644 index 0000000..427d0b7 --- /dev/null +++ b/inventario-war/web/WEB-INF/web.xml @@ -0,0 +1,28 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/UsuariosLista.xhtml + + + javax.faces.CONFIG_FILES + /WEB-INF/faces-config.xml + + diff --git a/inventario-war/web/detallespCrearEditar.xhtml b/inventario-war/web/detallespCrearEditar.xhtml new file mode 100644 index 0000000..e2bbf42 --- /dev/null +++ b/inventario-war/web/detallespCrearEditar.xhtml @@ -0,0 +1,94 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ + + diff --git a/inventario-war/web/detallespEliminar.xhtml b/inventario-war/web/detallespEliminar.xhtml new file mode 100644 index 0000000..165dcb5 --- /dev/null +++ b/inventario-war/web/detallespEliminar.xhtml @@ -0,0 +1,85 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +

+ + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/detallespLista.xhtml b/inventario-war/web/detallespLista.xhtml new file mode 100644 index 0000000..4d11082 --- /dev/null +++ b/inventario-war/web/detallespLista.xhtml @@ -0,0 +1,122 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ + + + + +
+ + + diff --git a/inventario-war/web/ejemplo.xhtml b/inventario-war/web/ejemplo.xhtml new file mode 100644 index 0000000..c1cd16e --- /dev/null +++ b/inventario-war/web/ejemplo.xhtml @@ -0,0 +1,30 @@ + + + + Inicio de sesión + + + + +

Bienvenido

+ + + + + + + + + + + + + + + +
+
+ \ No newline at end of file diff --git a/inventario-war/web/index.xhtml b/inventario-war/web/index.xhtml new file mode 100644 index 0000000..130d60d --- /dev/null +++ b/inventario-war/web/index.xhtml @@ -0,0 +1,90 @@ + + + + + + Facelet + + + +
+

Iniciar sesión

+ + + +
+ + + + +
+
+ + + + +
+ +
+
+
+ diff --git a/inventario-war/web/proveedoresEliminar.xhtml b/inventario-war/web/proveedoresEliminar.xhtml new file mode 100644 index 0000000..6eea631 --- /dev/null +++ b/inventario-war/web/proveedoresEliminar.xhtml @@ -0,0 +1,89 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +

+ + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/inventario-war/web/resources/css/cssLayout.css b/inventario-war/web/resources/css/cssLayout.css new file mode 100644 index 0000000..95123bd --- /dev/null +++ b/inventario-war/web/resources/css/cssLayout.css @@ -0,0 +1,62 @@ + +#top { + position: relative; + background-color: #7f00b2; + color: white; + padding: 20px; + margin: 0px 0px 10px 0px; +} + +#bottom { + background-color: #97e9ff; + padding: 5px; + margin: 10px 0px 0px 0px; + position: fixed; /* Fija el elemento a la posición del viewport */ + bottom: 0; /* Posiciona el elemento en la parte inferior */ + left: 0; /* Posiciona el elemento en la esquina izquierda */ + width: 100%; /* Ocupa todo el ancho de la pantalla */ + z-index: 100; +} + +#left { + float: left; + background-color: #ab3ed8; + padding: 5px; + width: 175px; + height: 600px; /* Altura fija de 300px */ +} + + + +.center_content { + position: relative; + background-color: #dddddd; + padding: 5px; +} + +.left_content { + background-color: #dddddd; + padding: 5px; + margin-left: 170px; + /*height: 300px; /* Altura fija de 300px */ +} + +.right_content { + background-color: #dddddd; + padding: 5px; + margin: 0px 6px 0px 180px; +} + +#top a:link, #top a:visited { + color: white; + font-weight : bold; + text-decoration: none; +} + +#top a:link:hover, #top a:visited:hover { + color: black; + font-weight : bold; + text-decoration : underline; +} + + diff --git a/inventario-war/web/resources/css/default.css b/inventario-war/web/resources/css/default.css new file mode 100644 index 0000000..485ce30 --- /dev/null +++ b/inventario-war/web/resources/css/default.css @@ -0,0 +1,35 @@ +body { + background-color: #ffffff; + font-size: 12px; + font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; + color: #000000; + margin: 10px; +} + +#left { + background-color: navy; /* Color de fondo azul marino */ + color: white; /* Color del texto en blanco para mayor contraste */ + padding: 20px; /* Espacio interno para separar el contenido del borde */ +} + +h1 { + font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; + border-bottom: 1px solid #AFAFAF; + font-size: 16px; + font-weight: bold; + margin: 0px; + padding: 0px; + color: #D20005; +} + +a:link, a:visited { + color: #045491; + font-weight : bold; + text-decoration: none; +} + +a:link:hover, a:visited:hover { + color: #045491; + font-weight : bold; + text-decoration : underline; +} diff --git a/inventario-war/web/template/PrincipalE.xhtml b/inventario-war/web/template/PrincipalE.xhtml new file mode 100644 index 0000000..4198459 --- /dev/null +++ b/inventario-war/web/template/PrincipalE.xhtml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + Facelets Template + + + + +
+ +
+
+
+ Left +
+
+ +
+ Content +
+
+
+
+
+
+
Kevin Talamantes, Francisco Salazar
+
2024
+
+
+ + diff --git a/inventario-war/web/template/templeteE.xhtml b/inventario-war/web/template/templeteE.xhtml new file mode 100644 index 0000000..226d88a --- /dev/null +++ b/inventario-war/web/template/templeteE.xhtml @@ -0,0 +1,128 @@ + + + + + + + + + Facelets Template + + + + + + + +
+ +
+
MENÚ DE OPCIONES
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ Content +
+
+
+ + diff --git a/inventario-war/web/usuariosEliminar.xhtml b/inventario-war/web/usuariosEliminar.xhtml new file mode 100644 index 0000000..08653bc --- /dev/null +++ b/inventario-war/web/usuariosEliminar.xhtml @@ -0,0 +1,89 @@ + + + + + + + + + + top + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +

+ + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+ + + diff --git a/nbproject/ant-deploy.xml b/nbproject/ant-deploy.xml new file mode 100644 index 0000000..fdc06d5 --- /dev/null +++ b/nbproject/ant-deploy.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..8805eb2 --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,635 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..b012e77 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=0a78aec7 +build.xml.script.CRC32=2acbabf1 +build.xml.stylesheet.CRC32=7e2ae9c8@1.73 +# 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=0a78aec7 +nbproject/build-impl.xml.script.CRC32=ccf5040b +nbproject/build-impl.xml.stylesheet.CRC32=abdce74a@1.73 diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..1de0221 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,40 @@ +build.classes.excludes=**/*.java,**/*.form,**/.nbattrs +build.dir=build +build.generated.dir=${build.dir}/generated +client.module.uri=inventario-war +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-7.0.classpath} +j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args} +j2ee.compile.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7 +j2ee.platform.classpath=${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv4ee7 +jar.compress=false +jar.content.additional=\ + ${reference.inventario-war.dist-ear}:\ + ${reference.inventario-ejb.dist-ear} +jar.name=inventario.ear +javac.debug=true +javac.deprecation=false +javac.source=1.7 +javac.target=1.7 +meta.inf=src/conf +no.dependencies=false +platform.active=default_platform +project.inventario-ejb=inventario-ejb +project.inventario-war=inventario-war +reference.inventario-ejb.dist-ear=${project.inventario-ejb}/dist/inventario-ejb.jar +reference.inventario-war.dist-ear=${project.inventario-war}/dist/inventario-war.war +resource.dir=setup +source.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..3ccc615 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,39 @@ + + + org.netbeans.modules.j2ee.earproject + + + inventario + 1.6.5 + + + + ${reference.inventario-war.dist-ear} + / + + + ${reference.inventario-ejb.dist-ear} + / + + + + + + inventario-ejb + j2ee_ear_archive + + dist-ear + clean-ear + dist-ear + + + inventario-war + j2ee_ear_archive + + dist-ear + clean-ear + dist-ear + + + + diff --git a/src/conf/MANIFEST.MF b/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 +