001    /**
002     * Copyright (c) 2000-2013 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            @Override
034            public void render(
035                            RenderRequest renderRequest, RenderResponse renderResponse)
036                    throws IOException, PortletException {
037    
038                    PortletContext portletContext = getPortletContext();
039    
040                    PortletRequestDispatcher portletRequestDispatcher =
041                            portletContext.getRequestDispatcher(_JSP_IFRAME);
042    
043                    portletRequestDispatcher.include(renderRequest, renderResponse);
044            }
045    
046            private static final String _JSP_DIR = "/WEB-INF/jsp/liferay/wai";
047    
048            private static final String _JSP_IFRAME = _JSP_DIR + "/iframe.jsp";
049    
050    }