001
014
015 package com.liferay.util.bridges.jsf.myfaces;
016
017 import javax.faces.context.ResponseWriter;
018
019 import javax.portlet.PortletContext;
020 import javax.portlet.PortletRequest;
021 import javax.portlet.PortletResponse;
022
023 import org.apache.myfaces.context.ReleaseableExternalContext;
024 import org.apache.myfaces.context.servlet.ServletFacesContextImpl;
025
026
029 public class MyFacesContextImpl extends ServletFacesContextImpl {
030
031 public MyFacesContextImpl(PortletContext portletContext,
032 PortletRequest portletRequest,
033 PortletResponse portletResponse) {
034
035 super(portletContext, portletRequest, portletResponse);
036 }
037
038 public void setResponseWriter(ResponseWriter responseWriter) {
039 if (responseWriter == null) {
040 throw new NullPointerException("responseWriter");
041 }
042
043 _responseWriter = responseWriter;
044 }
045
046 public ResponseWriter getResponseWriter() {
047 return _responseWriter;
048 }
049
050 public void release() {
051 super.release();
052
053 _responseWriter = null;
054 }
055
056 public void setExternalContext(ReleaseableExternalContext extContext) {
057 _responseWriter = null;
058
059 super.setExternalContext(extContext);
060 }
061
062 private ResponseWriter _responseWriter = null;
063
064 }