From 6e41a742bc8f1b556f1cb3a5368b04166140f150 Mon Sep 17 00:00:00 2001 From: Ely Date: Tue, 14 May 2024 13:28:23 -0500 Subject: [PATCH] login terminado total --- .../edu/tjs/chapala/sistemas/bl/LoginBL.java | 59 ++++++++ .../tjs/chapala/sistemas/bl/LoginBLLocal.java | 19 +++ .../tjs/chapala/sistemas/dao/LoginDAO.java | 53 +++++++ .../tjs/chapala/sistemas/dao/UsuariosDAO.java | 52 ++++--- .../edu/tjs/chapala/sistemas/msg/Mensaje.java | 3 +- .../seguridad/AutorizacionListener.java | 5 +- .../sistemas/seguridad/DemoBeanLogin.java | 108 +++++++++++++ .../tjs/chapala/sistemas/seguridad/Login.java | 92 ----------- .../chapala/sistemas/vista/DemoBeanRol.java | 143 ++++++++++++++++++ .../sistemas/vista/DemoBeanUsuarios.java | 6 +- Inventario-war/web/index.xhtml | 62 +++++--- Inventario-war/web/rolLista.xhtml | 21 ++- Inventario-war/web/usuariosLista.xhtml | 125 ++++++++------- nbproject/project.properties | 82 +++++----- 14 files changed, 569 insertions(+), 261 deletions(-) create mode 100644 Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBL.java create mode 100644 Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBLLocal.java create mode 100644 Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/LoginDAO.java create mode 100644 Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/DemoBeanLogin.java delete mode 100644 Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/Login.java create mode 100644 Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/vista/DemoBeanRol.java diff --git a/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBL.java b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBL.java new file mode 100644 index 0000000..2353133 --- /dev/null +++ b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBL.java @@ -0,0 +1,59 @@ +/* + * 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.tjs.chapala.sistemas.bl; + +import java.util.Optional; +import javax.ejb.Stateless; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import mx.edu.tjs.chapala.sistemas.dao.LoginDAO; +import mx.edu.tjs.chapala.sistemas.modelo.Usuarios; +import mx.edu.tjs.chapala.sistemas.msg.Mensaje; + +/** + * + * @author Ely + */ +@Stateless +public class LoginBL implements LoginBLLocal { + + // Add business logic below. (Right-click in editor and choose + // "Insert Code > Add Business Method") + public void addMessage(FacesMessage.Severity severity, String summary, String detail) { + FacesContext.getCurrentInstance(). + addMessage(null, new FacesMessage(severity, summary, detail)); + } + + @Override + public Mensaje login(Usuarios usuarios) { + LoginDAO loginDAO = new LoginDAO(); + Mensaje m; + //Toda la logica + + if (usuarios.getUsuario().isEmpty() + || usuarios.getContrasenia().isEmpty()) { + + System.out.println("Campos incompletos"); + return Mensaje.CAMPOS_INCOMPLETOS; + } + + usuarios.setStatus(1); + Optional loginOptional = loginDAO.login(usuarios); + + if (loginOptional.isPresent()) { + // Manejar el caso en el que se encontró al menos un usuario + m = Mensaje.SIN_ERROR; + System.out.println("se inicio sesion"); + addMessage(FacesMessage.SEVERITY_INFO, "", "¡SE INICIO SESION!"); + + } else { + m = Mensaje.NO_EXISTE; + System.out.println("no se inicio sesion"); + addMessage(FacesMessage.SEVERITY_ERROR, "", "¡USUARIO NO BALIDO!"); + + } + return m; + } +} diff --git a/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBLLocal.java b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBLLocal.java new file mode 100644 index 0000000..99370c3 --- /dev/null +++ b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/bl/LoginBLLocal.java @@ -0,0 +1,19 @@ +/* + * 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.tjs.chapala.sistemas.bl; + +import javax.ejb.Local; +import mx.edu.tjs.chapala.sistemas.modelo.Usuarios; +import mx.edu.tjs.chapala.sistemas.msg.Mensaje; + +/** + * + * @author Ely + */ +@Local +public interface LoginBLLocal { + public Mensaje login(Usuarios usuarios); + +} diff --git a/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/LoginDAO.java b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/LoginDAO.java new file mode 100644 index 0000000..943db28 --- /dev/null +++ b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/LoginDAO.java @@ -0,0 +1,53 @@ +/* + * 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.tjs.chapala.sistemas.dao; + +import java.util.List; +import java.util.Optional; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; +import javax.persistence.Query; +import mx.edu.tjs.chapala.sistemas.modelo.Usuarios; + +/** + * + * @author Ely + */ +public class LoginDAO { + private EntityManager em; + + public LoginDAO() { + EntityManagerFactory emf = Persistence.createEntityManagerFactory("Inventario-ejbPU"); + em = emf.createEntityManager(); + } + + public Optional login(Usuarios usuarios) { + Query q = em.createNamedQuery("Usuarios.findByUsuario"); + q.setParameter("usuario", usuarios.getUsuario()); + + Query q1 = em.createNamedQuery("Usuarios.findByContrasenia"); + q1.setParameter("contrasenia", usuarios.getContrasenia()); + + Query q2 = em.createNamedQuery("Usuarios.findByStatus"); + q2.setParameter("status", usuarios.getStatus()); + + List resUsuario = q.getResultList(); + List resContrasenia = q1.getResultList(); + List resStatus = q2.getResultList(); + + if (!resUsuario.isEmpty() && !resContrasenia.isEmpty()) { + Usuarios usuarioEncontrado = resUsuario.stream() + .filter(resUsuario::contains) + .filter(resContrasenia::contains) + .filter(resStatus::contains) + .findFirst() + .orElse(null); + return Optional.ofNullable(usuarioEncontrado); + } else { + return Optional.empty(); + } + } +} diff --git a/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/UsuariosDAO.java b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/UsuariosDAO.java index c6b6587..6b3d45b 100644 --- a/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/UsuariosDAO.java +++ b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/dao/UsuariosDAO.java @@ -33,31 +33,7 @@ public class UsuariosDAO { em.getTransaction().commit(); } - public Optional validar(Usuarios u) { - Query q = em.createNamedQuery("Usuarios.findByUsuario"); - q.setParameter("usuario", u.getUsuario()); - Query q1 = em.createNamedQuery("Usuarios.findByContrasenia"); - q1.setParameter("contrasenia", u.getContrasenia()); - List uresultado = q.getResultList(); - List cresultado = q1.getResultList(); - - - if (!uresultado.isEmpty() && !cresultado.isEmpty()) { - - Usuarios Encontrado = uresultado.stream() - .filter(uresultado::contains) - .filter(cresultado::contains) - .findFirst() - .orElse(null); - - return Optional.ofNullable(Encontrado); - } else { - // Devuelve Optional vacío para indicar ausencia de resultados - return Optional.empty(); - } - - - } + public void editar(Usuarios u) { buscarPorId(u); @@ -196,4 +172,30 @@ public class UsuariosDAO { return q.getResultList(); } + public Optional validar(Usuarios u) { + Query q = em.createNamedQuery("Usuarios.findByUsuario"); + q.setParameter("usuario", u.getUsuario()); + Query q1 = em.createNamedQuery("Usuarios.findByContrasenia"); + q1.setParameter("contrasenia", u.getContrasenia()); + List uresultado = q.getResultList(); + List cresultado = q1.getResultList(); + + + if (!uresultado.isEmpty() && !cresultado.isEmpty()) { + + Usuarios Encontrado = uresultado.stream() + .filter(uresultado::contains) + .filter(cresultado::contains) + .findFirst() + .orElse(null); + + return Optional.ofNullable(Encontrado); + } else { + // Devuelve Optional vacío para indicar ausencia de resultados + return Optional.empty(); + } + + + } + } diff --git a/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/msg/Mensaje.java b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/msg/Mensaje.java index 82c669e..053898a 100644 --- a/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/msg/Mensaje.java +++ b/Inventario-ejb/src/java/mx/edu/tjs/chapala/sistemas/msg/Mensaje.java @@ -13,5 +13,6 @@ public enum Mensaje { CAMPOS_INCOMPLETOS, DATOS_INCORRECTOS, ELEMENTO_DUPLICADO, - ELEMENTO_NO_ENCONTRADO + ELEMENTO_NO_ENCONTRADO, + NO_EXISTE } diff --git a/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/AutorizacionListener.java b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/AutorizacionListener.java index 95c9db8..0afa5bd 100644 --- a/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/AutorizacionListener.java +++ b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/AutorizacionListener.java @@ -29,6 +29,7 @@ public class AutorizacionListener implements PhaseListener{ } private static final long serialVersionUID = 1L; + DemoBeanLogin loin=new DemoBeanLogin(); @Override public void afterPhase(PhaseEvent event) { @@ -37,11 +38,11 @@ public class AutorizacionListener implements PhaseListener{ String paginaActual = event.getFacesContext().getViewRoot().getViewId(); //inicializar la sesion en caso de no haber sesion - Login.getSesion(); + loin.getSession(); //Revisar que no sea la pafina index y que no estes logueado //para redireccionar - if (!paginaActual.contains("index.xhtml") && Login.getEstatus() == false) { + if (!paginaActual.contains("index.xhtml") && loin.getEstatus() == false) { FacesContext.getCurrentInstance().getExternalContext().redirect("faces/index.xhtml?faces-redirect=true"); NavigationHandler nh = event.getFacesContext().getApplication().getNavigationHandler(); diff --git a/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/DemoBeanLogin.java b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/DemoBeanLogin.java new file mode 100644 index 0000000..720824e --- /dev/null +++ b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/DemoBeanLogin.java @@ -0,0 +1,108 @@ +/* + * 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.tjs.chapala.sistemas.seguridad; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import javax.ejb.EJB; +import javax.faces.context.FacesContext; +import javax.servlet.http.HttpSession; +import mx.edu.tjs.chapala.sistemas.bl.LoginBLLocal; +import mx.edu.tjs.chapala.sistemas.modelo.Usuarios; +import mx.edu.tjs.chapala.sistemas.msg.Mensaje; + +/** + * + * @author Ely + */ +@Named(value = "demoBeanLogin") +@SessionScoped +public class DemoBeanLogin implements Serializable { + + @EJB + private LoginBLLocal loginBL; + + + + //variable para manejar la sesion + public static HttpSession httpSession; + + /** + * Creates a new instance of DemoBeanLogin + */ + public DemoBeanLogin() { + } + + private Usuarios usuarios = new Usuarios(); + + private String user; + private static String http = "buenosdias"; + + public Usuarios getUsuarios() { + return usuarios; + } + + public void setUsuarios(Usuarios usuarios) { + this.usuarios = usuarios; + } + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public void getSession() { + httpSession = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false); + } + + public String logout() { + //quitar atributo + //invalidar la session + httpSession.removeAttribute(http); + httpSession.invalidate(); + return "index.xhtml"; + } + + public String login() { + //BL de autenticacion de usuario + //poner atributo + + Mensaje mensaje = loginBL.login(usuarios); + + switch (mensaje) { + case SIN_ERROR: + user = usuarios.getUsuario(); + System.out.println(user); + + httpSession.setAttribute(http, "true"); + usuarios = new Usuarios(); + return "ProductoLista.xhtml"; + case ELEMENTO_DUPLICADO: + return null;//"productoLista?faces-redirect=true"; // Redirecciona a la lista de productos + case CAMPOS_INCOMPLETOS: + return null; + case DATOS_INCORRECTOS: + return null; + default: + return null; + } + } + + public boolean getEstatus() { + if (httpSession != null + && httpSession.getId() != null + && !httpSession.getId().isEmpty() + && httpSession.getAttribute("buenosdias") != null) { + return true; + } else { + return false; + } + } + +} diff --git a/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/Login.java b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/Login.java deleted file mode 100644 index d859cb3..0000000 --- a/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/seguridad/Login.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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.tjs.chapala.sistemas.seguridad; - -import javax.inject.Named; -import javax.enterprise.context.SessionScoped; -import java.io.Serializable; -import javax.ejb.EJB; -import javax.faces.context.FacesContext; -import javax.servlet.http.HttpSession; -import mx.edu.tjs.chapala.sistemas.bl.UsuariosBLLocal; -import mx.edu.tjs.chapala.sistemas.modelo.Usuarios; -import mx.edu.tjs.chapala.sistemas.msg.Mensaje; -import static mx.edu.tjs.chapala.sistemas.msg.Mensaje.ELEMENTO_DUPLICADO; -import static mx.edu.tjs.chapala.sistemas.msg.Mensaje.SIN_ERROR; - -/** - * - * @author 52332 - */ -@Named(value = "login") -@SessionScoped - -public class Login implements Serializable { - - @EJB - private UsuariosBLLocal usuariosBL; - private Usuarios usuarios= new Usuarios(); - - -private static HttpSession httpSession; - - /** - * Creates a new instance of Login - */ - public Login() { - } - - public static void getSesion(){ - httpSession=(HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false); - } - - - //metodo para salir - - public String logout(){ - httpSession.removeAttribute("sesionActiva"); - httpSession.invalidate(); - return "index.xhtml"; - } - - public String login() { - //llamar bl para autenticacion que regresa un boolean - //todo:hacer un metodo en el bl que reciba el usuario y passMensaje mensaje = usuariosBL.loginValidar(usuarios); - Mensaje mensaje = usuariosBL.loginValidar(usuarios); - boolean login=true; - switch (mensaje) { - case SIN_ERROR: - usuarios = new Usuarios(); - return null; - case ELEMENTO_DUPLICADO: - - if(login){ - httpSession.setAttribute("sesionActiva","true"); - return "ProductoLista.xhtml"; - }else{ - return "index.xhtml"; - } - - default: - return null; - - } - - - } - - - 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/tjs/chapala/sistemas/vista/DemoBeanRol.java b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/vista/DemoBeanRol.java new file mode 100644 index 0000000..f4d549a --- /dev/null +++ b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/vista/DemoBeanRol.java @@ -0,0 +1,143 @@ +/* + * 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.tjs.chapala.sistemas.vista; + +import javax.inject.Named; +import javax.enterprise.context.SessionScoped; +import java.io.Serializable; +import java.util.List; +import java.util.Locale; +import javax.ejb.EJB; +import mx.edu.tjs.chapala.sistemas.bl.RolBLLocal; +import mx.edu.tjs.chapala.sistemas.modelo.Rol; +import mx.edu.tjs.chapala.sistemas.modelo.Usuarios; +import mx.edu.tjs.chapala.sistemas.msg.Mensaje; +import static mx.edu.tjs.chapala.sistemas.msg.Mensaje.ELEMENTO_DUPLICADO; +import static mx.edu.tjs.chapala.sistemas.msg.Mensaje.SIN_ERROR; +import org.primefaces.PrimeFaces; +import org.primefaces.util.LangUtils; + +/** + * + * @author Ely + */ +@Named(value = "demoBeanRol") +@SessionScoped +public class DemoBeanRol implements Serializable { + + + + @EJB + private RolBLLocal rolBL; + private Rol rol= new Rol(); + private String titulo; + private boolean nuevo; + private List filteredCustomers3; + + public String getTitulo() { + return titulo; + } + + + + + /** + * Creates a new instance of DemoBeanRol + */ + public DemoBeanRol() { + } + + public String agregar() { + Mensaje mensaje =rolBL.agregar(rol); + switch(mensaje){ + case SIN_ERROR: + rol.setStatus(1); + rol = new Rol(); + PrimeFaces.current().executeScript("PF('dlg'.hide()"); + PrimeFaces.current().ajax().update("formtabla:growl"); + return "rolLista.xhtml"; + case ELEMENTO_DUPLICADO: + return null; + + default: + return null; + + } + } + + public String editar() { + Mensaje mensaje =rolBL.agregar(rol); + switch(mensaje){ + case SIN_ERROR: + rol =new Rol(); + PrimeFaces.current().executeScript("PF('dlg'.hide()"); + PrimeFaces.current().ajax().update("formtabla:growl"); + return "rolLista.xhtml"; + case ELEMENTO_DUPLICADO: + return null; + + default: + return null; + } + } + + public String eliminar() { + rolBL.eliminarId(rol); + PrimeFaces.current().executeScript("PF('dlg2'.hide()"); + PrimeFaces.current().ajax().update("formtabla:growl"); + + return "rolLista.xhtml"; + } + + public ListgetAll(){ + return rolBL.buscarStatus(true); + } + + public Rol getRol(){ + return rol; + } + public void setRol(Rol rol){ + this.rol= rol; + } + + public boolean isNuevo() { + return nuevo; + } + public void prepararEditar(Rol rol){ + nuevo =false; + titulo="E D I T A R"; + this.rol=rol; + } + + public void prepararNuevo(){ + nuevo =true; + titulo="A G R E G A R"; + rol= new Rol(); + } + public void prepararEliminar(Rol rol){ + this.rol=rol; + } + + public List getFilteredCustomers3() { + return filteredCustomers3; + } + + public void setFilteredCustomers3(List filteredCustomers3) { + this.filteredCustomers3 = filteredCustomers3; + } + + + public boolean globalFilterFunction(Object value, Object filter, Locale locale) { + String filterText = (filter == null) ? null : filter.toString().trim().toLowerCase(); + if (LangUtils.isBlank(filterText)) { + return true; + } + + + Rol customer = (Rol) value; + return customer.getRol().toLowerCase().contains(filterText); + } + +} diff --git a/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/vista/DemoBeanUsuarios.java b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/vista/DemoBeanUsuarios.java index fd82503..d449e04 100644 --- a/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/vista/DemoBeanUsuarios.java +++ b/Inventario-war/src/java/mx/edu/tjs/chapala/sistemas/vista/DemoBeanUsuarios.java @@ -81,6 +81,8 @@ public class DemoBeanUsuarios implements Serializable { public String eliminar() { usuariosBL.eliminarId(usuarios); + PrimeFaces.current().executeScript("PF('dlg2'.hide()"); + PrimeFaces.current().ajax().update("formtabla:growl"); return "usuariosLista.xhtml"; } @@ -132,13 +134,13 @@ public class DemoBeanUsuarios implements Serializable { } public void prepararEditar(Usuarios usuarios){ nuevo =false; - titulo="Editando Usuario"; + titulo="E D I T A R"; this.usuarios=usuarios; } public void prepararNuevo(){ nuevo =true; - titulo="Agregando Usuario"; + titulo="A G R E G A R"; usuarios= new Usuarios(); } public void prepararEliminar(Usuarios usuarios){ diff --git a/Inventario-war/web/index.xhtml b/Inventario-war/web/index.xhtml index a4b5299..f021d12 100644 --- a/Inventario-war/web/index.xhtml +++ b/Inventario-war/web/index.xhtml @@ -9,30 +9,48 @@
-
- +
+
- -
- - - - - - - - - - - - - -
-
-
-
+ +
+ + + + + + + + + + + + + +
+
+ + - + diff --git a/Inventario-war/web/rolLista.xhtml b/Inventario-war/web/rolLista.xhtml index 35690c0..919feb0 100644 --- a/Inventario-war/web/rolLista.xhtml +++ b/Inventario-war/web/rolLista.xhtml @@ -11,7 +11,7 @@ -

R O L

+

R O L E S

@@ -45,14 +45,14 @@
- - +
@@ -66,7 +66,7 @@ - + @@ -92,11 +92,10 @@ - + -

-

- +

+

@@ -105,7 +104,7 @@ - -

-

+

+

diff --git a/Inventario-war/web/usuariosLista.xhtml b/Inventario-war/web/usuariosLista.xhtml index 7eb997c..630f340 100644 --- a/Inventario-war/web/usuariosLista.xhtml +++ b/Inventario-war/web/usuariosLista.xhtml @@ -52,7 +52,7 @@ - +
@@ -60,57 +60,57 @@ - + - + - + - + - + - + - + - + - + - + - + -

-

+

+

- + @@ -163,7 +163,7 @@ - + @@ -171,12 +171,12 @@ - - + + - + @@ -184,7 +184,7 @@ - + @@ -195,32 +195,32 @@ - - + + - - + + - - + + - - + + - - + + @@ -230,7 +230,7 @@ - + @@ -246,32 +246,29 @@ - - - - - -
- + -

-

+

+

- + @@ -283,13 +280,13 @@ - + - + @@ -307,33 +304,33 @@ - +
- - - -
+ + + +
- + -

-

+

+

- + @@ -345,13 +342,13 @@ - + - + @@ -371,13 +368,11 @@ - + -
-
- + +
diff --git a/nbproject/project.properties b/nbproject/project.properties index 971c6f5..094c366 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,41 +1,41 @@ -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 -run.classpath= -source.root=. +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 +run.classpath= +source.root=.