1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.pluto.driver.services.container;
18
19 import javax.servlet.http.HttpServletRequest;
20 import javax.servlet.http.HttpServletResponse;
21
22 import org.apache.pluto.container.PortletActionResponseContext;
23 import org.apache.pluto.container.PortletContainer;
24 import org.apache.pluto.container.PortletEventResponseContext;
25 import org.apache.pluto.container.PortletRenderResponseContext;
26 import org.apache.pluto.container.PortletRequestContext;
27 import org.apache.pluto.container.PortletRequestContextService;
28 import org.apache.pluto.container.PortletResourceRequestContext;
29 import org.apache.pluto.container.PortletResourceResponseContext;
30 import org.apache.pluto.container.PortletWindow;
31
32
33
34
35
36 public class PortletRequestContextServiceImpl implements PortletRequestContextService
37 {
38 public PortletRequestContext getPortletActionRequestContext(PortletContainer container, HttpServletRequest containerRequest,
39 HttpServletResponse containerResponse, PortletWindow window)
40 {
41 return new PortletRequestContextImpl(container, containerRequest, containerResponse, window, true);
42 }
43
44 public PortletActionResponseContext getPortletActionResponseContext(PortletContainer container,
45 HttpServletRequest containerRequest,
46 HttpServletResponse containerResponse,
47 PortletWindow window)
48 {
49 return new PortletActionResponseContextImpl(container, containerRequest, containerResponse, window);
50 }
51
52 public PortletRequestContext getPortletEventRequestContext(PortletContainer container, HttpServletRequest containerRequest,
53 HttpServletResponse containerResponse, PortletWindow window)
54 {
55 return new PortletRequestContextImpl(container, containerRequest, containerResponse, window, true);
56
57 }
58
59 public PortletEventResponseContext getPortletEventResponseContext(PortletContainer container,
60 HttpServletRequest containerRequest,
61 HttpServletResponse containerResponse, PortletWindow window)
62 {
63 return new PortletEventResponseContextImpl(container, containerRequest, containerResponse, window);
64 }
65
66 public PortletRequestContext getPortletRenderRequestContext(PortletContainer container, HttpServletRequest containerRequest,
67 HttpServletResponse containerResponse, PortletWindow window)
68 {
69
70 return new PortletRequestContextImpl(container, containerRequest, containerResponse, window, true);
71 }
72
73 public PortletRenderResponseContext getPortletRenderResponseContext(PortletContainer container,
74 HttpServletRequest containerRequest,
75 HttpServletResponse containerResponse,
76 PortletWindow window)
77 {
78 return new PortletRenderResponseContextImpl(container, containerRequest, containerResponse, window);
79 }
80
81 public PortletResourceRequestContext getPortletResourceRequestContext(PortletContainer container,
82 HttpServletRequest containerRequest,
83 HttpServletResponse containerResponse,
84 PortletWindow window)
85 {
86 return new PortletResourceRequestContextImpl(container, containerRequest, containerResponse, window);
87 }
88
89 public PortletResourceResponseContext getPortletResourceResponseContext(PortletContainer container,
90 HttpServletRequest containerRequest,
91 HttpServletResponse containerResponse,
92 PortletWindow window)
93 {
94 return new PortletResourceResponseContextImpl(container, containerRequest, containerResponse, window);
95 }
96 }