KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > data > beans > RequestBean


1 package org.jahia.data.beans;
2
3 import org.jahia.gui.GuiBean;
4 import org.jahia.params.ParamBean;
5
6 /**
7  * <p>Title: This bean contains request contextual attributes</p>
8  * <p>Description: This is mostly a wrapper for GuiBean methods, and offers
9  * functionality close to the what the ParamBean offers, but in a 100% JavaBean
10  * compliant API.</p>
11  * <p>Copyright: Copyright (c) 2002</p>
12  * <p>Company: Jahia Ltd</p>
13  * @author Serge Huber
14  * @version 1.0
15  */

16
17 public class RequestBean {
18
19     private static org.apache.log4j.Logger logger =
20         org.apache.log4j.Logger.getLogger(PageBean.class);
21
22     private GuiBean guiBean;
23     private ParamBean paramBean;
24
25     public RequestBean () {
26     }
27
28     public RequestBean (GuiBean guiBean, ParamBean paramBean) {
29         this.guiBean = guiBean;
30         this.paramBean = paramBean;
31     }
32
33     public boolean isEditMode () {
34         return guiBean.isEditMode();
35     }
36
37     public boolean isNormalMode () {
38         return guiBean.isNormalMode();
39     }
40
41     public boolean isCompareMode () {
42         return guiBean.isCompareMode();
43     }
44
45     public boolean isPreviewMode () {
46         return guiBean.isPreviewMode();
47     }
48
49     public boolean isLogged () {
50         return guiBean.isLogged();
51     }
52
53     public boolean isNS () {
54         return guiBean.isNS(paramBean.getRequest());
55     }
56
57     public boolean isNS4 () {
58         return guiBean.isNS4(paramBean.getRequest());
59     }
60
61     public boolean isNS6 () {
62         return guiBean.isNS6(paramBean.getRequest());
63     }
64
65     public boolean isIE () {
66         return guiBean.isIE(paramBean.getRequest());
67     }
68
69     public boolean isIE4 () {
70         return guiBean.isIE4(paramBean.getRequest());
71     }
72
73     public boolean isIE5 () {
74         return guiBean.isIE5(paramBean.getRequest());
75     }
76
77     public boolean isIE6 () {
78         return guiBean.isIE6(paramBean.getRequest());
79     }
80
81     public boolean isWindows () {
82         return guiBean.isWindow(paramBean.getRequest());
83     }
84
85     public boolean isX11 () {
86         return guiBean.isUnix(paramBean.getRequest());
87     }
88
89     public boolean isMac () {
90         return guiBean.isMac(paramBean.getRequest());
91     }
92
93     public ParamBean getParamBean() {
94         return paramBean;
95     }
96
97 }
Popular Tags