Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2679

Add BridgePortletRequestFactory and BridgePortletResponseFactory to the Bridge API

    Details

      Description

      Over the years we have found it to be necessary to have request/response extension points for supporting different portlet containers.

      This task serves as a proposal for promoting com.liferay.faces.bridge.filter.BridgePortletRequestFactory and com.liferay.faces.bridge.filter.BridgePortletResponseFactory to the javax.portlet.faces.filter pacakge in the Bridge API:

      BridgePortletRequestFactory.java
      package javax.portlet.faces.filter;
      
      public abstract class BridgePortletRequestFactory implements FacesWrapper<BridgePortletRequestFactory> {
      
      	// Also include corresponding static getActionRequestInstance(...) method
      	public abstract ActionRequest getActionRequest(ActionRequest actionRequest, ActionResponse actionResponse,
      		PortletConfig portletConfig, BridgeConfig bridgeConfig);
      
      	// Also include corresponding static getEventRequest(...) method
      	public abstract EventRequest getEventRequest(EventRequest eventRequest, EventResponse eventResponse,
      		PortletConfig portletConfig, BridgeConfig bridgeConfig);
      
      	// Also include corresponding static getRenderRequest(...) method
      	public abstract RenderRequest getRenderRequest(RenderRequest renderRequest, RenderResponse renderResponse,
      		PortletConfig portletConfig, BridgeConfig bridgeConfig);
      
      	// Also include corresponding static getResourceRequest(...) method
      	public abstract ResourceRequest getResourceRequest(ResourceRequest resourceRequest,
      		ResourceResponse resourceResponse, PortletConfig portletConfig, BridgeConfig bridgeConfig);
      }
      
      BridgePortletResponseFactory.java
      package javax.portlet.faces.filter;
      
      public abstract class BridgePortletResponseFactory implements FacesWrapper<BridgePortletResponseFactory> {
      
      	// Also include corresponding static getActionResponseInstance(...) method
      	public abstract ActionResponse getActionResponse(ActionRequest actionRequest, ActionResponse actionResponse,
      		PortletConfig portletConfig, BridgeConfig bridgeConfig);
      
      	// Also include corresponding static getEventResponseInstance(...) method
      	public abstract EventResponse getEventResponse(EventRequest eventRequest, EventResponse eventResponse,
      		PortletConfig portletConfig, BridgeConfig bridgeConfig);
      
      	// Also include corresponding static getRenderResponseInstance(...) method
      	public abstract RenderResponse getRenderResponse(RenderRequest renderRequest, RenderResponse renderResponse,
      		PortletConfig portletConfig, BridgeConfig bridgeConfig);
      
      	// Also include corresponding static getResourceResponseInstance(...) method
      	public abstract ResourceResponse getResourceResponse(ResourceRequest resourceRequest,
      		ResourceResponse resourceResponse, PortletConfig portletConfig, BridgeConfig bridgeConfig);
      }
      

      In addition, the Spec will require that the factory delegation chain pattern be supported by bridge implementations. As a matter of convenience to the portlet developer, it is best to use a zero-config mechanism for registering factories, so the bridge implementation must recognize the bridge:bridge-portlet-request-factory and bridge:bridge-portlet-response-factory elements as children of the factory-extension element of faces-config.xml descriptors.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: