| @ -0,0 +1,40 @@ | ||||
| /* | ||||
|  * Causa.java | ||||
|  * | ||||
|  * Created on November 27, 2007, 4:21 PM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class Causa { | ||||
|     private Integer id; | ||||
|     private String causa; | ||||
|      | ||||
|     /** Creates a new instance of Causa */ | ||||
|     public Causa() { | ||||
|     } | ||||
| 
 | ||||
|     public Integer getId() { | ||||
|         return id; | ||||
|     } | ||||
| 
 | ||||
|     public void setId(Integer id) { | ||||
|         this.id = id; | ||||
|     } | ||||
| 
 | ||||
|     public String getCausa() { | ||||
|         return causa; | ||||
|     } | ||||
| 
 | ||||
|     public void setCausa(String causa) { | ||||
|         this.causa = causa; | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,49 @@ | ||||
| /* | ||||
|  * Controle.java | ||||
|  * | ||||
|  * Created on January 7, 2008, 3:03 PM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class Controle { | ||||
|     private Integer id; | ||||
|     private Integer analise_year; | ||||
|     private Integer last_analise_nr; | ||||
|      | ||||
|     /** Creates a new instance of Controle */ | ||||
|     public Controle() { | ||||
|     } | ||||
| 
 | ||||
|     public Integer getId() { | ||||
|         return id; | ||||
|     } | ||||
| 
 | ||||
|     public void setId(Integer id) { | ||||
|         this.id = id; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getAnalise_year() { | ||||
|         return analise_year; | ||||
|     } | ||||
| 
 | ||||
|     public void setAnalise_year(Integer analise_year) { | ||||
|         this.analise_year = analise_year; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getLast_analise_nr() { | ||||
|         return last_analise_nr; | ||||
|     } | ||||
| 
 | ||||
|     public void setLast_analise_nr(Integer last_analise_nr) { | ||||
|         this.last_analise_nr = last_analise_nr; | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,75 @@ | ||||
| /* | ||||
|  * Correcao.java | ||||
|  * | ||||
|  * Created on November 29, 2007, 10:42 AM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class Correcao { | ||||
|     private Integer analise_id; | ||||
|     private String correcao;    // 'y'/ 'n'
 | ||||
|     private Integer estado_actual; | ||||
|     private Integer estado_corr; | ||||
|     private String descricao; //descricao do estado a corrigir    
 | ||||
|     private String observacoes; | ||||
|     /** Creates a new instance of Correcao */ | ||||
|     public Correcao() { | ||||
|     } | ||||
| 
 | ||||
|     public Integer getEstado_actual() { | ||||
|         return estado_actual; | ||||
|     } | ||||
| 
 | ||||
|     public void setEstado_actual(Integer estado_actual) { | ||||
|         this.estado_actual = estado_actual; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getEstado_corr() { | ||||
|         return estado_corr; | ||||
|     } | ||||
| 
 | ||||
|     public void setEstado_corr(Integer estado_corr) { | ||||
|         this.estado_corr = estado_corr; | ||||
|     } | ||||
| 
 | ||||
|     public String getObservacoes() { | ||||
|         return observacoes; | ||||
|     } | ||||
| 
 | ||||
|     public void setObservacoes(String observacoes) { | ||||
|         this.observacoes = observacoes; | ||||
|     } | ||||
| 
 | ||||
|     public String getDescricao() { | ||||
|         return descricao; | ||||
|     } | ||||
| 
 | ||||
|     public void setDescricao(String descricao) { | ||||
|         this.descricao = descricao; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getAnalise_id() { | ||||
|         return analise_id; | ||||
|     } | ||||
| 
 | ||||
|     public void setAnalise_id(Integer analise_id) { | ||||
|         this.analise_id = analise_id; | ||||
|     } | ||||
| 
 | ||||
|     public String getCorrecao() { | ||||
|         return correcao; | ||||
|     } | ||||
| 
 | ||||
|     public void setCorrecao(String correcao) { | ||||
|         this.correcao = correcao; | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,49 @@ | ||||
| /* | ||||
|  * Departamento.java | ||||
|  * | ||||
|  * Created on December 28, 2007, 11:16 AM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class Departamento { | ||||
|     private Integer id; | ||||
|     private String descricao; | ||||
|     private String activo; | ||||
|      | ||||
|     /** Creates a new instance of Departamento */ | ||||
|     public Departamento() { | ||||
|     } | ||||
| 
 | ||||
|     public Integer getId() { | ||||
|         return id; | ||||
|     } | ||||
| 
 | ||||
|     public void setId(Integer id) { | ||||
|         this.id = id; | ||||
|     } | ||||
| 
 | ||||
|     public String getDescricao() { | ||||
|         return descricao; | ||||
|     } | ||||
| 
 | ||||
|     public void setDescricao(String descricao) { | ||||
|         this.descricao = descricao; | ||||
|     } | ||||
| 
 | ||||
|     public String getActivo() { | ||||
|         return activo; | ||||
|     } | ||||
| 
 | ||||
|     public void setActivo(String activo) { | ||||
|         this.activo = activo; | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,22 @@ | ||||
| /* | ||||
|  * EditUser.java | ||||
|  * | ||||
|  * Created on December 5, 2007, 2:02 PM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class EditUser extends Utilizador{ | ||||
|      | ||||
|     /** Creates a new instance of EditUser */ | ||||
|     public EditUser() { | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,753 @@ | ||||
| /* | ||||
|  * EnviarCorrecao.java | ||||
|  * | ||||
|  * Created on November 28, 2007, 5:27 PM | ||||
|  * Copyright lluis | ||||
|  */ | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| import com.sun.data.provider.RowKey; | ||||
| import com.sun.rave.web.ui.appbase.AbstractPageBean; | ||||
| import com.sun.rave.web.ui.component.Body; | ||||
| import com.sun.rave.web.ui.component.Button; | ||||
| import com.sun.rave.web.ui.component.Form; | ||||
| import com.sun.rave.web.ui.component.Head; | ||||
| import com.sun.rave.web.ui.component.Html; | ||||
| import com.sun.rave.web.ui.component.Hyperlink; | ||||
| import com.sun.rave.web.ui.component.ImageComponent; | ||||
| import com.sun.rave.web.ui.component.Link; | ||||
| import com.sun.rave.web.ui.component.Page; | ||||
| import com.sun.rave.web.ui.component.PanelGroup; | ||||
| import com.sun.rave.web.ui.component.StaticText; | ||||
| import com.sun.rave.web.ui.component.Table; | ||||
| import com.sun.rave.web.ui.component.TableColumn; | ||||
| import com.sun.rave.web.ui.component.TableRowGroup; | ||||
| import com.sun.rave.web.ui.component.TextArea; | ||||
| import db.AnalisesDataProvider; | ||||
| import db.EstadosCorrecaoDataProvider; | ||||
| import global.Global; | ||||
| import java.util.ArrayList; | ||||
| import javax.faces.FacesException; | ||||
| import javax.faces.component.html.HtmlPanelGrid; | ||||
| import javax.faces.event.ValueChangeEvent; | ||||
| 
 | ||||
| /** | ||||
|  * <p>Page bean that corresponds to a similarly named JSP page.  This | ||||
|  * class contains component definitions (and initialization code) for | ||||
|  * all components that you have defined on this page, as well as | ||||
|  * lifecycle methods and event handlers where you may add behavior | ||||
|  * to respond to incoming events.</p> | ||||
|  */ | ||||
| public class EnviarCorrecao extends AbstractPageBean { | ||||
|     // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
 | ||||
|     private int __placeholder; | ||||
|      | ||||
|     /** | ||||
|      * <p>Automatically managed component initialization.  <strong>WARNING:</strong> | ||||
|      * This method is automatically generated, so any user-specified code inserted | ||||
|      * here is subject to being replaced.</p> | ||||
|      */ | ||||
|     private void _init() throws Exception { | ||||
|     } | ||||
|      | ||||
|     private Page page1 = new Page(); | ||||
|      | ||||
|     public Page getPage1() { | ||||
|         return page1; | ||||
|     } | ||||
|      | ||||
|     public void setPage1(Page p) { | ||||
|         this.page1 = p; | ||||
|     } | ||||
|      | ||||
|     private Html html1 = new Html(); | ||||
|      | ||||
|     public Html getHtml1() { | ||||
|         return html1; | ||||
|     } | ||||
|      | ||||
|     public void setHtml1(Html h) { | ||||
|         this.html1 = h; | ||||
|     } | ||||
|      | ||||
|     private Head head1 = new Head(); | ||||
|      | ||||
|     public Head getHead1() { | ||||
|         return head1; | ||||
|     } | ||||
|      | ||||
|     public void setHead1(Head h) { | ||||
|         this.head1 = h; | ||||
|     } | ||||
|      | ||||
|     private Link link1 = new Link(); | ||||
|      | ||||
|     public Link getLink1() { | ||||
|         return link1; | ||||
|     } | ||||
|      | ||||
|     public void setLink1(Link l) { | ||||
|         this.link1 = l; | ||||
|     } | ||||
|      | ||||
|     private Body body1 = new Body(); | ||||
|      | ||||
|     public Body getBody1() { | ||||
|         return body1; | ||||
|     } | ||||
|      | ||||
|     public void setBody1(Body b) { | ||||
|         this.body1 = b; | ||||
|     } | ||||
|      | ||||
|     private Form form1 = new Form(); | ||||
|      | ||||
|     public Form getForm1() { | ||||
|         return form1; | ||||
|     } | ||||
|      | ||||
|     public void setForm1(Form f) { | ||||
|         this.form1 = f; | ||||
|     } | ||||
| 
 | ||||
|     private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); | ||||
| 
 | ||||
|     public HtmlPanelGrid getGridBase1() { | ||||
|         return gridBase1; | ||||
|     } | ||||
| 
 | ||||
|     public void setGridBase1(HtmlPanelGrid hpg) { | ||||
|         this.gridBase1 = hpg; | ||||
|     } | ||||
| 
 | ||||
|     private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); | ||||
| 
 | ||||
|     public HtmlPanelGrid getGridLayout1() { | ||||
|         return gridLayout1; | ||||
|     } | ||||
| 
 | ||||
|     public void setGridLayout1(HtmlPanelGrid hpg) { | ||||
|         this.gridLayout1 = hpg; | ||||
|     } | ||||
| 
 | ||||
|     private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); | ||||
| 
 | ||||
|     public HtmlPanelGrid getGridPanel1() { | ||||
|         return gridPanel1; | ||||
|     } | ||||
| 
 | ||||
|     public void setGridPanel1(HtmlPanelGrid hpg) { | ||||
|         this.gridPanel1 = hpg; | ||||
|     } | ||||
| 
 | ||||
|     private PanelGroup groupPanel1 = new PanelGroup(); | ||||
| 
 | ||||
|     public PanelGroup getGroupPanel1() { | ||||
|         return groupPanel1; | ||||
|     } | ||||
| 
 | ||||
|     public void setGroupPanel1(PanelGroup pg) { | ||||
|         this.groupPanel1 = pg; | ||||
|     } | ||||
| 
 | ||||
|     private ImageComponent image1 = new ImageComponent(); | ||||
| 
 | ||||
|     public ImageComponent getImage1() { | ||||
|         return image1; | ||||
|     } | ||||
| 
 | ||||
|     public void setImage1(ImageComponent ic) { | ||||
|         this.image1 = ic; | ||||
|     } | ||||
| 
 | ||||
|     private ImageComponent image2 = new ImageComponent(); | ||||
| 
 | ||||
|     public ImageComponent getImage2() { | ||||
|         return image2; | ||||
|     } | ||||
| 
 | ||||
|     public void setImage2(ImageComponent ic) { | ||||
|         this.image2 = ic; | ||||
|     } | ||||
| 
 | ||||
|     private PanelGroup groupPanel2 = new PanelGroup(); | ||||
| 
 | ||||
|     public PanelGroup getGroupPanel2() { | ||||
|         return groupPanel2; | ||||
|     } | ||||
| 
 | ||||
|     public void setGroupPanel2(PanelGroup pg) { | ||||
|         this.groupPanel2 = pg; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText lblUser1 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getLblUser1() { | ||||
|         return lblUser1; | ||||
|     } | ||||
| 
 | ||||
|     public void setLblUser1(StaticText st) { | ||||
|         this.lblUser1 = st; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText1 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText1() { | ||||
|         return staticText1; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText1(StaticText st) { | ||||
|         this.staticText1 = st; | ||||
|     } | ||||
| 
 | ||||
|     private Hyperlink lnkEditUser1 = new Hyperlink(); | ||||
| 
 | ||||
|     public Hyperlink getLnkEditUser1() { | ||||
|         return lnkEditUser1; | ||||
|     } | ||||
| 
 | ||||
|     public void setLnkEditUser1(Hyperlink h) { | ||||
|         this.lnkEditUser1 = h; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText2 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText2() { | ||||
|         return staticText2; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText2(StaticText st) { | ||||
|         this.staticText2 = st; | ||||
|     } | ||||
| 
 | ||||
|     private Hyperlink lnkLogout1 = new Hyperlink(); | ||||
| 
 | ||||
|     public Hyperlink getLnkLogout1() { | ||||
|         return lnkLogout1; | ||||
|     } | ||||
| 
 | ||||
|     public void setLnkLogout1(Hyperlink h) { | ||||
|         this.lnkLogout1 = h; | ||||
|     } | ||||
| 
 | ||||
|     private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); | ||||
| 
 | ||||
|     public HtmlPanelGrid getGridLayoutTop1() { | ||||
|         return gridLayoutTop1; | ||||
|     } | ||||
| 
 | ||||
|     public void setGridLayoutTop1(HtmlPanelGrid hpg) { | ||||
|         this.gridLayoutTop1 = hpg; | ||||
|     } | ||||
| 
 | ||||
|     private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); | ||||
| 
 | ||||
|     public HtmlPanelGrid getGridPanel9() { | ||||
|         return gridPanel9; | ||||
|     } | ||||
| 
 | ||||
|     public void setGridPanel9(HtmlPanelGrid hpg) { | ||||
|         this.gridPanel9 = hpg; | ||||
|     } | ||||
| 
 | ||||
|     private PanelGroup groupPanel8 = new PanelGroup(); | ||||
| 
 | ||||
|     public PanelGroup getGroupPanel8() { | ||||
|         return groupPanel8; | ||||
|     } | ||||
| 
 | ||||
|     public void setGroupPanel8(PanelGroup pg) { | ||||
|         this.groupPanel8 = pg; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText10 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText10() { | ||||
|         return staticText10; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText10(StaticText st) { | ||||
|         this.staticText10 = st; | ||||
|     } | ||||
| 
 | ||||
|     private ImageComponent image3 = new ImageComponent(); | ||||
| 
 | ||||
|     public ImageComponent getImage3() { | ||||
|         return image3; | ||||
|     } | ||||
| 
 | ||||
|     public void setImage3(ImageComponent ic) { | ||||
|         this.image3 = ic; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText11 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText11() { | ||||
|         return staticText11; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText11(StaticText st) { | ||||
|         this.staticText11 = st; | ||||
|     } | ||||
| 
 | ||||
|     private HtmlPanelGrid gridMain1 = new HtmlPanelGrid(); | ||||
| 
 | ||||
|     public HtmlPanelGrid getGridMain1() { | ||||
|         return gridMain1; | ||||
|     } | ||||
| 
 | ||||
|     public void setGridMain1(HtmlPanelGrid hpg) { | ||||
|         this.gridMain1 = hpg; | ||||
|     } | ||||
| 
 | ||||
|     private Table table1 = new Table(); | ||||
| 
 | ||||
|     public Table getTable1() { | ||||
|         return table1; | ||||
|     } | ||||
| 
 | ||||
|     public void setTable1(Table t) { | ||||
|         this.table1 = t; | ||||
|     } | ||||
| 
 | ||||
|     private TableRowGroup tableRowGroup1 = new TableRowGroup(); | ||||
| 
 | ||||
|     public TableRowGroup getTableRowGroup1() { | ||||
|         return tableRowGroup1; | ||||
|     } | ||||
| 
 | ||||
|     public void setTableRowGroup1(TableRowGroup trg) { | ||||
|         this.tableRowGroup1 = trg; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText6 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText6() { | ||||
|         return staticText6; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText6(StaticText st) { | ||||
|         this.staticText6 = st; | ||||
|     } | ||||
| 
 | ||||
|     private TextArea txtObservacoes = new TextArea(); | ||||
| 
 | ||||
|     public TextArea getTxtObservacoes() { | ||||
|         return txtObservacoes; | ||||
|     } | ||||
| 
 | ||||
|     public void setTxtObservacoes(TextArea ta) { | ||||
|         this.txtObservacoes = ta; | ||||
|     } | ||||
| 
 | ||||
|     private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); | ||||
| 
 | ||||
|     public HtmlPanelGrid getGridPanel2() { | ||||
|         return gridPanel2; | ||||
|     } | ||||
| 
 | ||||
|     public void setGridPanel2(HtmlPanelGrid hpg) { | ||||
|         this.gridPanel2 = hpg; | ||||
|     } | ||||
| 
 | ||||
|     private Button butCancelar = new Button(); | ||||
| 
 | ||||
|     public Button getButCancelar() { | ||||
|         return butCancelar; | ||||
|     } | ||||
| 
 | ||||
|     public void setButCancelar(Button b) { | ||||
|         this.butCancelar = b; | ||||
|     } | ||||
| 
 | ||||
|     private TableColumn tableColumn1 = new TableColumn(); | ||||
| 
 | ||||
|     public TableColumn getTableColumn1() { | ||||
|         return tableColumn1; | ||||
|     } | ||||
| 
 | ||||
|     public void setTableColumn1(TableColumn tc) { | ||||
|         this.tableColumn1 = tc; | ||||
|     } | ||||
| 
 | ||||
|     private Hyperlink lnkEstadoCorr = new Hyperlink(); | ||||
| 
 | ||||
|     public Hyperlink getLnkEstadoCorr() { | ||||
|         return lnkEstadoCorr; | ||||
|     } | ||||
| 
 | ||||
|     public void setLnkEstadoCorr(Hyperlink h) { | ||||
|         this.lnkEstadoCorr = h; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText3 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText3() { | ||||
|         return staticText3; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText3(StaticText st) { | ||||
|         this.staticText3 = st; | ||||
|     } | ||||
| 
 | ||||
|     private Hyperlink lnkNewUser1 = new Hyperlink(); | ||||
| 
 | ||||
|     public Hyperlink getLnkNewUser1() { | ||||
|         return lnkNewUser1; | ||||
|     } | ||||
| 
 | ||||
|     public void setLnkNewUser1(Hyperlink h) { | ||||
|         this.lnkNewUser1 = h; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText4 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText4() { | ||||
|         return staticText4; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText4(StaticText st) { | ||||
|         this.staticText4 = st; | ||||
|     } | ||||
| 
 | ||||
|     private Hyperlink lnkAnalisesAcidente = new Hyperlink(); | ||||
| 
 | ||||
|     public Hyperlink getLnkAnalisesAcidente() { | ||||
|         return lnkAnalisesAcidente; | ||||
|     } | ||||
| 
 | ||||
|     public void setLnkAnalisesAcidente(Hyperlink h) { | ||||
|         this.lnkAnalisesAcidente = h; | ||||
|     } | ||||
| 
 | ||||
|     private StaticText staticText5 = new StaticText(); | ||||
| 
 | ||||
|     public StaticText getStaticText5() { | ||||
|         return staticText5; | ||||
|     } | ||||
| 
 | ||||
|     public void setStaticText5(StaticText st) { | ||||
|         this.staticText5 = st; | ||||
|     } | ||||
|      | ||||
|     // </editor-fold>
 | ||||
|      | ||||
|     /** | ||||
|      * <p>Construct a new Page bean instance.</p> | ||||
|      */ | ||||
|     public EnviarCorrecao() { | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * <p>Callback method that is called whenever a page is navigated to, | ||||
|      * either directly via a URL, or indirectly via page navigation. | ||||
|      * Customize this method to acquire resources that will be needed | ||||
|      * for event handlers and lifecycle methods, whether or not this | ||||
|      * page is performing post back processing.</p> | ||||
|      * | ||||
|      * <p>Note that, if the current request is a postback, the property | ||||
|      * values of the components do <strong>not</strong> represent any | ||||
|      * values submitted with this request.  Instead, they represent the | ||||
|      * property values that were saved for this view when it was rendered.</p> | ||||
|      */ | ||||
|     public void init() { | ||||
|         // Perform initializations inherited from our superclass
 | ||||
|         super.init(); | ||||
|         // Perform application initialization that must complete
 | ||||
|         // *before* managed components are initialized
 | ||||
|         // TODO - add your own initialiation code here
 | ||||
|          | ||||
|         // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
 | ||||
|         // Initialize automatically managed components
 | ||||
|         // *Note* - this logic should NOT be modified
 | ||||
|         try { | ||||
|             _init(); | ||||
|         } catch (Exception e) { | ||||
|             log("EnviarCorrecao Initialization Failure", e); | ||||
|             throw e instanceof FacesException ? (FacesException) e: new FacesException(e); | ||||
|         } | ||||
|          | ||||
|         // </editor-fold>
 | ||||
|         // Perform application initialization that must complete
 | ||||
|         // *after* managed components are initialized
 | ||||
|         // TODO - add your own initialization code here
 | ||||
|          | ||||
| 
 | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * <p>Callback method that is called after the component tree has been | ||||
|      * restored, but before any event processing takes place.  This method | ||||
|      * will <strong>only</strong> be called on a postback request that | ||||
|      * is processing a form submit.  Customize this method to allocate | ||||
|      * resources that will be required in your event handlers.</p> | ||||
|      */ | ||||
|     public void preprocess() { | ||||
| 
 | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * <p>Callback method that is called just before rendering takes place. | ||||
|      * This method will <strong>only</strong> be called for the page that | ||||
|      * will actually be rendered (and not, for example, on a page that | ||||
|      * handled a postback and then navigated to a different page).  Customize | ||||
|      * this method to allocate resources that will be required for rendering | ||||
|      * this page.</p> | ||||
|      */ | ||||
|     public void prerender() { | ||||
|         fillTabelaEstados();         | ||||
|     } | ||||
|      | ||||
|     /** | ||||
|      * <p>Callback method that is called after rendering is completed for | ||||
|      * this request, if <code>init()</code> was called (regardless of whether | ||||
|      * or not this was the page that was actually rendered).  Customize this | ||||
|      * method to release resources acquired in the <code>init()</code>, | ||||
|      * <code>preprocess()</code>, or <code>prerender()</code> methods (or | ||||
|      * acquired during execution of an event handler).</p> | ||||
|      */ | ||||
|     public void destroy() { | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * <p>Return a reference to the scoped data bean.</p> | ||||
|      */ | ||||
|     protected SessionBean1 getSessionBean1() { | ||||
|         return (SessionBean1)getBean("SessionBean1"); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * <p>Return a reference to the scoped data bean.</p> | ||||
|      */ | ||||
|     protected RequestBean1 getRequestBean1() { | ||||
|         return (RequestBean1)getBean("RequestBean1"); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * <p>Return a reference to the scoped data bean.</p> | ||||
|      */ | ||||
|     protected ApplicationBean1 getApplicationBean1() { | ||||
|         return (ApplicationBean1)getBean("ApplicationBean1"); | ||||
|     } | ||||
| 
 | ||||
|     public String lnkEditUser_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkLogout_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         try | ||||
|         { | ||||
|             javax.servlet.http.HttpSession session = | ||||
|                     (javax.servlet.http.HttpSession) getExternalContext().getSession(true); | ||||
|             session.invalidate();             | ||||
|         } | ||||
|         catch(Exception ex){} | ||||
| 	    try { | ||||
| 		getExternalContext().redirect("Login.jsp"); | ||||
| 	    } catch(Exception e) {}         | ||||
|         //return "login";	
 | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkDataAcidente_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkNr_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkPor_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkNomeAcidentado_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkFase_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkDataAcidenteSeg_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkNrSeg_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkPorSeg_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkNomeAcidentadoSeg_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkFaseSeg_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public void drpAno_processValueChange(ValueChangeEvent event) { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|     } | ||||
| 
 | ||||
|     public void drpMes_processValueChange(ValueChangeEvent event) { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|     } | ||||
| 
 | ||||
|     public void drpDia_processValueChange(ValueChangeEvent event) { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|     } | ||||
| 
 | ||||
|     public String butPesquisar_action() { | ||||
|         // TODO: Process the button click action. Return value is a navigation
 | ||||
|         // case name where null will return to the same page.
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkDataConcluida_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkNrConcluida_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkPorConcluida_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkNomeConcluida_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkEstabConcluida_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
|      | ||||
|     private void fillTabelaEstados() | ||||
|     { | ||||
|         ArrayList list = new ArrayList(); | ||||
|         Correcao c = null; | ||||
|         int estado = getSessionBean1().getCurrentAnalise().getEstado().intValue(); | ||||
|          | ||||
|         switch(estado) | ||||
|         { | ||||
|             case Global.ESTADO_HS: | ||||
|                 c = new Correcao(); | ||||
|                 c.setCorrecao("y"); | ||||
|                 c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId()); | ||||
|                 c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado()); | ||||
|                 c.setEstado_corr(new Integer(Global.ESTADO_SEG)); | ||||
|                 c.setDescricao("FASE 1 - SEG - ABERTURA"); | ||||
|                 list.add(c); | ||||
|                 c = new Correcao(); | ||||
|                 c.setCorrecao("y");                 | ||||
|                 c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId());                 | ||||
|                 c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado());                 | ||||
|                 c.setEstado_corr(new Integer(Global.ESTADO_RH1)); | ||||
|                 c.setDescricao("FASE 2 - RH - ACOMPANHAMENTO"); | ||||
|                 list.add(c); | ||||
|                 getSessionBean1().getEstadosCorrecaoDataProvider().setList(list); | ||||
|                 break; | ||||
|             case Global.ESTADO_CONSOLIDACAO: | ||||
|                 c = new Correcao(); | ||||
|                 c.setCorrecao("y");                 | ||||
|                 c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId());                 | ||||
|                 c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado());                 | ||||
|                 c.setEstado_corr(new Integer(Global.ESTADO_RH2)); | ||||
|                 c.setDescricao("FASE 4 - RH - MEDIDAS + LESÃO"); | ||||
|                 list.add(c); | ||||
| //                c = new Correcao();
 | ||||
| //                c.setCorrecao("y");                
 | ||||
| //                c.setAnalise_id(getSessionBean1().getCurrentAnalise().getId());                
 | ||||
| //                c.setEstado_actual(getSessionBean1().getCurrentAnalise().getEstado());                
 | ||||
| //                c.setEstado_corr(new Integer(Global.ESTADO_MEDICINA));
 | ||||
| //                c.setDescricao("Medicina");
 | ||||
| //                list.add(c);
 | ||||
|                 getSessionBean1().getEstadosCorrecaoDataProvider().setList(list); | ||||
|                 break; | ||||
|         }         | ||||
|     } | ||||
| 
 | ||||
|     public String lnkEstadoCorr_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|         RowKey rk = tableRowGroup1.getRowKey(); | ||||
|         int k = Integer.parseInt(rk.getRowId());         | ||||
|         EstadosCorrecaoDataProvider provider = (EstadosCorrecaoDataProvider) tableRowGroup1.getSourceData(); | ||||
|         ArrayList list = (ArrayList) provider.getList(); | ||||
|         Correcao c = (Correcao)list.get(k); | ||||
|         c.setObservacoes(""); | ||||
|         if(txtObservacoes.getText() != null) | ||||
|         { | ||||
|             String obs = (String) txtObservacoes.getText(); | ||||
|             c.setObservacoes(obs);             | ||||
|         } | ||||
|         AnalisesDataProvider adp = new AnalisesDataProvider(); | ||||
|         try | ||||
|         { | ||||
|             adp.changeEstado(c); | ||||
|              | ||||
|         } | ||||
|         catch(Exception ex) | ||||
|         { | ||||
|             ex.printStackTrace(); | ||||
|         } | ||||
|         return "form_hs"; | ||||
|     } | ||||
| 
 | ||||
|     public String lnkNewUser_action() { | ||||
|         // TODO: Replace with your code
 | ||||
|          | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     public String butCancelar_action() { | ||||
|         // TODO: Process the button click action. Return value is a navigation
 | ||||
|         // case name where null will return to the same page.
 | ||||
|          | ||||
|         //return "form_hs";
 | ||||
|         return "analise_acidente";         | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| @ -0,0 +1,39 @@ | ||||
| /* | ||||
|  * Estado.java | ||||
|  * | ||||
|  * Created on November 29, 2007, 10:01 AM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class Estado { | ||||
|     private Integer estado; | ||||
|     private String descricao; | ||||
|     /** Creates a new instance of Estado */ | ||||
|     public Estado() { | ||||
|     } | ||||
| 
 | ||||
|     public Integer getEstado() { | ||||
|         return estado; | ||||
|     } | ||||
| 
 | ||||
|     public void setEstado(Integer estado) { | ||||
|         this.estado = estado; | ||||
|     } | ||||
| 
 | ||||
|     public String getDescricao() { | ||||
|         return descricao; | ||||
|     } | ||||
| 
 | ||||
|     public void setDescricao(String descricao) { | ||||
|         this.descricao = descricao; | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,176 @@ | ||||
| /* | ||||
|  * NewUser.java | ||||
|  * | ||||
|  * Created on December 4, 2007, 11:29 AM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class NewUser { | ||||
|     private Integer tipo; | ||||
|     private String tipo_descricao; | ||||
|     private String nome; | ||||
|     private Integer estabelecimento; | ||||
|     private String estabelecimento_descricao; | ||||
|     private String login; | ||||
|     private String password; | ||||
|     private String email; | ||||
|      | ||||
|     private String numero_mecanografico; | ||||
|     private Integer empresa_id; | ||||
|     private String numero_cedula; | ||||
|     private String cap; | ||||
|     private Integer funcionario_hst_id; | ||||
|     private Integer medico_id; | ||||
|     private String responsavel_loja; | ||||
|     private String gestor_geral; | ||||
|     private String activo; | ||||
|      | ||||
|     /** Creates a new instance of NewUser */ | ||||
|     public NewUser() { | ||||
|     } | ||||
| 
 | ||||
|     public Integer getTipo() { | ||||
|         return tipo; | ||||
|     } | ||||
| 
 | ||||
|     public void setTipo(Integer tipo) { | ||||
|         this.tipo = tipo; | ||||
|     } | ||||
| 
 | ||||
|     public String getTipo_descricao() { | ||||
|         return tipo_descricao; | ||||
|     } | ||||
| 
 | ||||
|     public void setTipo_descricao(String tipo_descricao) { | ||||
|         this.tipo_descricao = tipo_descricao; | ||||
|     } | ||||
| 
 | ||||
|     public String getNome() { | ||||
|         return nome; | ||||
|     } | ||||
| 
 | ||||
|     public void setNome(String nome) { | ||||
|         this.nome = nome; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getEstabelecimento() { | ||||
|         return estabelecimento; | ||||
|     } | ||||
| 
 | ||||
|     public void setEstabelecimento(Integer estabelecimento) { | ||||
|         this.estabelecimento = estabelecimento; | ||||
|     } | ||||
| 
 | ||||
|     public String getEstabelecimento_descricao() { | ||||
|         return estabelecimento_descricao; | ||||
|     } | ||||
| 
 | ||||
|     public void setEstabelecimento_descricao(String estabelecimento_descricao) { | ||||
|         this.estabelecimento_descricao = estabelecimento_descricao; | ||||
|     } | ||||
| 
 | ||||
|     public String getLogin() { | ||||
|         return login; | ||||
|     } | ||||
| 
 | ||||
|     public void setLogin(String login) { | ||||
|         this.login = login; | ||||
|     } | ||||
| 
 | ||||
|     public String getPassword() { | ||||
|         return password; | ||||
|     } | ||||
| 
 | ||||
|     public void setPassword(String password) { | ||||
|         this.password = password; | ||||
|     } | ||||
| 
 | ||||
|     public String getEmail() { | ||||
|         return email; | ||||
|     } | ||||
| 
 | ||||
|     public void setEmail(String email) { | ||||
|         this.email = email; | ||||
|     } | ||||
| 
 | ||||
|     public String getNumero_mecanografico() { | ||||
|         return numero_mecanografico; | ||||
|     } | ||||
| 
 | ||||
|     public void setNumero_mecanografico(String numero_mecanografico) { | ||||
|         this.numero_mecanografico = numero_mecanografico; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getEmpresa_id() { | ||||
|         return empresa_id; | ||||
|     } | ||||
| 
 | ||||
|     public void setEmpresa_id(Integer empresa_id) { | ||||
|         this.empresa_id = empresa_id; | ||||
|     } | ||||
| 
 | ||||
|     public String getNumero_cedula() { | ||||
|         return numero_cedula; | ||||
|     } | ||||
| 
 | ||||
|     public void setNumero_cedula(String numero_cedula) { | ||||
|         this.numero_cedula = numero_cedula; | ||||
|     } | ||||
| 
 | ||||
|     public String getCap() { | ||||
|         return cap; | ||||
|     } | ||||
| 
 | ||||
|     public void setCap(String cap) { | ||||
|         this.cap = cap; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getFuncionario_hst_id() { | ||||
|         return funcionario_hst_id; | ||||
|     } | ||||
| 
 | ||||
|     public void setFuncionario_hst_id(Integer funcionario_hst_id) { | ||||
|         this.funcionario_hst_id = funcionario_hst_id; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getMedico_id() { | ||||
|         return medico_id; | ||||
|     } | ||||
| 
 | ||||
|     public void setMedico_id(Integer medico_id) { | ||||
|         this.medico_id = medico_id; | ||||
|     } | ||||
| 
 | ||||
|     public String getResponsavel_loja() { | ||||
|         return responsavel_loja; | ||||
|     } | ||||
| 
 | ||||
|     public void setResponsavel_loja(String responsavel_loja) { | ||||
|         this.responsavel_loja = responsavel_loja; | ||||
|     } | ||||
| 
 | ||||
|     public String getActivo() { | ||||
|         return activo; | ||||
|     } | ||||
| 
 | ||||
|     public void setActivo(String activo) { | ||||
|         this.activo = activo; | ||||
|     } | ||||
| 
 | ||||
|     public String getGestor_geral() { | ||||
|         return gestor_geral; | ||||
|     } | ||||
| 
 | ||||
|     public void setGestor_geral(String gestor_geral) { | ||||
|         this.gestor_geral = gestor_geral; | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,58 @@ | ||||
| /* | ||||
|  * Seccao.java | ||||
|  * | ||||
|  * Created on December 28, 2007, 11:17 AM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package analiseacidentestrabalho; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class Seccao { | ||||
|     private Integer id; | ||||
|     private String descricao; | ||||
|     private Integer departamento_id; | ||||
|     private String activo; | ||||
|      | ||||
|     /** Creates a new instance of Seccao */ | ||||
|     public Seccao() { | ||||
|     } | ||||
| 
 | ||||
|     public Integer getId() { | ||||
|         return id; | ||||
|     } | ||||
| 
 | ||||
|     public void setId(Integer id) { | ||||
|         this.id = id; | ||||
|     } | ||||
| 
 | ||||
|     public String getDescricao() { | ||||
|         return descricao; | ||||
|     } | ||||
| 
 | ||||
|     public void setDescricao(String descricao) { | ||||
|         this.descricao = descricao; | ||||
|     } | ||||
| 
 | ||||
|     public Integer getDepartamento_id() { | ||||
|         return departamento_id; | ||||
|     } | ||||
| 
 | ||||
|     public void setDepartamento_id(Integer departamento_id) { | ||||
|         this.departamento_id = departamento_id; | ||||
|     } | ||||
| 
 | ||||
|     public String getActivo() { | ||||
|         return activo; | ||||
|     } | ||||
| 
 | ||||
|     public void setActivo(String activo) { | ||||
|         this.activo = activo; | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| /* | ||||
|  * EstadosCorrecaoDataProvider.java | ||||
|  * | ||||
|  * Created on November 29, 2007, 9:50 AM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package db; | ||||
| 
 | ||||
| import com.sun.data.provider.impl.ObjectListDataProvider; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class EstadosCorrecaoDataProvider extends ObjectListDataProvider  { | ||||
|      | ||||
|     /** Creates a new instance of EstadosCorrecaoDataProvider */ | ||||
|     public EstadosCorrecaoDataProvider() { | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| /* | ||||
|  * UtilizadoresListDataProvider.java | ||||
|  * | ||||
|  * Created on November 30, 2007, 2:51 PM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package db; | ||||
| 
 | ||||
| import com.sun.data.provider.impl.ObjectListDataProvider; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class UtilizadoresActivosListDataProvider extends ObjectListDataProvider  { | ||||
|      | ||||
|     /** Creates a new instance of UtilizadoresListDataProvider */ | ||||
|     public UtilizadoresActivosListDataProvider() { | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,24 @@ | ||||
| /* | ||||
|  * UtilizadoresInactivosListDataProvider.java | ||||
|  * | ||||
|  * Created on November 30, 2007, 4:48 PM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package db; | ||||
| 
 | ||||
| import com.sun.data.provider.impl.ObjectListDataProvider; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis | ||||
|  */ | ||||
| public class UtilizadoresInactivosListDataProvider extends ObjectListDataProvider  { | ||||
|      | ||||
|     /** Creates a new instance of UtilizadoresInactivosListDataProvider */ | ||||
|     public UtilizadoresInactivosListDataProvider() { | ||||
|     } | ||||
|      | ||||
| } | ||||
| @ -0,0 +1,97 @@ | ||||
| /* | ||||
|  * Global.java | ||||
|  * | ||||
|  * Created on November 23, 2007, 10:08 AM | ||||
|  * | ||||
|  * To change this template, choose Tools | Template Manager | ||||
|  * and open the template in the editor. | ||||
|  */ | ||||
| 
 | ||||
| package global; | ||||
| 
 | ||||
| import java.io.File; | ||||
| import java.io.FileInputStream; | ||||
| import java.io.FileOutputStream; | ||||
| import java.io.InputStream; | ||||
| import java.io.OutputStream; | ||||
| 
 | ||||
| /** | ||||
|  * | ||||
|  * @author lluis2 | ||||
|  */ | ||||
| public class Global { | ||||
|     public final static int ESTADO_SEG = 1; | ||||
|     public final static int ESTADO_RH1 = 2;     | ||||
|     public final static int ESTADO_HS = 3;      | ||||
|     public final static int ESTADO_RH2 = 4;   | ||||
|     //public final static int ESTADO_MEDICINA = 5;      
 | ||||
|     public final static int ESTADO_CONSOLIDACAO = 5;           | ||||
|     //public final static int ESTADO_ASSINATURAS = 7;            
 | ||||
|     public final static int ESTADO_ASSINATURA_SEG = 6;         | ||||
|     public final static int ESTADO_ASSINATURA_RH = 7;             | ||||
|     //public final static int ESTADO_IMPRESSAO = 8;        
 | ||||
|     public final static int ESTADO_FECHAR = 8;         | ||||
|     public final static int ESTADO_CONCLUIDO = 9;   | ||||
|      | ||||
|      | ||||
|     public final static int ESTADO_ASSINATURA_1 = 1;             | ||||
|     public final static int ESTADO_ASSINATURA_2 = 2;                 | ||||
|     public final static int ESTADO_ASSINATURA_3 = 3;  | ||||
|      | ||||
|     public final static int TIPO_UTILIZADOR_SEGURANCA = 1; | ||||
|     public final static int TIPO_UTILIZADOR_RH = 2;     | ||||
|     public final static int TIPO_UTILIZADOR_HS = 3;     | ||||
|     public final static int TIPO_UTILIZADOR_MEDICO = 5;     | ||||
|     public final static int TIPO_UTILIZADOR_GESTOR = 6;     | ||||
|     public final static int TIPO_UTILIZADOR_DIRECTOR_GERAL_RH = 7;     | ||||
|     public final static int TIPO_UTILIZADOR_DIRECTOR_SIPRP = 8;  | ||||
|      | ||||
|     public final static int AUCHAN = 32;  | ||||
|      | ||||
|      | ||||
|     public final static String SERVIDOR_SMTP = "smtp.netcabo.pt"; | ||||
|     public final static String SERVIDOR_SMTP_PASSWORD = "EVOLUTE";     | ||||
|     public final static String ENDERECO_ENVIO = "acidentes.auchan@siprp.pt"; | ||||
|      | ||||
|     public final static String IMAGE_FOLDER = "/home/siprp/imagens_acidentes";     | ||||
|     //public final static String IMAGE_FOLDER = "/home/lluis/imagens_acidentes";        
 | ||||
|     public final static String RESOURCES_IMAGE_FOLDER = "/resources/images";        | ||||
|     /** Creates a new instance of Global */ | ||||
|     public Global() { | ||||
|     } | ||||
|      | ||||
|     public void copyImage(File fSource, File fDest) | ||||
|     { | ||||
|         try | ||||
|         { | ||||
|             InputStream in = new FileInputStream(fSource); | ||||
|             OutputStream out = new FileOutputStream(fDest); | ||||
| 
 | ||||
|             // Transfer bytes from in to out
 | ||||
|             byte[] buf = new byte[1024]; | ||||
|             int len; | ||||
|             while ((len = in.read(buf)) > 0) { | ||||
|                 out.write(buf, 0, len); | ||||
|             } | ||||
|             in.close(); | ||||
|             out.close();                     | ||||
|         } | ||||
|         catch(Exception ex) | ||||
|         { | ||||
|             ex.printStackTrace(); | ||||
|         } | ||||
|     } | ||||
|      | ||||
|     public void deleteFolderFiles(File folder) | ||||
|     { | ||||
|         File files[] = folder.listFiles(); | ||||
|         for(int i=0;i<files.length;i++)   | ||||
|         { | ||||
|             if(files[i].isFile()) | ||||
|             { | ||||
|                 files[i].delete(); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|      | ||||
| } | ||||
| After Width: | Height: | Size: 2.9 KiB | 
| After Width: | Height: | Size: 11 KiB | 
| After Width: | Height: | Size: 1.4 KiB | 
| After Width: | Height: | Size: 5.8 KiB | 
| After Width: | Height: | Size: 6.0 KiB | 
| After Width: | Height: | Size: 5.3 KiB | 
| After Width: | Height: | Size: 6.0 KiB | 
| After Width: | Height: | Size: 6.2 KiB | 
| After Width: | Height: | Size: 5.8 KiB | 
| After Width: | Height: | Size: 6.3 KiB | 
| After Width: | Height: | Size: 6.3 KiB | 
| After Width: | Height: | Size: 6.0 KiB | 
| After Width: | Height: | Size: 6.7 KiB | 
| After Width: | Height: | Size: 7.4 KiB | 
| After Width: | Height: | Size: 4.2 KiB | 
| After Width: | Height: | Size: 431 B |