001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.util.bridges.wai;
016    
017    import com.liferay.portal.kernel.portlet.LiferayPortlet;
018    
019    import java.io.IOException;
020    
021    import javax.portlet.PortletContext;
022    import javax.portlet.PortletException;
023    import javax.portlet.PortletRequestDispatcher;
024    import javax.portlet.RenderRequest;
025    import javax.portlet.RenderResponse;
026    
027    /**
028     * @author Jorge Ferrer
029     * @author Connor McKay
030     */
031    public class WAIPortlet extends LiferayPortlet {
032    
033            public void render(
034                            RenderRequest renderRequest, RenderResponse renderResponse)
035                    throws IOException, PortletException {
036    
037                    PortletContext portletContext = getPortletContext();
038    
039                    PortletRequestDispatcher portletRequestDispatcher =
040                            portletContext.getRequestDispatcher(_JSP_IFRAME);
041    
042                    portletRequestDispatcher.include(renderRequest, renderResponse);
043            }
044    
045            private static final String _JSP_DIR = "/WEB-INF/jsp/liferay/wai";
046    
047            private static final String _JSP_IFRAME = _JSP_DIR + "/iframe.jsp";
048    
049    }