01: /* PortletServletDispatcher.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Fri Jul 7 12:35:32 2006, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2006 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.web.portlet;
20:
21: import javax.portlet.PortletRequestDispatcher;
22:
23: import javax.servlet.RequestDispatcher;
24: import javax.servlet.ServletException;
25: import javax.servlet.ServletRequest;
26: import javax.servlet.ServletResponse;
27:
28: /**
29: * A facade of a PortletRequestDispatch for implementing RequestDispatcher.
30: *
31: * @author tomyeh
32: */
33: public class PortletServletDispatcher implements RequestDispatcher {
34: private final PortletRequestDispatcher _rd;
35:
36: /** Returns a facade instance for the specified dispatcher. */
37: public static final RequestDispatcher getInstance(
38: PortletRequestDispatcher rd) {
39: if (rd instanceof RequestDispatcher)
40: return (RequestDispatcher) rd;
41: return new PortletServletDispatcher(rd);
42: }
43:
44: private PortletServletDispatcher(PortletRequestDispatcher rd) {
45: if (rd == null)
46: throw new IllegalArgumentException("null");
47: _rd = rd;
48: }
49:
50: //RequestDispatcher//
51: public void forward(ServletRequest request, ServletResponse response)
52: throws ServletException, java.io.IOException {
53: throw new UnsupportedOperationException();
54: }
55:
56: public void include(ServletRequest request, ServletResponse response)
57: throws ServletException, java.io.IOException {
58: throw new UnsupportedOperationException(); //TODO
59: }
60: }
|