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.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.model.Layout;
20  import com.liferay.portal.model.User;
21  
22  import javax.portlet.EventRequest;
23  import javax.portlet.EventResponse;
24  import javax.portlet.PortletModeException;
25  import javax.portlet.PortletRequest;
26  import javax.portlet.WindowStateException;
27  
28  import javax.servlet.http.HttpServletResponse;
29  
30  /**
31   * <a href="EventResponseImpl.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   */
35  public class EventResponseImpl
36      extends StateAwareResponseImpl implements EventResponse {
37  
38      public String getLifecycle() {
39          return PortletRequest.EVENT_PHASE;
40      }
41  
42      public void setRenderParameters(EventRequest eventRequest) {
43      }
44  
45      protected EventResponseImpl() {
46          if (_log.isDebugEnabled()) {
47              _log.debug("Creating new instance " + hashCode());
48          }
49      }
50  
51      protected void init(
52              PortletRequestImpl portletRequestImpl, HttpServletResponse response,
53              String portletName, User user, Layout layout)
54          throws PortletModeException, WindowStateException {
55  
56          init(
57              portletRequestImpl, response, portletName, user, layout, null,
58              null);
59      }
60  
61      protected void recycle() {
62          if (_log.isDebugEnabled()) {
63              _log.debug("Recycling instance " + hashCode());
64          }
65  
66          super.recycle();
67      }
68  
69      private static Log _log = LogFactoryUtil.getLog(EventResponseImpl.class);
70  
71  }