Last change
on this file since 68 was
68,
checked in by cbipsl, 14 years ago
|
commit v1 eccad
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | package org.medias.eccad.presentation.bean; |
---|
2 | |
---|
3 | import javax.faces.context.FacesContext; |
---|
4 | import javax.servlet.http.HttpSession; |
---|
5 | |
---|
6 | import org.medias.eccad.helpers.InfoConfigVisu; |
---|
7 | |
---|
8 | public class SessionBean { |
---|
9 | private String email = null; |
---|
10 | private Boolean extract = null; |
---|
11 | |
---|
12 | public SessionBean() { |
---|
13 | extract = InfoConfigVisu.getExtraction(); |
---|
14 | email = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("login"); |
---|
15 | } |
---|
16 | |
---|
17 | public String getEmail() { |
---|
18 | if (email == null || email =="") |
---|
19 | email = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("login"); |
---|
20 | return email; |
---|
21 | } |
---|
22 | |
---|
23 | public void setEmail(String nemail) { |
---|
24 | email = nemail; |
---|
25 | if (email == null || email =="") { |
---|
26 | email = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("login"); |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | public String getDisconnect() { |
---|
31 | email = null; |
---|
32 | ((HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false)).invalidate(); |
---|
33 | return "You have been disconnected"; |
---|
34 | } |
---|
35 | |
---|
36 | public void setDisconnect(String value) { |
---|
37 | |
---|
38 | } |
---|
39 | |
---|
40 | public Boolean getExtract() { |
---|
41 | return extract; |
---|
42 | } |
---|
43 | |
---|
44 | public void setExtract(Boolean extract) { |
---|
45 | this.extract = extract; |
---|
46 | } |
---|
47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.