Auto reorganización de imports. Eliminación de warnings.
This commit is contained in:
@@ -10,19 +10,14 @@ import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.TypedQuery;
|
||||
|
||||
import TO.LoggedUserTO;
|
||||
import TO.MedicalSpecialtyTO;
|
||||
import TO.QuestionTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
import common.MedicalTestType;
|
||||
import common.QuestionStatus;
|
||||
import common.UserType;
|
||||
import ejb.common.CommonFacadeLocal;
|
||||
import jpa.FamilyDoctorJPA;
|
||||
import jpa.PatientJPA;
|
||||
import jpa.QuestionJPA;
|
||||
import jpa.SpecialistDoctorJPA;
|
||||
import managedbean.common.SessionUtils;
|
||||
|
||||
/**
|
||||
* EJB Session Bean Class para la Practica 2, Ejercicio 1 (ISCSD) Implementa los métodos de la capa de negocio que implementan la logica de negocio y la interacción con la capa de
|
||||
|
||||
@@ -4,7 +4,6 @@ import javax.ejb.Remote;
|
||||
|
||||
import TO.LoggedUserTO;
|
||||
import TO.MedicalSpecialtyTO;
|
||||
import TO.PatientTO;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -11,14 +11,7 @@ import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.TypedQuery;
|
||||
|
||||
import TO.VisitTO;
|
||||
import common.HashUtils;
|
||||
import common.QuestionStatus;
|
||||
import common.Utils;
|
||||
import ejb.common.CommonFacadeLocal;
|
||||
import jpa.FamilyDoctorJPA;
|
||||
import jpa.MedicalSpecialtyJPA;
|
||||
import jpa.QuestionJPA;
|
||||
import jpa.SpecialistDoctorJPA;
|
||||
import jpa.VisitJPA;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,6 @@ import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import TO.QuestionTO;
|
||||
import common.QuestionStatus;
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,8 +58,8 @@ public class AuthorizationFilter implements Filter {
|
||||
|
||||
resp = (HttpServletResponse) response;
|
||||
|
||||
//TODO: Eliminar este código al terminar el desarrollo.
|
||||
//Realizamos un login automatico (para agilizar el desarrollo.
|
||||
// TODO: Eliminar este código al terminar el desarrollo.
|
||||
// Realizamos un login automatico (para agilizar el desarrollo.
|
||||
if (Debug == true) {
|
||||
ses = req.getSession(true);
|
||||
|
||||
@@ -69,6 +69,10 @@ public class AuthorizationFilter implements Filter {
|
||||
login.setPassword("asdf");
|
||||
boolean result = login.autoLogin(ses);
|
||||
|
||||
if (result == true)
|
||||
SessionUtils.addMessage(ses, FacesMessage.SEVERITY_ERROR, "Login automático correcto", "Se ha realizado un login automático correctamente.");
|
||||
else
|
||||
SessionUtils.addMessage(ses, FacesMessage.SEVERITY_ERROR, "El login automático ha fallado.", "No se ha podido realizar el login automático.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ public class QuestionsMBean extends ManagedBeanBase implements Serializable {
|
||||
private int userID;
|
||||
private UserType userType;
|
||||
private List<QuestionTO> pendingQuestions;
|
||||
private Integer id;
|
||||
private QuestionTO selected;
|
||||
private boolean addNewMode;
|
||||
|
||||
@@ -51,9 +50,9 @@ public class QuestionsMBean extends ManagedBeanBase implements Serializable {
|
||||
public void setPendingQuestions(List<QuestionTO> value) {
|
||||
this.pendingQuestions = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cargará las preguntas enviadas al médico o escritas por el paciente, esto irá
|
||||
* en función del tipo de usuario en sesión
|
||||
* Cargará las preguntas enviadas al médico o escritas por el paciente, esto irá en función del tipo de usuario en sesión
|
||||
*/
|
||||
private void loadQuestions() {
|
||||
if (this.userType == UserType.FAMILY_DOCTOR) {
|
||||
@@ -93,7 +92,7 @@ public class QuestionsMBean extends ManagedBeanBase implements Serializable {
|
||||
}
|
||||
|
||||
public void create() {
|
||||
this.addNewMode = true;
|
||||
this.addNewMode = true;
|
||||
this.selected = new QuestionTO();
|
||||
this.selected.setId(-1);
|
||||
this.selected.setTitle("");
|
||||
|
||||
@@ -8,16 +8,13 @@ import javax.annotation.PostConstruct;
|
||||
import javax.faces.view.ViewScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
import org.primefaces.event.SelectEvent;
|
||||
import org.primefaces.model.LazyDataModel;
|
||||
import org.primefaces.model.SortOrder;
|
||||
|
||||
import TO.MedicalSpecialtyTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
import common.Constants;
|
||||
import common.UserType;
|
||||
import managedbean.common.ManagedBeanBase;
|
||||
import managedbean.common.SessionUtils;
|
||||
|
||||
@Named("sspec")
|
||||
@ViewScoped
|
||||
@@ -25,8 +22,6 @@ public class SearchSpecialistMBean extends ManagedBeanBase implements Serializab
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int userID;
|
||||
private UserType userType;
|
||||
private List<MedicalSpecialtyTO> medicalSpecialitiesList;
|
||||
private MedicalSpecialtyTO medicalSpeciality;
|
||||
private String lastUIQueryMS;
|
||||
@@ -38,8 +33,6 @@ public class SearchSpecialistMBean extends ManagedBeanBase implements Serializab
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
// Inicialización de variables y propiedades van aquí.
|
||||
this.userType = SessionUtils.getUserType();
|
||||
this.userID = Integer.valueOf(SessionUtils.getUserId());
|
||||
this.medicalSpecialitiesList = this.getRemoteManagerCommon().listMedicalSpecialitiesPaged(0, Constants.MAX_ITEMS_AUTOCOMPLETE_SEARCH);
|
||||
this.medicalSpeciality = null;
|
||||
this.lastUIQueryMS = "";
|
||||
|
||||
@@ -3,21 +3,13 @@ package managedbean.visit;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Time;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.inject.Named;
|
||||
|
||||
import org.primefaces.model.LazyDataModel;
|
||||
import org.primefaces.model.SortOrder;
|
||||
|
||||
import TO.FamilyDoctorTO;
|
||||
import TO.PatientTO;
|
||||
import TO.VisitTO;
|
||||
import managedbean.common.ManagedBeanBase;
|
||||
import managedbean.common.SessionUtils;
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
package managedbean.visit;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Time;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.view.ViewScoped;
|
||||
@@ -16,7 +13,6 @@ import javax.inject.Named;
|
||||
import TO.FamilyDoctorTO;
|
||||
import TO.PatientTO;
|
||||
import TO.VisitTO;
|
||||
import common.UserType;
|
||||
import managedbean.common.ManagedBeanBase;
|
||||
import managedbean.common.SessionUtils;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.view.ViewScoped;
|
||||
|
||||
Reference in New Issue
Block a user