1
2
3
4
5
6
7
8 package com.buckosoft.BSAccount.domain;
9
10
11 import java.io.Serializable;
12
13 import javax.servlet.http.HttpServletRequest;
14
15
16
17
18
19 public class BSAccountUserWebSession implements Serializable {
20 private static final long serialVersionUID = 1L;
21
22 private BSAccountUser bsuser;
23
24 public BSAccountUserWebSession() {}
25
26
27
28
29 public BSAccountUserWebSession(BSAccountUser bsuser) {
30 this.bsuser = bsuser;
31 }
32
33
34
35
36 public BSAccountUser getUser() {
37 return bsuser;
38 }
39
40 public void setUser(BSAccountUser bsAccountUser) {
41 this.bsuser = bsAccountUser;
42 }
43
44
45
46
47 public boolean isLoggedIn() {
48 if (this.bsuser == null)
49 return(false);
50 return(bsuser.isRegisteredUser());
51 }
52
53
54
55
56
57 public static boolean isWapDevice(HttpServletRequest request) {
58 if (request.getParameter("x-wap_profile") != null)
59 return(true);
60 return(false);
61 }
62
63 }