1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet;
16  
17  import com.liferay.portal.model.Portlet;
18  
19  import javax.portlet.PortletContext;
20  import javax.portlet.PortletMode;
21  import javax.portlet.PortletPreferences;
22  import javax.portlet.WindowState;
23  
24  import javax.servlet.http.HttpServletRequest;
25  
26  /**
27   * <a href="RenderRequestFactory.java.html"><b><i>View Source</i></b></a>
28   *
29   * @author Brian Wing Shun Chan
30   */
31  public class RenderRequestFactory {
32  
33      public static RenderRequestImpl create(
34              HttpServletRequest request, Portlet portlet,
35              InvokerPortlet invokerPortlet, PortletContext portletContext,
36              WindowState windowState, PortletMode portletMode,
37              PortletPreferences preferences)
38          throws Exception {
39  
40          return create(
41              request, portlet, invokerPortlet, portletContext, windowState,
42              portletMode, preferences, 0);
43      }
44  
45      public static RenderRequestImpl create(
46              HttpServletRequest request, Portlet portlet,
47              InvokerPortlet invokerPortlet, PortletContext portletContext,
48              WindowState windowState, PortletMode portletMode,
49              PortletPreferences preferences, long plid)
50          throws Exception {
51  
52          RenderRequestImpl renderRequestImpl = new RenderRequestImpl();
53  
54          renderRequestImpl.init(
55              request, portlet, invokerPortlet, portletContext, windowState,
56              portletMode, preferences, plid);
57  
58          return renderRequestImpl;
59      }
60  
61  }