Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4aeec0c31b | ||
|
|
b815680649 | ||
|
|
992fc3e25a | ||
|
|
ed78633291 | ||
|
|
c8a3f1e933 | ||
|
|
02ea97195f | ||
|
|
ebc33396c7 | ||
|
|
2dc7c9b8b7 | ||
|
|
83e3fb9867 | ||
|
|
a83b273955 | ||
|
|
310aae76ef | ||
|
|
06114b7e2f | ||
|
|
952417c6ce | ||
|
|
1dff9b09e8 | ||
|
|
aeb1d300a4 | ||
|
|
66a00616e5 | ||
|
|
318680d5c0 | ||
|
|
8482b660c1 | ||
|
|
e789cb57d2 | ||
|
|
ffe56f3c68 | ||
|
|
b2e55231ea | ||
|
|
1e3886cc54 | ||
|
|
492ddad057 | ||
|
|
7891777ecf | ||
|
|
01f0f5627f | ||
|
|
25a4896426 |
@@ -14,7 +14,7 @@ ci_build:
|
||||
script:
|
||||
- cd 1.sources/MyHealth
|
||||
- ant clean
|
||||
- ant all
|
||||
- ant ear
|
||||
|
||||
ci_test:
|
||||
stage: test
|
||||
@@ -25,10 +25,13 @@ ci_test:
|
||||
deploy_pre:
|
||||
stage: deploy
|
||||
script:
|
||||
- echo "Eliminamos archivo ear anterior..."
|
||||
- rm -f $JBOSS_HOME/standalone/deployments/MyHealth.*
|
||||
- echo "Despliegue al servidor de PRE"
|
||||
- cd 1.sources/MyHealth
|
||||
- ant deployear
|
||||
|
||||
|
||||
environment:
|
||||
name: pre
|
||||
url: https://localhost:8080/MyHealth
|
||||
@@ -38,6 +41,8 @@ deploy_pre:
|
||||
deploy_pro:
|
||||
stage: deploy
|
||||
script:
|
||||
- echo "Eliminamos archivo ear anterior..."
|
||||
- rm -f $JBOSS_HOME/standalone/deployments/MyHealth.*
|
||||
- echo "Despliegue al servidor de PRO"
|
||||
- cd 1.sources/MyHealth
|
||||
- ant deployear
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd" version="2.3">
|
||||
|
||||
<factory>
|
||||
<exception-handler-factory>org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory</exception-handler-factory>
|
||||
</factory>
|
||||
</faces-config>
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
|
||||
<param-value>client</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
|
||||
<param-value>.xhtml</param-value>
|
||||
@@ -27,8 +30,6 @@
|
||||
<param-name>primefaces.FONT_AWESOME</param-name>
|
||||
<param-value>true</param-value>
|
||||
</context-param>
|
||||
|
||||
|
||||
<context-param>
|
||||
<param-name>primefaces.THEME</param-name>
|
||||
<param-value>#{sessionPreferences.currentTheme}</param-value>
|
||||
@@ -42,36 +43,59 @@
|
||||
</servlet>
|
||||
|
||||
<!-- Map these files with JSF -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>/faces/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.jsf</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.faces</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.xhtml</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- Filters -->
|
||||
<filter>
|
||||
<filter-name>facesExceptionFilter</filter-name>
|
||||
<filter-class>org.omnifaces.filter.FacesExceptionFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<!-- Filter mappings -->
|
||||
<filter-mapping>
|
||||
<filter-name>facesExceptionFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<!-- Error pages mapping -->
|
||||
<error-page>
|
||||
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
|
||||
<location>/error.xhtml?type=expired</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<exception-type>java.sql.SQLException</exception-type>
|
||||
<exception-type>org.hibernate.exception.GenericJDBCException</exception-type>
|
||||
<exception-type>java.net.ConnectException</exception-type>
|
||||
<exception-type>javax.persistence.PersistenceException</exception-type>
|
||||
<location>/error.xhtml?type=sql</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<exception-type>javax.persistence.PersistenceException</exception-type>
|
||||
<location>/error.xhtml?type=runtime</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<exception-type>java.net.ConnectException</exception-type>
|
||||
<location>/error.xhtml?type=sql</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<error-code>500</error-code>
|
||||
<location>/error.xhtml</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<error-code>401</error-code>
|
||||
<location>/error.xhtml?type=expired</location>
|
||||
</error-page>
|
||||
|
||||
<session-config>
|
||||
<session-timeout>30</session-timeout>
|
||||
|
||||
</session-config>
|
||||
|
||||
<!-- The Welcome File List -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>home.xhtml</welcome-file>
|
||||
<welcome-file>/home.xhtml</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">
|
||||
|
||||
<ui:composition template="./header.xhtml">
|
||||
<ui:define name="content">
|
||||
@@ -12,16 +12,23 @@
|
||||
<div class="ui-g-8 ui-md-8">
|
||||
<p:panel id="ErrorPanel">
|
||||
<f:facet name="header">
|
||||
<p:outputLabel value="Se ha producido un error de autorización" rendered="#{param.type == 'auth'}" />
|
||||
<p:outputLabel value="Se ha producido un error desconocido" rendered="#{param.type == null}" />
|
||||
<p:outputLabel rendered="#{param.type == 'sql'}" value="No se puede conectar con la base de datos" />
|
||||
<p:outputLabel rendered="#{param.type == 'auth'}" value="Se ha producido un error de autorización" />
|
||||
<p:outputLabel rendered="#{param.type == 'expired'}" value="Su sesión ha caducado" />
|
||||
<p:outputLabel rendered="#{param.type == 'runtime'}" value="Se producido un error en tiempo de ejecución" />
|
||||
<p:outputLabel rendered="#{param.type == '' or param.type == null}" value="Se ha producido un error desconocido" />
|
||||
</f:facet>
|
||||
<div class="ui-g ui-fluid">
|
||||
<div class="ui-g-12">La acción que estaba realizando a causado un error inesperado en el sistema. A continuación podrá ver un descripción detallada del error para que
|
||||
pueda comunicarlo al equipo de soporte.</div>
|
||||
|
||||
<div class="ui-g-12" style="font-weight: bold;">
|
||||
<!-- <p:outputLabel value="No está autorizado a acceder a la página solicitada. Por favor, utilice el menú principal de la aplicación." rendered="#{param.type == 'auth'}" /> -->
|
||||
<!-- <p:outputLabel value="Se ha producido un error desconocido. Si vuelve a repetirse, por favor, contacte con el equipo de soporte." rendered="#{param.type == null}" /> -->
|
||||
<div class="ui-g-12">
|
||||
<p:outputLabel rendered="#{param.type == 'sql'}"
|
||||
value="No ha sido posible realizar una conexión con el servidor de base de datos subyante, o ha ocurrido un error grave cuando se intentaba realizar la conexión. Por favor contacte con el equipo de soporte." />
|
||||
<p:outputLabel rendered="#{param.type == 'auth'}"
|
||||
value="No está autorizado a ver la url consultada. Por favor, vaya a la página principal y utilice el menú de la aplicación para acceder las funcionalidades disponibles." />
|
||||
<p:outputLabel rendered="#{param.type == 'expired'}" value="Su sesión ha caducado. Por favor, incie sesión de nuevo en el sistema." />
|
||||
<p:outputLabel rendered="#{param.type == 'runtime'}"
|
||||
value="Se ha producido un error en el servidor durante la ejecución de la última acción. Por favor, intentelo de nuevo o contacte con el equipo de soporte." />
|
||||
<p:outputLabel rendered="#{param.type == '' or param.type == null}"
|
||||
value="La acción que estaba realizando a causado un error inesperado en el sistema. A continuación podrá ver un descripción detallada del error para que pueda comunicarlo al equipo de soporte." />
|
||||
</div>
|
||||
|
||||
<div class="ui-g-12">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">
|
||||
|
||||
<h:head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
@@ -25,23 +25,24 @@
|
||||
function startLogin() {
|
||||
PF('btnLogin').disable();
|
||||
}
|
||||
|
||||
function onAjaxError() {
|
||||
alert('Ajax error');
|
||||
}
|
||||
</h:outputScript>
|
||||
<h:body>
|
||||
<p:growl id="messages" globalOnly="true" sticky="false" showDetail="true" life="15000" />
|
||||
<div id="layout">
|
||||
<div id="top" class="top">
|
||||
<p:growl id="messages" globalOnly="true" sticky="false" showDetail="true" life="15000" />
|
||||
<h:graphicImage library="images" name="logo-small.png" />
|
||||
</div>
|
||||
<hr />
|
||||
<div id="menuDiv">
|
||||
<p:ajaxStatus style="width:32px; height:32px; position:fixed; right:32px; bottom:32px">
|
||||
<div id="menuDiv" style="margin-bottom: 10px;">
|
||||
<p:ajaxStatus style="width:32px; height:32px; position:fixed; right:32px; bottom:32px" onerror="onAjaxError()">
|
||||
<f:facet name="start">
|
||||
<i id="loginSpin" class="pi pi-spin pi-spinner" style="font-size: 3em"></i>
|
||||
</f:facet>
|
||||
|
||||
<f:facet name="complete">
|
||||
<h:outputText value="" />
|
||||
</f:facet>
|
||||
<f:facet name="error">Error!</f:facet>
|
||||
</p:ajaxStatus>
|
||||
|
||||
<h:form id="frmLogin">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">
|
||||
<f:metadata>
|
||||
<f:viewParam name="refresh" value="#{home.refresh}" />
|
||||
</f:metadata>
|
||||
@@ -10,7 +10,7 @@
|
||||
<ui:composition template="./header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form>
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:growl id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:panel header="Pagina principal">
|
||||
<div class="ui-g ui-fluid">
|
||||
<div class="ui-g-2 ui-md-2">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:p="http://primefaces.org/ui">
|
||||
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">
|
||||
|
||||
<h:head>
|
||||
<title>login</title>
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<h:form>
|
||||
<p:growl id="messages" />
|
||||
|
||||
<p:menubar>
|
||||
<p:submenu label="File" icon="pi pi-file">
|
||||
<p:submenu label="New" icon="pi pi-briefcase">
|
||||
<p:menuitem value="Project" url="#" />
|
||||
<p:menuitem value="Other" url="#" />
|
||||
</p:submenu>
|
||||
<p:menuitem value="Open" url="#" />
|
||||
<p:separator />
|
||||
<p:menuitem value="Quit" url="#" />
|
||||
</p:submenu>
|
||||
|
||||
<p:submenu label="Edit" icon="pi pi-pencil">
|
||||
<p:menuitem value="Undo" url="#" icon="pi pi-angle-double-left" />
|
||||
<p:menuitem value="Redo" url="#" icon="pi pi-angle-double-right" />
|
||||
</p:submenu>
|
||||
|
||||
<p:submenu label="Help" icon="pi pi-question">
|
||||
<p:menuitem value="Contents" url="#" />
|
||||
<p:submenu label="Search" icon="pi pi-search">
|
||||
<p:submenu label="Text">
|
||||
<p:menuitem value="Workspace" url="#" />
|
||||
</p:submenu>
|
||||
<p:menuitem value="File" url="#" />
|
||||
</p:submenu>
|
||||
</p:submenu>
|
||||
|
||||
<p:submenu label="Actions" icon="pi pi-cog">
|
||||
<p:submenu label="Ajax" icon="pi pi-refresh">
|
||||
<p:menuitem value="Save" action="#{menuView.save}" icon="pi pi-save"
|
||||
update="messages" />
|
||||
<p:menuitem value="Update" action="#{menuView.update}"
|
||||
icon="pi pi-refresh" update="messages" />
|
||||
</p:submenu>
|
||||
<p:submenu label="Non-Ajax" icon="pi pi-clone">
|
||||
<p:menuitem value="Delete" action="#{menuView.delete}"
|
||||
icon="pi pi-times" update="messages" ajax="false" />
|
||||
</p:submenu>
|
||||
</p:submenu>
|
||||
|
||||
<p:menuitem value="Quit" url="http://www.primefaces.org"
|
||||
icon="pi pi-times" />
|
||||
|
||||
<f:facet name="options">
|
||||
<p:inputText style="margin:1px 10px 1px 1px;" placeholder="Search" />
|
||||
<p:commandButton type="button" value="Logout" icon="pi pi-home" />
|
||||
</f:facet>
|
||||
</p:menubar>
|
||||
</h:form>
|
||||
@@ -7,7 +7,7 @@
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form id="frmChangeFD">
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:growl id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:panel id="badProfile" rendered="#{not home.patient}">
|
||||
<div class="ui-g-3 ui-md-3" />
|
||||
<div class="ui-g-6 ui-md-6">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form id="frmChangePHCC">
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:growl id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:panel id="badProfile" rendered="#{not home.familyDoctor}">
|
||||
<div class="ui-g-3 ui-md-3" />
|
||||
<div class="ui-g-6 ui-md-6">
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
}
|
||||
</h:outputScript>
|
||||
<p:messages id="mesgs" globalOnly="true" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:growl id="mesgs" globalOnly="true" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:panel id="tipoUsuario" header="Especifique el tipo de usuario que desea registrarse">
|
||||
<div class="ui-g ui-fluid">
|
||||
<div class="ui-g-2 ui-md-2">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
}
|
||||
</h:outputScript>
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:growl id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
|
||||
<p:panel id="tipoUsuario" header="Tipo de usuario registrado">
|
||||
<div class="ui-g ui-fluid">
|
||||
|
||||
@@ -11,6 +11,11 @@ BODY {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
ul.ui-menu-child {
|
||||
white-space: nowrap;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.green-button.ui-button.ui-state-default {
|
||||
background-color: #5cb85c;
|
||||
border-color: #5cb85c;
|
||||
|
||||
@@ -7,24 +7,58 @@
|
||||
<ui:composition template="../header.xhtml">
|
||||
<ui:define name="content">
|
||||
<h:form id="frmManageSpecialties">
|
||||
<p:messages id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:panel id="PanelMS" header="Página Gestión de Especialidades">
|
||||
<p:growl id="mesgs" showDetail="true" closable="true" autoupdate="true" />
|
||||
<p:panel id="PanelMS" header="Modificación y borrado de especialidades">
|
||||
<div class="ui-g ui-fluid">
|
||||
<div class="ui-g-2 ui-md-2">
|
||||
<p:autoComplete id="specialty" dropdown="true" required="true"
|
||||
value="#{SystemAdmin.medicalSpecialty}" completeMethod="#{SystemAdmin.completeMedicalSpecialty}" var="ms"
|
||||
placeholder="----- Selecciona una especialidad -----" itemLabel="#{ms.name}" itemValue="#{ms.name}" forceSelection="true">
|
||||
<o:converter converterId="omnifaces.ListConverter" list="#{RegisterUser.medicalSpecialtiesList}" />
|
||||
<p:column>
|
||||
<h:outputText value="#{ms.name}" />
|
||||
</p:column>
|
||||
</p:autoComplete>
|
||||
<p:outputLabel for="ms"/>
|
||||
<p:selectOneMenu id="ms" value="#{ManageSpecialities.medicalSpecialty}" converter="omnifaces.SelectItemsIndexConverter"
|
||||
effect="fold" editable="true" filter="true" filterMatchMode="startsWith"
|
||||
placeholder="- Selecciona una especialidad -">
|
||||
<f:selectItems value="#{ManageSpecialities.medicalSpecialtiesList}" var="ms" itemValue="#{ms}" itemLabel="#{ms.name}" />
|
||||
<f:ajax render="name description" />
|
||||
</p:selectOneMenu>
|
||||
</div>
|
||||
<div class="ui-g-1 ui-md-1" >
|
||||
<p:outputLabel value="Nombre: " for="name"/>
|
||||
</div>
|
||||
<div class="ui-g-2 ui-md-2">
|
||||
<p:inputText id="name" value="#{ManageSpecialities.medicalSpecialty.name}" readonly="false" required="true" requiredMessage="Es necesario un nombre" />
|
||||
</div>
|
||||
<div class="ui-g-1 ui-md-1">
|
||||
<p:outputLabel value="Descripción: " for="description" />
|
||||
</div>
|
||||
<div class="ui-g-4 ui-md-4">
|
||||
<p:message for="specialty" />
|
||||
<p:inputText id="description" value="#{ManageSpecialities.medicalSpecialty.description}" readonly="false" required="true" requiredMessage="Es necesaria una descripción" />
|
||||
</div>
|
||||
</div>
|
||||
</p:panel>
|
||||
<div class="ui-g-1 ui-md-1 ">
|
||||
<p:commandButton validateClient="true" value="Guardar" update="mesgs" action="#{ManageSpecialities.saveData}" icon="pi pi-save" />
|
||||
</div>
|
||||
<div class="ui-g-1 ui-md-1 ">
|
||||
<p:commandButton validateClient="true" value="Borrar" update="mesgs" action="#{ManageSpecialities.deleteData}" icon="fa fa-remove" />
|
||||
</div>
|
||||
</div>
|
||||
</p:panel>
|
||||
|
||||
<p:panel id="PanelNewMS" header="Alta de especialidades">
|
||||
<div class="ui-g ui-fluid">
|
||||
<div class="ui-g-1 ui-md-1" >
|
||||
<p:outputLabel value="Nombre: " for="nameNew"/>
|
||||
</div>
|
||||
<div class="ui-g-2 ui-md-2">
|
||||
<p:inputText id="nameNew" value="#{ManageSpecialities.name}" readonly="false" required="ManageSpecialities.medicalSpecialty.name eq null" requiredMessage="Es necesario un nombre" />
|
||||
</div>
|
||||
<div class="ui-g-1 ui-md-1">
|
||||
<p:outputLabel value="Descripción: " for="descriptionNew" />
|
||||
</div>
|
||||
<div class="ui-g-6 ui-md-6">
|
||||
<p:inputText id="descriptionNew" value="#{ManageSpecialities.description}" readonly="false" required="ManageSpecialities.medicalSpecialty.description eq null" requiredMessage="Es necesaria una descripción" />
|
||||
</div>
|
||||
<div class="ui-g-2 ui-md-2 ">
|
||||
<p:commandButton validateClient="true" value="Crear" update="mesgs" action="#{ManageSpecialities.insertData}" icon="pi pi-check" />
|
||||
</div>
|
||||
</div>
|
||||
</p:panel>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
||||
@@ -9,7 +9,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@XmlRootElement(name = "medicalspeciality")
|
||||
@XmlRootElement(name = "medicalSpecialty")
|
||||
public class MedicalSpecialtyTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package common;
|
||||
|
||||
import java.text.Normalizer;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -13,7 +14,16 @@ public class Utils {
|
||||
}
|
||||
|
||||
public static String normalizeTerm(String input) {
|
||||
//return stripAccents(input).toLowerCase();
|
||||
// return stripAccents(input).toLowerCase();
|
||||
return input.toLowerCase();
|
||||
}
|
||||
|
||||
public static Throwable getExceptionRootCause(Throwable throwable) {
|
||||
Objects.requireNonNull(throwable);
|
||||
Throwable rootCause = throwable;
|
||||
while (rootCause.getCause() != null && rootCause.getCause() != rootCause) {
|
||||
rootCause = rootCause.getCause();
|
||||
}
|
||||
return rootCause;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import javax.persistence.PersistenceContext;
|
||||
|
||||
import TO.FamilyDoctorTO;
|
||||
import TO.LoggedUserTO;
|
||||
import TO.MedicalSpecialtyTO;
|
||||
import TO.PatientTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
import common.Constants;
|
||||
@@ -14,6 +15,7 @@ import common.HashUtils;
|
||||
import common.UserType;
|
||||
import ejb.common.CommonFacadeLocal;
|
||||
import jpa.AdministratorJPA;
|
||||
import jpa.MedicalSpecialtyJPA;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -107,4 +109,40 @@ public class SystemAdminFacadeBean implements SystemAdminFacadeRemote {
|
||||
|
||||
return usr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MedicalSpecialtyTO updateSpecialtyData(int id, String name, String description) throws Exception {
|
||||
MedicalSpecialtyJPA ms = entman.find(MedicalSpecialtyJPA.class, id);
|
||||
|
||||
if (ms == null) {
|
||||
throw new Exception("No se pueden actualizar los datos de la especialidad porque no se encuentra en la base de datos ningún registro con id: " + String.valueOf(id));
|
||||
}
|
||||
|
||||
ms.setName(name);
|
||||
ms.setDescription(description);
|
||||
|
||||
entman.persist(ms);
|
||||
|
||||
return this.commonServices.getPOJOforMedicalSpecialtyJPA(ms);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSpecialtyData(int id, String name, String description) throws Exception {
|
||||
MedicalSpecialtyJPA ms = entman.find(MedicalSpecialtyJPA.class, id);
|
||||
|
||||
if (ms == null) {
|
||||
throw new Exception("No se puede borrar la especialidad porque no se encuentra en la base de datos ningún registro con id: " + String.valueOf(id));
|
||||
}
|
||||
|
||||
entman.remove(ms);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MedicalSpecialtyTO insertSpecialtyData(String name, String description) throws Exception {
|
||||
|
||||
MedicalSpecialtyJPA ms = new MedicalSpecialtyJPA(name, description);
|
||||
entman.persist(ms);
|
||||
|
||||
return this.commonServices.getPOJOforMedicalSpecialtyJPA(ms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
package ejb.systemAdmin;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.ejb.Remote;
|
||||
|
||||
import TO.LoggedUserTO;
|
||||
import TO.MedicalSpecialtyTO;
|
||||
import TO.PrimaryHealthCareCenterTO;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -19,6 +16,11 @@ public interface SystemAdminFacadeRemote {
|
||||
* Definimos la interfaz remota
|
||||
*/
|
||||
|
||||
|
||||
public LoggedUserTO login(String id, String pwd);
|
||||
|
||||
public MedicalSpecialtyTO updateSpecialtyData(int id, String name, String description) throws Exception;
|
||||
|
||||
public void deleteSpecialtyData(int id, String name, String description) throws Exception;
|
||||
|
||||
public MedicalSpecialtyTO insertSpecialtyData(String name, String description) throws Exception;
|
||||
}
|
||||
@@ -2,11 +2,9 @@
|
||||
package managedbean.common;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Dictionary;
|
||||
import java.util.List;
|
||||
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.persistence.PersistenceException;
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
@@ -18,10 +16,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.primefaces.model.menu.DefaultSeparator;
|
||||
import org.primefaces.model.menu.DefaultSubMenu;
|
||||
import org.omnifaces.util.Exceptions;
|
||||
|
||||
import common.UserType;
|
||||
import common.Utils;
|
||||
|
||||
@WebFilter(filterName = "AuthFilter", urlPatterns = { "*.xhtml" })
|
||||
public class AuthorizationFilter implements Filter {
|
||||
@@ -34,25 +32,47 @@ public class AuthorizationFilter implements Filter {
|
||||
|
||||
}
|
||||
|
||||
private boolean isAJAXRequest(HttpServletRequest request) {
|
||||
boolean check = false;
|
||||
String facesRequest = request.getHeader("Faces-Request");
|
||||
if (facesRequest != null && facesRequest.equals("partial/ajax")) {
|
||||
check = true;
|
||||
}
|
||||
return check;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
HttpServletRequest req = null;
|
||||
HttpServletResponse resp = null;
|
||||
HttpSession ses = null;
|
||||
try {
|
||||
|
||||
HttpServletRequest req = (HttpServletRequest) request;
|
||||
HttpServletResponse resp = (HttpServletResponse) response;
|
||||
HttpSession ses = req.getSession(false);
|
||||
|
||||
req = (HttpServletRequest) request;
|
||||
String reqURI = req.getRequestURI();
|
||||
|
||||
// Para recursos publicos permitimos el acceso
|
||||
resp = (HttpServletResponse) response;
|
||||
ses = req.getSession(false);
|
||||
|
||||
// Para recursos publicos permitimos el acceso exista sesión o no.
|
||||
if (reqURI.indexOf("/login.xhtml") >= 0 || reqURI.indexOf("/profile/RegisterUser.xhtml") >= 0 || reqURI.indexOf("/home.xhtml") >= 0
|
||||
|| reqURI.indexOf("/error.xhtml") >= 0 || reqURI.indexOf("/public/") >= 0 || reqURI.contains("javax.faces.resource")) {
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
}
|
||||
|
||||
// Si el usuario está logeado comprobamos si está autorizado a ver la página
|
||||
// solicitada.
|
||||
if (this.isAJAXRequest(req) == true) {
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
}
|
||||
|
||||
// Sesión expirada
|
||||
if (req.isRequestedSessionIdValid() == false && req.getRequestedSessionId() != null) {
|
||||
resp.sendRedirect(req.getContextPath() + "/error.xhtml?type=expired");
|
||||
return;
|
||||
}
|
||||
|
||||
// Si el usuario está logeado comprobamos si está autorizado a ver la página solicitada.
|
||||
if (SessionUtils.isLogedIn(ses) == true) {
|
||||
UserType tipoUsuario = SessionUtils.getUserType(ses);
|
||||
boolean authorized = false;
|
||||
@@ -130,21 +150,29 @@ public class AuthorizationFilter implements Filter {
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
} else {
|
||||
SessionUtils.addMessage(ses, FacesMessage.SEVERITY_ERROR, "No está autorizado a acceder a la página solicitada. Por favor, utilice el menú principal de la aplicación.", String.format("Se ha producido una expción de autorización, su usuario no está autorizado a acceder a la página: (%s).", reqURI));
|
||||
SessionUtils.addMessage(ses, FacesMessage.SEVERITY_ERROR,
|
||||
"No está autorizado a acceder a la página solicitada. Por favor, utilice el menú principal de la aplicación.",
|
||||
String.format("Se ha producido una expción de autorización, su usuario no está autorizado a acceder a la página: (%s).", reqURI));
|
||||
resp.sendRedirect(req.getContextPath() + "/error.xhtml?type=auth");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
resp.sendRedirect(req.getContextPath() + "/login.xhtml");
|
||||
resp.sendRedirect(req.getContextPath() + "/home.xhtml");
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
if (Exceptions.is(e, PersistenceException.class) == true) {
|
||||
if (ses != null)
|
||||
SessionUtils.addMessage(ses, FacesMessage.SEVERITY_ERROR, "Error al intentar acceder a la base de datos", Utils.getExceptionRootCause(e).getLocalizedMessage());
|
||||
|
||||
resp.sendRedirect(req.getContextPath() + "/error.xhtml?type=sql");
|
||||
} else
|
||||
resp.sendRedirect(req.getContextPath() + "/error.xhtml");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
System.out.println("Sessión destruida");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package managedbean.common;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.application.ViewExpiredException;
|
||||
import javax.faces.context.ExternalContext;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
@@ -121,6 +124,24 @@ public class ManagedBeanBase {
|
||||
}
|
||||
|
||||
protected void manageException(Exception ex) {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Se ha producido un error inesperado", "Descripción del error: " + ex.getLocalizedMessage());
|
||||
String strType = "";
|
||||
|
||||
if (ex.getClass().equals(ViewExpiredException.class)) {
|
||||
// Sessión expired
|
||||
strType = "expired";
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Su sesión ha caducado", "Su sesión ha caducado, vuelva a logarse en el sistema.");
|
||||
} else {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Se ha producido un error inesperado", "Descripción del error: " + ex.getLocalizedMessage());
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext();
|
||||
|
||||
ctx.redirect(ctx.getApplicationContextPath() + "/error.xhtml?type=" + strType);
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,9 @@ public class ValidationUtils {
|
||||
public static boolean checkIfNifAlreadyRegistered(CommonFacadeRemote remoteSvc, UserType userType, String nif, Integer id) {
|
||||
boolean nifExists = false;
|
||||
|
||||
if (userType == null || remoteSvc == null)
|
||||
return nifExists;
|
||||
|
||||
switch (userType) {
|
||||
case ADMINISTRATOR:
|
||||
break;
|
||||
|
||||
@@ -257,6 +257,11 @@ public class UpdateProfileMBean extends ManagedBeanBase implements Serializable
|
||||
|
||||
public void saveData() {
|
||||
int error = 0;
|
||||
|
||||
// Si no hay tipo de usuario, es que algo raro ha pasado (sesión caducada?). salimos.
|
||||
if (this.userType == null)
|
||||
return;
|
||||
|
||||
boolean changePassword = (this.oldPassword != null && this.oldPassword.equals("") == false) || (this.password != null && this.password.equals("") == false);
|
||||
|
||||
if (this.isUserTypeFamilyDoctor() && this.primaryHealthCareCenter == null) {
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
package managedbean.systemAdmin;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.inject.Named;
|
||||
|
||||
import TO.LoggedUserTO;
|
||||
import TO.MedicalSpecialtyTO;
|
||||
import common.Constants;
|
||||
import managedbean.common.ManagedBeanBase;
|
||||
import managedbean.common.SessionUtils;
|
||||
|
||||
@Named("ManageSpecialities")
|
||||
@RequestScoped
|
||||
public class ManageSpecialitiesMBean extends ManagedBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String description;
|
||||
private MedicalSpecialtyTO medicalSpecialty;
|
||||
private List<MedicalSpecialtyTO> medicalSpecialitiesList;
|
||||
|
||||
public ManageSpecialitiesMBean() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
if (this.medicalSpecialty == null) {
|
||||
this.medicalSpecialty = new MedicalSpecialtyTO();
|
||||
}
|
||||
// Recuperamos el usuario logeado actual
|
||||
LoggedUserTO usr = null;
|
||||
try {
|
||||
usr = SessionUtils.getloggedOnUser();
|
||||
|
||||
if (usr == null)
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Sesión no válida",
|
||||
"Su sesión actual no es válida, por favor cierre su sesión y vuelva a logearse en el sistema.");
|
||||
else {
|
||||
this.medicalSpecialitiesList = this.getRemoteManagerCommon().listMedicalSpecialitiesPaged(0, Constants.MAX_ITEMS_AUTOCOMPLETE_SEARCH);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.manageException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
private void setSpecialtyData(MedicalSpecialtyTO ms) {
|
||||
this.id = ms.getId();
|
||||
this.name = ms.getName();
|
||||
this.description = ms.getDescription();
|
||||
}
|
||||
|
||||
public List<MedicalSpecialtyTO> getMedicalSpecialtiesList() {
|
||||
return medicalSpecialitiesList;
|
||||
}
|
||||
|
||||
public MedicalSpecialtyTO getMedicalSpecialty() {
|
||||
return medicalSpecialty;
|
||||
}
|
||||
|
||||
public void setMedicalSpecialty(MedicalSpecialtyTO value) {
|
||||
this.medicalSpecialty = value;
|
||||
}
|
||||
|
||||
public void saveData() {
|
||||
int error = 0;
|
||||
|
||||
if (this.medicalSpecialty.getName() == null) {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Nombre no relleno", "Por favor, escriba un nombre de especialidad.");
|
||||
error++;
|
||||
}
|
||||
if (this.medicalSpecialty.getDescription() == null) {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Descripción no rellena", "Por favor, escriba una descripción.");
|
||||
error++;
|
||||
}
|
||||
|
||||
if (error == 0) {
|
||||
try {
|
||||
MedicalSpecialtyTO ms = this.getRemoteManagerSystemAdmin().updateSpecialtyData(this.medicalSpecialty.getId(), this.medicalSpecialty.getName(), this.medicalSpecialty.getDescription());
|
||||
this.setSpecialtyData(ms);
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_INFO, "Los datos se han guardado", "Los datos de la especialidad se han guardado correctamente.");
|
||||
} catch (Exception e) {
|
||||
this.manageException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteData() {
|
||||
int error = 0;
|
||||
|
||||
if (this.medicalSpecialty.getName() == null) {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Nombre no relleno", "Por favor, escriba un nombre de especialidad.");
|
||||
error++;
|
||||
}
|
||||
if (this.medicalSpecialty.getDescription() == null) {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Descripción no rellena", "Por favor, escriba una descripción.");
|
||||
error++;
|
||||
}
|
||||
|
||||
if (error == 0) {
|
||||
try {
|
||||
this.getRemoteManagerSystemAdmin().deleteSpecialtyData(this.medicalSpecialty.getId(), this.medicalSpecialty.getName(), this.medicalSpecialty.getDescription());
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_INFO, "Los especialidad se ha borrado", "Los datos de la especialidad se han borrado correctamente.");
|
||||
} catch (Exception e) {
|
||||
this.manageException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void insertData() {
|
||||
int error = 0;
|
||||
|
||||
if (name == null || name.trim().length() == 0) {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Nombre no relleno", "Por favor, escriba un nombre de especialidad.");
|
||||
error++;
|
||||
}
|
||||
if (description == null || description.trim().length() == 0) {
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_WARN, "Descripción no rellena", "Por favor, escriba una descripción.");
|
||||
error++;
|
||||
}
|
||||
|
||||
if (error == 0) {
|
||||
try {
|
||||
MedicalSpecialtyTO ms = this.getRemoteManagerSystemAdmin().insertSpecialtyData(name, description);
|
||||
this.setSpecialtyData(ms);
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_INFO, "Los datos se han guardado", "Los datos de la especialidad se han guardado correctamente.");
|
||||
} catch (Exception e) {
|
||||
this.manageException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package managedbean.systemAdmin;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.inject.Named;
|
||||
|
||||
import TO.LoggedUserTO;
|
||||
import TO.MedicalSpecialtyTO;
|
||||
import common.Constants;
|
||||
import common.UserType;
|
||||
import managedbean.common.ManagedBeanBase;
|
||||
import managedbean.common.SessionUtils;
|
||||
|
||||
@Named("SystemAdmin")
|
||||
@RequestScoped
|
||||
public class SystemAdminMBean extends ManagedBeanBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String lastUIQuery;
|
||||
private MedicalSpecialtyTO medicalSpecialty;
|
||||
private List<MedicalSpecialtyTO> medicalSpecialitiesList;
|
||||
|
||||
public SystemAdminMBean() {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
// Recuperamos el usuario logeado actual
|
||||
LoggedUserTO usr = null;
|
||||
this.lastUIQuery = "";
|
||||
|
||||
try {
|
||||
usr = SessionUtils.getloggedOnUser();
|
||||
|
||||
if (usr == null)
|
||||
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Sesión no válida",
|
||||
"Su sesión actual no es válida, por favor cierre su sesión y vuelva a logearse en el sistema.");
|
||||
else {
|
||||
this.medicalSpecialitiesList = this.getRemoteManagerCommon().listMedicalSpecialitiesPaged(0, Constants.MAX_ITEMS_AUTOCOMPLETE_SEARCH);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.manageException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<MedicalSpecialtyTO> getMedicalSpecialtiesList() {
|
||||
return medicalSpecialitiesList;
|
||||
}
|
||||
|
||||
public List<MedicalSpecialtyTO> completeMedicalSpecialty(String query) {
|
||||
if (query != null && query.equals(this.lastUIQuery) == false) {
|
||||
this.lastUIQuery = query;
|
||||
// Recuperamos las 200 primeras coincidencias
|
||||
this.medicalSpecialitiesList = this.getRemoteManagerCommon().listMedicalSpecialitiesFiltered(query, 0, Constants.MAX_ITEMS_AUTOCOMPLETE_SEARCH);
|
||||
}
|
||||
return this.medicalSpecialitiesList;
|
||||
}
|
||||
|
||||
public MedicalSpecialtyTO getMedicalSpecialty() {
|
||||
return medicalSpecialty;
|
||||
}
|
||||
|
||||
public void setMedicalSpecialty(MedicalSpecialtyTO value) {
|
||||
this.medicalSpecialty = value;
|
||||
}
|
||||
}
|
||||
@@ -81,29 +81,29 @@ INSERT INTO myhealth.patient(personalidentificationcode, password, nif, surname,
|
||||
,('PAT#109','912EC803B2CE49E4A541068D495AB570','53986482P','Carretero Ayala', 'Eduardo@example.ecom','Eduardo', 10);
|
||||
|
||||
INSERT INTO myhealth.question(title, message, status, response, patientid, familydoctorid) VALUES
|
||||
('titulo de la pregunta número 1', 'Doctor, tengo dolor en la articulación numero 1', 1, null, 1, 1)
|
||||
,('titulo de la pregunta número 2', 'Doctor, tengo dolor en la articulación numero 2', 1, null, 2, 1)
|
||||
,('titulo de la pregunta número 3', 'Doctor, tengo dolor en la articulación numero 3', 1, null, 3, 1)
|
||||
,('titulo de la pregunta número 4', 'Doctor, tengo dolor en la articulación numero 4', 1, null, 4, 1)
|
||||
,('titulo de la pregunta número 5', 'Doctor, tengo dolor en la articulación numero 5', 1, null, 5, 1)
|
||||
,('titulo de la pregunta número 6', 'Doctor, tengo dolor en la articulación numero 6', 1, null, 6, 1)
|
||||
,('titulo de la pregunta número 7', 'Doctor, tengo dolor en la articulación numero 7', 1, null, 7, 1)
|
||||
,('titulo de la pregunta número 8', 'Doctor, tengo dolor en la articulación numero 8', 1, null, 8, 1)
|
||||
,('titulo de la pregunta número 9', 'Doctor, tengo dolor en la articulación numero 9', 1, null, 9, 1)
|
||||
,('titulo de la pregunta número 10', 'Doctor, tengo dolor en la articulación numero 10', 1, null, 10, 1)
|
||||
,('titulo de la pregunta número 11', 'Doctor, tengo dolor en la articulación numero 11', 1, null, 1, 1)
|
||||
,('titulo de la pregunta número 12', 'Doctor, tengo dolor en la articulación numero 12', 1, null, 2, 1)
|
||||
,('titulo de la pregunta número 13', 'Doctor, tengo dolor en la articulación numero 13', 1, null, 3, 1)
|
||||
,('titulo de la pregunta número 14', 'Doctor, tengo dolor en la articulación numero 14', 1, null, 4, 1)
|
||||
,('titulo de la pregunta número 15', 'Doctor, tengo dolor en la articulación numero 15', 1, null, 5, 1)
|
||||
,('titulo de la pregunta número 16', 'Doctor, tengo dolor en la articulación numero 16', 1, null, 6, 1)
|
||||
,('titulo de la pregunta número 17', 'Doctor, tengo dolor en la articulación numero 17', 1, null, 7, 1)
|
||||
,('titulo de la pregunta número 18', 'Doctor, tengo dolor en la articulación numero 18', 1, null, 8, 1)
|
||||
,('titulo de la pregunta número 19', 'Doctor, tengo dolor en la articulación numero 19', 1, null, 9, 1)
|
||||
,('titulo de la pregunta número 20', 'Doctor, tengo dolor en la articulación numero 20', 1, null, 10, 1)
|
||||
,('titulo de la pregunta número 21', 'Doctor, tengo dolor en la articulación numero 21', 1, null, 8, 1)
|
||||
,('titulo de la pregunta número 22', 'Doctor, tengo dolor en la articulación numero 22', 1, null, 9, 1)
|
||||
,('titulo de la pregunta número 23', 'Doctor, tengo dolor en la articulación numero 23', 1, null, 10, 1);
|
||||
('titulo de la pregunta número 1', 'Doctor, tengo dolor en la articulación numero 1', 'PENDING', null, 1, 1)
|
||||
,('titulo de la pregunta número 2', 'Doctor, tengo dolor en la articulación numero 2', 'PENDING', null, 2, 1)
|
||||
,('titulo de la pregunta número 3', 'Doctor, tengo dolor en la articulación numero 3', 'PENDING', null, 3, 1)
|
||||
,('titulo de la pregunta número 4', 'Doctor, tengo dolor en la articulación numero 4', 'PENDING', null, 4, 1)
|
||||
,('titulo de la pregunta número 5', 'Doctor, tengo dolor en la articulación numero 5', 'PENDING', null, 5, 1)
|
||||
,('titulo de la pregunta número 6', 'Doctor, tengo dolor en la articulación numero 6', 'PENDING', null, 6, 1)
|
||||
,('titulo de la pregunta número 7', 'Doctor, tengo dolor en la articulación numero 7', 'PENDING', null, 7, 1)
|
||||
,('titulo de la pregunta número 8', 'Doctor, tengo dolor en la articulación numero 8', 'PENDING', null, 8, 1)
|
||||
,('titulo de la pregunta número 9', 'Doctor, tengo dolor en la articulación numero 9', 'PENDING', null, 9, 1)
|
||||
,('titulo de la pregunta número 10', 'Doctor, tengo dolor en la articulación numero 10', 'PENDING', null, 10, 1)
|
||||
,('titulo de la pregunta número 11', 'Doctor, tengo dolor en la articulación numero 11', 'PENDING', null, 1, 1)
|
||||
,('titulo de la pregunta número 12', 'Doctor, tengo dolor en la articulación numero 12', 'PENDING', null, 2, 1)
|
||||
,('titulo de la pregunta número 13', 'Doctor, tengo dolor en la articulación numero 13', 'PENDING', null, 3, 1)
|
||||
,('titulo de la pregunta número 14', 'Doctor, tengo dolor en la articulación numero 14', 'PENDING', null, 4, 1)
|
||||
,('titulo de la pregunta número 15', 'Doctor, tengo dolor en la articulación numero 15', 'PENDING', null, 5, 1)
|
||||
,('titulo de la pregunta número 16', 'Doctor, tengo dolor en la articulación numero 16', 'PENDING', null, 6, 1)
|
||||
,('titulo de la pregunta número 17', 'Doctor, tengo dolor en la articulación numero 17', 'PENDING', null, 7, 1)
|
||||
,('titulo de la pregunta número 18', 'Doctor, tengo dolor en la articulación numero 18', 'PENDING', null, 8, 1)
|
||||
,('titulo de la pregunta número 19', 'Doctor, tengo dolor en la articulación numero 19', 'PENDING', null, 9, 1)
|
||||
,('titulo de la pregunta número 20', 'Doctor, tengo dolor en la articulación numero 20', 'PENDING', null, 10, 1)
|
||||
,('titulo de la pregunta número 21', 'Doctor, tengo dolor en la articulación numero 21', 'PENDING', null, 8, 1)
|
||||
,('titulo de la pregunta número 22', 'Doctor, tengo dolor en la articulación numero 22', 'PENDING', null, 9, 1)
|
||||
,('titulo de la pregunta número 23', 'Doctor, tengo dolor en la articulación numero 23', 'PENDING', null, 10, 1);
|
||||
|
||||
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
#!/usr/bin/expect -f
|
||||
#
|
||||
# This Expect script was generated by autoexpect on Wed Dec 18 17:32:33 2019
|
||||
# Expect and autoexpect were both written by Don Libes, NIST.
|
||||
#
|
||||
# Note that autoexpect does not guarantee a working script. It
|
||||
# necessarily has to guess about certain things. Two reasons a script
|
||||
# might fail are:
|
||||
#
|
||||
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
|
||||
# etc.) and devices discard or ignore keystrokes that arrive "too
|
||||
# quickly" after prompts. If you find your new script hanging up at
|
||||
# one spot, try adding a short sleep just before the previous send.
|
||||
# Setting "force_conservative" to 1 (see below) makes Expect do this
|
||||
# automatically - pausing briefly before sending each character. This
|
||||
# pacifies every program I know of. The -c flag makes the script do
|
||||
# this in the first place. The -C flag allows you to define a
|
||||
# character to toggle this mode off and on.
|
||||
|
||||
set force_conservative 0 ;# set to 1 to force conservative mode even if
|
||||
;# script wasn't run conservatively originally
|
||||
if {$force_conservative} {
|
||||
set send_slow {1 .1}
|
||||
proc send {ignore arg} {
|
||||
sleep .1
|
||||
exp_send -s -- $arg
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# 2) differing output - Some programs produce different output each time
|
||||
# they run. The "date" command is an obvious example. Another is
|
||||
# ftp, if it produces throughput statistics at the end of a file
|
||||
# transfer. If this causes a problem, delete these patterns or replace
|
||||
# them with wildcards. An alternative is to use the -p flag (for
|
||||
# "prompt") which makes Expect only look for the last line of output
|
||||
# (i.e., the prompt). The -P flag allows you to define a character to
|
||||
# toggle this mode off and on.
|
||||
#
|
||||
# Read the man page for more info.
|
||||
#
|
||||
# -Don
|
||||
|
||||
|
||||
set timeout -1
|
||||
spawn ./add-user.sh
|
||||
match_max 100000
|
||||
expect -exact "\r
|
||||
What type of user do you wish to add? \r
|
||||
a) Management User (mgmt-users.properties) \r
|
||||
b) Application User (application-users.properties)\r
|
||||
(a): "
|
||||
send -- "b\r"
|
||||
expect -exact "b\r
|
||||
\r
|
||||
Enter the details of the new user to add.\r
|
||||
Using realm 'ApplicationRealm' as discovered from the existing property files.\r
|
||||
Username : "
|
||||
send -- "USER\r"
|
||||
expect -exact "USER\r
|
||||
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.\r
|
||||
- The password should be different from the username\r
|
||||
- The password should not be one of the following restricted values {root, admin, administrator}\r
|
||||
- The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)\r
|
||||
Password : "
|
||||
send -- "PASSWORD\r"
|
||||
expect -exact "\r
|
||||
WFLYDM0101: Password should have at least 1 digit.\r
|
||||
Are you sure you want to use the password entered yes/no? "
|
||||
send -- "Y\r"
|
||||
expect -exact "Y\r
|
||||
Re-enter Password : "
|
||||
send -- "PASSWORD\r"
|
||||
expect -exact "\r
|
||||
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)\[ \]: "
|
||||
send -- " User,Trainer,Administrator"
|
||||
expect -exact " User,Trainer,Administrator"
|
||||
send -- "\r"
|
||||
expect -exact "\r
|
||||
About to add user 'USER' for realm 'ApplicationRealm'\r
|
||||
Is this correct yes/no? "
|
||||
send -- "Y\r"
|
||||
expect -exact "Y\r
|
||||
Added user 'USER' to file '/opt/jboss/wildfly/standalone/configuration/application-users.properties'\r
|
||||
Added user 'USER' to file '/opt/jboss/wildfly/domain/configuration/application-users.properties'\r
|
||||
Added user 'USER' with groups User,Trainer,Administrator to file '/opt/jboss/wildfly/standalone/configuration/application-roles.properties'\r
|
||||
Added user 'USER' with groups User,Trainer,Administrator to file '/opt/jboss/wildfly/domain/configuration/application-roles.properties'\r
|
||||
Is this new user going to be used for one AS process to connect to another AS process? \r
|
||||
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.\r
|
||||
yes/no? "
|
||||
send -- "Y\r"
|
||||
expect eof
|
||||
@@ -1,92 +0,0 @@
|
||||
#!/usr/bin/expect -f
|
||||
#
|
||||
# This Expect script was generated by autoexpect on Wed Dec 18 17:37:57 2019
|
||||
# Expect and autoexpect were both written by Don Libes, NIST.
|
||||
#
|
||||
# Note that autoexpect does not guarantee a working script. It
|
||||
# necessarily has to guess about certain things. Two reasons a script
|
||||
# might fail are:
|
||||
#
|
||||
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
|
||||
# etc.) and devices discard or ignore keystrokes that arrive "too
|
||||
# quickly" after prompts. If you find your new script hanging up at
|
||||
# one spot, try adding a short sleep just before the previous send.
|
||||
# Setting "force_conservative" to 1 (see below) makes Expect do this
|
||||
# automatically - pausing briefly before sending each character. This
|
||||
# pacifies every program I know of. The -c flag makes the script do
|
||||
# this in the first place. The -C flag allows you to define a
|
||||
# character to toggle this mode off and on.
|
||||
|
||||
set force_conservative 0 ;# set to 1 to force conservative mode even if
|
||||
;# script wasn't run conservatively originally
|
||||
if {$force_conservative} {
|
||||
set send_slow {1 .1}
|
||||
proc send {ignore arg} {
|
||||
sleep .1
|
||||
exp_send -s -- $arg
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# 2) differing output - Some programs produce different output each time
|
||||
# they run. The "date" command is an obvious example. Another is
|
||||
# ftp, if it produces throughput statistics at the end of a file
|
||||
# transfer. If this causes a problem, delete these patterns or replace
|
||||
# them with wildcards. An alternative is to use the -p flag (for
|
||||
# "prompt") which makes Expect only look for the last line of output
|
||||
# (i.e., the prompt). The -P flag allows you to define a character to
|
||||
# toggle this mode off and on.
|
||||
#
|
||||
# Read the man page for more info.
|
||||
#
|
||||
# -Don
|
||||
|
||||
|
||||
set timeout -1
|
||||
spawn ./add-user.sh
|
||||
match_max 100000
|
||||
expect -exact "\r
|
||||
What type of user do you wish to add? \r
|
||||
a) Management User (mgmt-users.properties) \r
|
||||
b) Application User (application-users.properties)\r
|
||||
(a): "
|
||||
send -- "A\r"
|
||||
expect -exact "A\r
|
||||
\r
|
||||
Enter the details of the new user to add.\r
|
||||
Using realm 'ManagementRealm' as discovered from the existing property files.\r
|
||||
Username : "
|
||||
send -- "USER\r"
|
||||
expect -exact "USER\r
|
||||
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.\r
|
||||
- The password should be different from the username\r
|
||||
- The password should not be one of the following restricted values {root, admin, administrator}\r
|
||||
- The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)\r
|
||||
Password : "
|
||||
send -- "PASSWORD\r"
|
||||
expect -exact "\r
|
||||
WFLYDM0101: Password should have at least 1 digit.\r
|
||||
Are you sure you want to use the password entered yes/no? "
|
||||
send -- "Y\r"
|
||||
expect -exact "Y\r
|
||||
Re-enter Password : "
|
||||
send -- "PASSWORD\r"
|
||||
expect -exact "\r
|
||||
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)\[ \]: "
|
||||
send -- " User,Trainer,Administrator"
|
||||
expect -exact " User,Trainer,Administrator"
|
||||
send -- "\r"
|
||||
expect -exact "\r
|
||||
About to add user 'USER' for realm 'ManagementRealm'\r
|
||||
Is this correct yes/no? "
|
||||
send -- "Y\r"
|
||||
expect -exact "Y\r
|
||||
Added user 'USER' to file '/opt/jboss/wildfly/standalone/configuration/mgmt-users.properties'\r
|
||||
Added user 'USER' to file '/opt/jboss/wildfly/domain/configuration/mgmt-users.properties'\r
|
||||
Added user 'USER' with groups User,Trainer,Administrator to file '/opt/jboss/wildfly/standalone/configuration/mgmt-groups.properties'\r
|
||||
Added user 'USER' with groups User,Trainer,Administrator to file '/opt/jboss/wildfly/domain/configuration/mgmt-groups.properties'\r
|
||||
Is this new user going to be used for one AS process to connect to another AS process? \r
|
||||
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.\r
|
||||
yes/no? "
|
||||
send -- "Y\r"
|
||||
expect eof
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">
|
||||
<resources>
|
||||
<resource-root path="postgresql-9.4.1209.jar"/>
|
||||
</resources>
|
||||
<dependencies>
|
||||
<module name="javax.api"/>
|
||||
<module name="javax.transaction.api"/>
|
||||
</dependencies>
|
||||
</module>
|
||||
Binary file not shown.
@@ -1,524 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<server xmlns="urn:jboss:domain:8.0">
|
||||
<extensions>
|
||||
<extension module="org.jboss.as.clustering.infinispan"/>
|
||||
<extension module="org.jboss.as.connector"/>
|
||||
<extension module="org.jboss.as.deployment-scanner"/>
|
||||
<extension module="org.jboss.as.ee"/>
|
||||
<extension module="org.jboss.as.ejb3"/>
|
||||
<extension module="org.jboss.as.jaxrs"/>
|
||||
<extension module="org.jboss.as.jdr"/>
|
||||
<extension module="org.jboss.as.jmx"/>
|
||||
<extension module="org.jboss.as.jpa"/>
|
||||
<extension module="org.jboss.as.jsf"/>
|
||||
<extension module="org.jboss.as.logging"/>
|
||||
<extension module="org.jboss.as.mail"/>
|
||||
<extension module="org.jboss.as.naming"/>
|
||||
<extension module="org.jboss.as.pojo"/>
|
||||
<extension module="org.jboss.as.remoting"/>
|
||||
<extension module="org.jboss.as.sar"/>
|
||||
<extension module="org.jboss.as.security"/>
|
||||
<extension module="org.jboss.as.transactions"/>
|
||||
<extension module="org.jboss.as.webservices"/>
|
||||
<extension module="org.jboss.as.weld"/>
|
||||
<extension module="org.wildfly.extension.batch.jberet"/>
|
||||
<extension module="org.wildfly.extension.bean-validation"/>
|
||||
<extension module="org.wildfly.extension.core-management"/>
|
||||
<extension module="org.wildfly.extension.discovery"/>
|
||||
<extension module="org.wildfly.extension.ee-security"/>
|
||||
<extension module="org.wildfly.extension.elytron"/>
|
||||
<extension module="org.wildfly.extension.io"/>
|
||||
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
|
||||
<extension module="org.wildfly.extension.microprofile.health-smallrye"/>
|
||||
<extension module="org.wildfly.extension.microprofile.opentracing-smallrye"/>
|
||||
<extension module="org.wildfly.extension.request-controller"/>
|
||||
<extension module="org.wildfly.extension.security.manager"/>
|
||||
<extension module="org.wildfly.extension.undertow"/>
|
||||
</extensions>
|
||||
<management>
|
||||
<security-realms>
|
||||
<security-realm name="ManagementRealm">
|
||||
<authentication>
|
||||
<local default-user="$local" skip-group-loading="true"/>
|
||||
<properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
|
||||
</authentication>
|
||||
<authorization map-groups-to-roles="false">
|
||||
<properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||
</authorization>
|
||||
</security-realm>
|
||||
<security-realm name="ApplicationRealm">
|
||||
<server-identities>
|
||||
<ssl>
|
||||
<keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>
|
||||
</ssl>
|
||||
</server-identities>
|
||||
<authentication>
|
||||
<local default-user="$local" allowed-users="*" skip-group-loading="true"/>
|
||||
<properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
|
||||
</authentication>
|
||||
<authorization>
|
||||
<properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||
</authorization>
|
||||
</security-realm>
|
||||
</security-realms>
|
||||
<audit-log>
|
||||
<formatters>
|
||||
<json-formatter name="json-formatter"/>
|
||||
</formatters>
|
||||
<handlers>
|
||||
<file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>
|
||||
</handlers>
|
||||
<logger log-boot="true" log-read-only="false" enabled="false">
|
||||
<handlers>
|
||||
<handler name="file"/>
|
||||
</handlers>
|
||||
</logger>
|
||||
</audit-log>
|
||||
<management-interfaces>
|
||||
<http-interface security-realm="ManagementRealm">
|
||||
<http-upgrade enabled="true"/>
|
||||
<socket-binding http="management-http"/>
|
||||
</http-interface>
|
||||
</management-interfaces>
|
||||
<access-control provider="simple">
|
||||
<role-mapping>
|
||||
<role name="SuperUser">
|
||||
<include>
|
||||
<user name="$local"/>
|
||||
</include>
|
||||
</role>
|
||||
</role-mapping>
|
||||
</access-control>
|
||||
</management>
|
||||
<profile>
|
||||
<subsystem xmlns="urn:jboss:domain:logging:6.0">
|
||||
<console-handler name="CONSOLE">
|
||||
<level name="INFO"/>
|
||||
<formatter>
|
||||
<named-formatter name="COLOR-PATTERN"/>
|
||||
</formatter>
|
||||
</console-handler>
|
||||
<periodic-rotating-file-handler name="FILE" autoflush="true">
|
||||
<formatter>
|
||||
<named-formatter name="PATTERN"/>
|
||||
</formatter>
|
||||
<file relative-to="jboss.server.log.dir" path="server.log"/>
|
||||
<suffix value=".yyyy-MM-dd"/>
|
||||
<append value="true"/>
|
||||
</periodic-rotating-file-handler>
|
||||
<logger category="com.arjuna">
|
||||
<level name="WARN"/>
|
||||
</logger>
|
||||
<logger category="org.jboss.as.config">
|
||||
<level name="DEBUG"/>
|
||||
</logger>
|
||||
<logger category="sun.rmi">
|
||||
<level name="WARN"/>
|
||||
</logger>
|
||||
<root-logger>
|
||||
<level name="INFO"/>
|
||||
<handlers>
|
||||
<handler name="CONSOLE"/>
|
||||
<handler name="FILE"/>
|
||||
</handlers>
|
||||
</root-logger>
|
||||
<formatter name="PATTERN">
|
||||
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||
</formatter>
|
||||
<formatter name="COLOR-PATTERN">
|
||||
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
|
||||
</formatter>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:batch-jberet:2.0">
|
||||
<default-job-repository name="in-memory"/>
|
||||
<default-thread-pool name="batch"/>
|
||||
<job-repository name="in-memory">
|
||||
<in-memory/>
|
||||
</job-repository>
|
||||
<thread-pool name="batch">
|
||||
<max-threads count="10"/>
|
||||
<keepalive-time time="30" unit="seconds"/>
|
||||
</thread-pool>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:core-management:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:datasources:5.0">
|
||||
<datasources>
|
||||
<datasource jta="false" jndi-name="java:jboss/postgresDS" pool-name="postgresDS" enabled="true" use-java-context="true" use-ccm="false">
|
||||
<connection-url>jdbc:postgresql://postgres:5432/myhealth</connection-url>
|
||||
<driver-class>org.postgresql.Driver</driver-class>
|
||||
<driver>postgresql</driver>
|
||||
<security>
|
||||
<user-name>USER</user-name>
|
||||
<password>PASSWORD</password>
|
||||
</security>
|
||||
</datasource>
|
||||
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
|
||||
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
|
||||
<driver>h2</driver>
|
||||
<security>
|
||||
<user-name>sa</user-name>
|
||||
<password>sa</password>
|
||||
</security>
|
||||
</datasource>
|
||||
<drivers>
|
||||
<driver name="postgresql" module="org.postgresql">
|
||||
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
|
||||
</driver>
|
||||
<driver name="h2" module="com.h2database.h2">
|
||||
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
|
||||
</driver>
|
||||
</drivers>
|
||||
</datasources>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
|
||||
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:discovery:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:ee:4.0">
|
||||
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
|
||||
<concurrent>
|
||||
<context-services>
|
||||
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>
|
||||
</context-services>
|
||||
<managed-thread-factories>
|
||||
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
|
||||
</managed-thread-factories>
|
||||
<managed-executor-services>
|
||||
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/>
|
||||
</managed-executor-services>
|
||||
<managed-scheduled-executor-services>
|
||||
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" keepalive-time="3000"/>
|
||||
</managed-scheduled-executor-services>
|
||||
</concurrent>
|
||||
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:ejb3:5.0">
|
||||
<session-bean>
|
||||
<stateless>
|
||||
<bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
|
||||
</stateless>
|
||||
<stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>
|
||||
<singleton default-access-timeout="5000"/>
|
||||
</session-bean>
|
||||
<pools>
|
||||
<bean-instance-pools>
|
||||
<strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||
<strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
|
||||
</bean-instance-pools>
|
||||
</pools>
|
||||
<caches>
|
||||
<cache name="simple"/>
|
||||
<cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>
|
||||
</caches>
|
||||
<passivation-stores>
|
||||
<passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>
|
||||
</passivation-stores>
|
||||
<async thread-pool-name="default"/>
|
||||
<timer-service thread-pool-name="default" default-data-store="default-file-store">
|
||||
<data-stores>
|
||||
<file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
|
||||
</data-stores>
|
||||
</timer-service>
|
||||
<remote connector-ref="http-remoting-connector" thread-pool-name="default">
|
||||
<channel-creation-options>
|
||||
<option name="READ_TIMEOUT" value="${prop.remoting-connector.read.timeout:20}" type="xnio"/>
|
||||
<option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>
|
||||
</channel-creation-options>
|
||||
</remote>
|
||||
<thread-pools>
|
||||
<thread-pool name="default">
|
||||
<max-threads count="10"/>
|
||||
<keepalive-time time="100" unit="milliseconds"/>
|
||||
</thread-pool>
|
||||
</thread-pools>
|
||||
<default-security-domain value="other"/>
|
||||
<default-missing-method-permissions-deny-access value="true"/>
|
||||
<log-system-exceptions value="true"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:wildfly:elytron:4.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">
|
||||
<providers>
|
||||
<aggregate-providers name="combined-providers">
|
||||
<providers name="elytron"/>
|
||||
<providers name="openssl"/>
|
||||
</aggregate-providers>
|
||||
<provider-loader name="elytron" module="org.wildfly.security.elytron"/>
|
||||
<provider-loader name="openssl" module="org.wildfly.openssl"/>
|
||||
</providers>
|
||||
<audit-logging>
|
||||
<file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>
|
||||
</audit-logging>
|
||||
<security-domains>
|
||||
<security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">
|
||||
<realm name="ApplicationRealm" role-decoder="groups-to-roles"/>
|
||||
<realm name="local"/>
|
||||
</security-domain>
|
||||
<security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">
|
||||
<realm name="ManagementRealm" role-decoder="groups-to-roles"/>
|
||||
<realm name="local" role-mapper="super-user-mapper"/>
|
||||
</security-domain>
|
||||
</security-domains>
|
||||
<security-realms>
|
||||
<identity-realm name="local" identity="$local"/>
|
||||
<properties-realm name="ApplicationRealm">
|
||||
<users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>
|
||||
<groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
|
||||
</properties-realm>
|
||||
<properties-realm name="ManagementRealm">
|
||||
<users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>
|
||||
<groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>
|
||||
</properties-realm>
|
||||
</security-realms>
|
||||
<mappers>
|
||||
<simple-permission-mapper name="default-permission-mapper" mapping-mode="first">
|
||||
<permission-mapping>
|
||||
<principal name="anonymous"/>
|
||||
<permission-set name="default-permissions"/>
|
||||
</permission-mapping>
|
||||
<permission-mapping match-all="true">
|
||||
<permission-set name="login-permission"/>
|
||||
<permission-set name="default-permissions"/>
|
||||
</permission-mapping>
|
||||
</simple-permission-mapper>
|
||||
<constant-realm-mapper name="local" realm-name="local"/>
|
||||
<simple-role-decoder name="groups-to-roles" attribute="groups"/>
|
||||
<constant-role-mapper name="super-user-mapper">
|
||||
<role name="SuperUser"/>
|
||||
</constant-role-mapper>
|
||||
</mappers>
|
||||
<permission-sets>
|
||||
<permission-set name="login-permission">
|
||||
<permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>
|
||||
</permission-set>
|
||||
<permission-set name="default-permissions">
|
||||
<permission class-name="org.wildfly.extension.batch.jberet.deployment.BatchPermission" module="org.wildfly.extension.batch.jberet" target-name="*"/>
|
||||
<permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>
|
||||
<permission class-name="org.jboss.ejb.client.RemoteEJBPermission" module="org.jboss.ejb-client"/>
|
||||
</permission-set>
|
||||
</permission-sets>
|
||||
<http>
|
||||
<http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">
|
||||
<mechanism-configuration>
|
||||
<mechanism mechanism-name="DIGEST">
|
||||
<mechanism-realm realm-name="ManagementRealm"/>
|
||||
</mechanism>
|
||||
</mechanism-configuration>
|
||||
</http-authentication-factory>
|
||||
<provider-http-server-mechanism-factory name="global"/>
|
||||
</http>
|
||||
<sasl>
|
||||
<sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">
|
||||
<mechanism-configuration>
|
||||
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||
<mechanism mechanism-name="DIGEST-MD5">
|
||||
<mechanism-realm realm-name="ApplicationRealm"/>
|
||||
</mechanism>
|
||||
</mechanism-configuration>
|
||||
</sasl-authentication-factory>
|
||||
<sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">
|
||||
<mechanism-configuration>
|
||||
<mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>
|
||||
<mechanism mechanism-name="DIGEST-MD5">
|
||||
<mechanism-realm realm-name="ManagementRealm"/>
|
||||
</mechanism>
|
||||
</mechanism-configuration>
|
||||
</sasl-authentication-factory>
|
||||
<configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">
|
||||
<properties>
|
||||
<property name="wildfly.sasl.local-user.default-user" value="$local"/>
|
||||
</properties>
|
||||
</configurable-sasl-server-factory>
|
||||
<mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">
|
||||
<filters>
|
||||
<filter provider-name="WildFlyElytron"/>
|
||||
</filters>
|
||||
</mechanism-provider-filtering-sasl-server-factory>
|
||||
<provider-sasl-server-factory name="global"/>
|
||||
</sasl>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:infinispan:7.0">
|
||||
<cache-container name="server" default-cache="default" module="org.wildfly.clustering.server">
|
||||
<local-cache name="default">
|
||||
<transaction mode="BATCH"/>
|
||||
</local-cache>
|
||||
</cache-container>
|
||||
<cache-container name="web" default-cache="passivation" module="org.wildfly.clustering.web.infinispan">
|
||||
<local-cache name="passivation">
|
||||
<locking isolation="REPEATABLE_READ"/>
|
||||
<transaction mode="BATCH"/>
|
||||
<file-store passivation="true" purge="false"/>
|
||||
</local-cache>
|
||||
</cache-container>
|
||||
<cache-container name="ejb" aliases="sfsb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan">
|
||||
<local-cache name="passivation">
|
||||
<locking isolation="REPEATABLE_READ"/>
|
||||
<transaction mode="BATCH"/>
|
||||
<file-store passivation="true" purge="false"/>
|
||||
</local-cache>
|
||||
</cache-container>
|
||||
<cache-container name="hibernate" module="org.infinispan.hibernate-cache">
|
||||
<local-cache name="entity">
|
||||
<transaction mode="NON_XA"/>
|
||||
<object-memory size="10000"/>
|
||||
<expiration max-idle="100000"/>
|
||||
</local-cache>
|
||||
<local-cache name="local-query">
|
||||
<object-memory size="10000"/>
|
||||
<expiration max-idle="100000"/>
|
||||
</local-cache>
|
||||
<local-cache name="timestamps"/>
|
||||
</cache-container>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:io:3.0">
|
||||
<worker name="default"/>
|
||||
<buffer-pool name="default"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:jca:5.0">
|
||||
<archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
|
||||
<bean-validation enabled="true"/>
|
||||
<default-workmanager>
|
||||
<short-running-threads>
|
||||
<core-threads count="50"/>
|
||||
<queue-length count="50"/>
|
||||
<max-threads count="50"/>
|
||||
<keepalive-time time="10" unit="seconds"/>
|
||||
</short-running-threads>
|
||||
<long-running-threads>
|
||||
<core-threads count="50"/>
|
||||
<queue-length count="50"/>
|
||||
<max-threads count="50"/>
|
||||
<keepalive-time time="10" unit="seconds"/>
|
||||
</long-running-threads>
|
||||
</default-workmanager>
|
||||
<cached-connection-manager/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
|
||||
<expose-resolved-model/>
|
||||
<expose-expression-model/>
|
||||
<remoting-connector/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:jpa:1.1">
|
||||
<jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:jsf:1.1"/>
|
||||
<subsystem xmlns="urn:jboss:domain:mail:3.0">
|
||||
<mail-session name="default" jndi-name="java:jboss/mail/Default">
|
||||
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
|
||||
</mail-session>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:wildfly:microprofile-config-smallrye:1.0"/>
|
||||
<subsystem xmlns="urn:wildfly:microprofile-health-smallrye:1.0" security-enabled="false"/>
|
||||
<subsystem xmlns="urn:wildfly:microprofile-opentracing-smallrye:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:naming:2.0">
|
||||
<remote-naming/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:remoting:4.0">
|
||||
<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
|
||||
<subsystem xmlns="urn:jboss:domain:security:2.0">
|
||||
<security-domains>
|
||||
<security-domain name="other" cache-type="default">
|
||||
<authentication>
|
||||
<login-module code="Remoting" flag="optional">
|
||||
<module-option name="password-stacking" value="useFirstPass"/>
|
||||
</login-module>
|
||||
<login-module code="RealmDirect" flag="required">
|
||||
<module-option name="password-stacking" value="useFirstPass"/>
|
||||
</login-module>
|
||||
</authentication>
|
||||
</security-domain>
|
||||
<security-domain name="jboss-web-policy" cache-type="default">
|
||||
<authorization>
|
||||
<policy-module code="Delegating" flag="required"/>
|
||||
</authorization>
|
||||
</security-domain>
|
||||
<security-domain name="jaspitest" cache-type="default">
|
||||
<authentication-jaspi>
|
||||
<login-module-stack name="dummy">
|
||||
<login-module code="Dummy" flag="optional"/>
|
||||
</login-module-stack>
|
||||
<auth-module code="Dummy"/>
|
||||
</authentication-jaspi>
|
||||
</security-domain>
|
||||
<security-domain name="jboss-ejb-policy" cache-type="default">
|
||||
<authorization>
|
||||
<policy-module code="Delegating" flag="required"/>
|
||||
</authorization>
|
||||
</security-domain>
|
||||
</security-domains>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:security-manager:1.0">
|
||||
<deployment-permissions>
|
||||
<maximum-set>
|
||||
<permission class="java.security.AllPermission"/>
|
||||
</maximum-set>
|
||||
</deployment-permissions>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:transactions:5.0">
|
||||
<core-environment node-identifier="${jboss.tx.node.id:1}">
|
||||
<process-id>
|
||||
<uuid/>
|
||||
</process-id>
|
||||
</core-environment>
|
||||
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
|
||||
<object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:undertow:7.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">
|
||||
<buffer-cache name="default"/>
|
||||
<server name="default-server">
|
||||
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
|
||||
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
|
||||
<host name="default-host" alias="localhost">
|
||||
<location name="/" handler="welcome-content"/>
|
||||
<http-invoker security-realm="ApplicationRealm"/>
|
||||
</host>
|
||||
</server>
|
||||
<servlet-container name="default">
|
||||
<jsp-config/>
|
||||
<websockets/>
|
||||
</servlet-container>
|
||||
<handlers>
|
||||
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
|
||||
</handlers>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:webservices:2.0">
|
||||
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
|
||||
<endpoint-config name="Standard-Endpoint-Config"/>
|
||||
<endpoint-config name="Recording-Endpoint-Config">
|
||||
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
|
||||
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
|
||||
</pre-handler-chain>
|
||||
</endpoint-config>
|
||||
<client-config name="Standard-Client-Config"/>
|
||||
</subsystem>
|
||||
<subsystem xmlns="urn:jboss:domain:weld:4.0"/>
|
||||
</profile>
|
||||
<interfaces>
|
||||
<interface name="management">
|
||||
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
|
||||
</interface>
|
||||
<interface name="public">
|
||||
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
|
||||
</interface>
|
||||
</interfaces>
|
||||
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
||||
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
|
||||
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
|
||||
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
|
||||
<socket-binding name="http" port="${jboss.http.port:8080}"/>
|
||||
<socket-binding name="https" port="${jboss.https.port:8443}"/>
|
||||
<socket-binding name="txn-recovery-environment" port="4712"/>
|
||||
<socket-binding name="txn-status-manager" port="4713"/>
|
||||
<outbound-socket-binding name="mail-smtp">
|
||||
<remote-destination host="localhost" port="25"/>
|
||||
</outbound-socket-binding>
|
||||
</socket-binding-group>
|
||||
</server>
|
||||
29
Dockerfile
29
Dockerfile
@@ -1,29 +0,0 @@
|
||||
FROM jboss/wildfly:14.0.1.Final
|
||||
|
||||
# User root user to install software
|
||||
USER root
|
||||
RUN yum -y install expect
|
||||
RUN yum -y install postgresql
|
||||
RUN yum -y install ant
|
||||
|
||||
# Compile and copy .ear to deployments
|
||||
ADD ./1.sources/ /opt/jboss/
|
||||
RUN cd /opt/jboss/MyHealth && ant
|
||||
RUN mv /opt/jboss/MyHealth/dist/MyHealth.ear /opt/jboss/wildfly/standalone/deployments
|
||||
|
||||
# Switch back to jboss user
|
||||
USER jboss
|
||||
|
||||
ADD ./4.config/createApplicationUser.sh /opt/jboss/wildfly/bin/
|
||||
ADD ./4.config/createManagementUser.sh /opt/jboss/wildfly/bin/
|
||||
|
||||
RUN cd /opt/jboss/wildfly/bin && ./createApplicationUser.sh
|
||||
RUN cd /opt/jboss/wildfly/bin && ./createManagementUser.sh
|
||||
|
||||
RUN mkdir /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/
|
||||
RUN mkdir /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
|
||||
ADD ./4.config/postgresql-9.4.1209.jar /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
|
||||
ADD ./4.config/module.xml /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
|
||||
ADD ./4.config/standalone.xml /opt/jboss/wildfly/standalone/configuration/standalone.xml
|
||||
|
||||
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
|
||||
@@ -1,7 +1,10 @@
|
||||
**Página de inicio del proyecto My Health del Grupo 2**
|
||||
## Página de inicio del proyecto My Health del Grupo 2
|
||||
|
||||
|
||||
Organización de directorios:
|
||||
### Organización de directorios:
|
||||
* sources: Código fuente y proyecto eclipse
|
||||
* database: Scripts SQL para crear la estructura de base de datos y los datos de prueba
|
||||
* doc: Directorio para ubicar la documentación compartida.
|
||||
|
||||
### Instrucciones de despliegue e instalación
|
||||
Las instrucciones detalladas de despliegue y configuración están descritas en el documento [install.md](install.md)
|
||||
@@ -1,23 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:10.11-alpine
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
- POSTGRES_USER=USER
|
||||
- POSTGRES_PASSWORD=PASSWORD
|
||||
- POSTGRES_DB=myhealth
|
||||
volumes:
|
||||
- ./2.database/01.CreateTables.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
wildfly:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- DB_USER=USER
|
||||
- DB_PASS=PASSWORD
|
||||
- JBOSS_HOME=/opt/jboss/wildfly
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
26
install.md
Normal file
26
install.md
Normal file
@@ -0,0 +1,26 @@
|
||||
## Instrucciones de despliegue e instalación
|
||||
### 1. Crear esquema de base de datos y tablas:
|
||||
Se debe crear un esquema nuevo en PostgreSQL y conceder permisos al usuario USER. Esto puede realizarse ejecutando el script incluido con la solución llamado:
|
||||
* 01.CreateTables.sql
|
||||
|
||||
### 2. Inserción de datos iniciales:
|
||||
Se debe ejecutar el script, incluido con la solución, que crea la tabla e inserta los datos de prueba:
|
||||
* 02.Datos_prueba.sql
|
||||
|
||||
### 3. Creación del DataSource:
|
||||
Para este proyecto se utilizará el mismo datasource que para el caso práctico, si no está creado debe añadirse al fichero JBOSS_HOME\standalone\configuration\standalone.xlm.
|
||||
El usuario y contraseña de base de datos que se han utilizado en el datasource es USER con contraseña PASSWORD.
|
||||
|
||||
<datasource jta="false" jndi-name="java:jboss/postgresDS" pool-name="postgresDS"
|
||||
enabled="true" use-java-context="true" use-ccm="false" statistics-enabled="true">
|
||||
<connection-url>jdbc:postgresql://localhost:5432/postgres</connection-url>
|
||||
<driver-class>org.postgresql.Driver</driver-class>
|
||||
<driver>postgresql</driver>
|
||||
<security>
|
||||
<user-name>USER</user-name>
|
||||
<password>PASSWORD</password>
|
||||
</security>
|
||||
</datasource>
|
||||
|
||||
### 4. Ejecutar la compilación y despliegue del proyecto
|
||||
Acceder al directorio con el código fuente ([git-folder]/1.sources/MyHealth), y donde está ubicado el archivo de compilación de ant build.xml, ejecutar `ant` en este directorio, el proyecto debería compilarse y desplegarse automáticamente en el servidor JBOSS local.
|
||||
Reference in New Issue
Block a user