01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.pluto.driver.portlets;
18:
19: import java.io.IOException;
20:
21: import javax.portlet.GenericPortlet;
22: import javax.portlet.PortletContext;
23: import javax.portlet.PortletException;
24: import javax.portlet.PortletRequestDispatcher;
25: import javax.portlet.RenderRequest;
26: import javax.portlet.RenderResponse;
27:
28: /**
29: * The pluto portal driver about portlet.
30: * @since 2006-02-09
31: */
32: public class AboutPortlet extends GenericPortlet {
33:
34: private static final String VIEW_PAGE = "/WEB-INF/fragments/about/view.jsp";
35: private static final String EDIT_PAGE = "/WEB-INF/fragments/about/edit.jsp";
36: private static final String HELP_PAGE = "/WEB-INF/fragments/about/help.jsp";
37:
38: // GenericPortlet Impl -----------------------------------------------------
39:
40: public void doView(RenderRequest request, RenderResponse response)
41: throws PortletException, IOException {
42: PortletContext context = getPortletContext();
43: PortletRequestDispatcher requestDispatcher = context
44: .getRequestDispatcher(VIEW_PAGE);
45: requestDispatcher.include(request, response);
46: }
47:
48: protected void doEdit(RenderRequest request, RenderResponse response)
49: throws PortletException, IOException {
50: PortletContext context = getPortletContext();
51: PortletRequestDispatcher requestDispatcher = context
52: .getRequestDispatcher(EDIT_PAGE);
53: requestDispatcher.include(request, response);
54: }
55:
56: protected void doHelp(RenderRequest request, RenderResponse response)
57: throws PortletException, IOException {
58: PortletContext context = getPortletContext();
59: PortletRequestDispatcher requestDispatcher = context
60: .getRequestDispatcher(HELP_PAGE);
61: requestDispatcher.include(request, response);
62: }
63:
64: }
|