Search in sources :

Example 1 with BridgeNotAFacesRequestException

use of javax.portlet.faces.BridgeNotAFacesRequestException in project liferay-faces-bridge-impl by liferay.

the class BridgeImpl method doFacesRequest.

@Override
public void doFacesRequest(RenderRequest renderRequest, RenderResponse renderResponse) throws BridgeDefaultViewNotSpecifiedException, BridgeUninitializedException, BridgeException {
    checkNull(renderRequest, renderResponse);
    if (initialized) {
        String nonFacesTargetPath = renderRequest.getParameter(Bridge.NONFACES_TARGET_PATH_PARAMETER);
        if (nonFacesTargetPath != null) {
            throw new BridgeNotAFacesRequestException(nonFacesTargetPath);
        }
        PortletConfig wrappedPortletConfig = BridgePortletConfigFactory.getPortletConfigInstance(portletConfig);
        BridgeConfig bridgeConfig = BridgeConfigFactory.getBridgeConfigInstance(wrappedPortletConfig);
        BridgePhase bridgePhase = new BridgePhaseRenderImpl(renderRequest, renderResponse, wrappedPortletConfig, bridgeConfig);
        bridgePhase.execute();
    } else {
        throw new BridgeUninitializedException();
    }
}
Also used : PortletConfig(javax.portlet.PortletConfig) BridgeNotAFacesRequestException(javax.portlet.faces.BridgeNotAFacesRequestException) BridgeConfig(javax.portlet.faces.BridgeConfig) BridgeUninitializedException(javax.portlet.faces.BridgeUninitializedException)

Example 2 with BridgeNotAFacesRequestException

use of javax.portlet.faces.BridgeNotAFacesRequestException in project liferay-faces-bridge-impl by liferay.

the class BridgeImpl method doFacesRequest.

@Override
public void doFacesRequest(EventRequest eventRequest, EventResponse eventResponse) throws BridgeUninitializedException, BridgeException {
    checkNull(eventRequest, eventResponse);
    if (initialized) {
        String nonFacesTargetPath = eventRequest.getParameter(Bridge.NONFACES_TARGET_PATH_PARAMETER);
        if (nonFacesTargetPath != null) {
            throw new BridgeNotAFacesRequestException(nonFacesTargetPath);
        }
        PortletConfig wrappedPortletConfig = BridgePortletConfigFactory.getPortletConfigInstance(portletConfig);
        BridgeConfig bridgeConfig = BridgeConfigFactory.getBridgeConfigInstance(wrappedPortletConfig);
        BridgePhase bridgePhase = new BridgePhaseEventImpl(eventRequest, eventResponse, wrappedPortletConfig, bridgeConfig);
        bridgePhase.execute();
    } else {
        throw new BridgeUninitializedException();
    }
}
Also used : PortletConfig(javax.portlet.PortletConfig) BridgeNotAFacesRequestException(javax.portlet.faces.BridgeNotAFacesRequestException) BridgeConfig(javax.portlet.faces.BridgeConfig) BridgeUninitializedException(javax.portlet.faces.BridgeUninitializedException)

Example 3 with BridgeNotAFacesRequestException

use of javax.portlet.faces.BridgeNotAFacesRequestException in project liferay-faces-bridge-impl by liferay.

the class BridgeImpl method doFacesRequest.

@Override
public void doFacesRequest(ActionRequest actionRequest, ActionResponse actionResponse) throws BridgeDefaultViewNotSpecifiedException, BridgeUninitializedException, BridgeException {
    checkNull(actionRequest, actionResponse);
    if (initialized) {
        String nonFacesTargetPath = actionRequest.getParameter(Bridge.NONFACES_TARGET_PATH_PARAMETER);
        if (nonFacesTargetPath != null) {
            throw new BridgeNotAFacesRequestException(nonFacesTargetPath);
        }
        PortletConfig wrappedPortletConfig = BridgePortletConfigFactory.getPortletConfigInstance(portletConfig);
        BridgeConfig bridgeConfig = BridgeConfigFactory.getBridgeConfigInstance(wrappedPortletConfig);
        BridgePhase bridgePhase = new BridgePhaseActionImpl(actionRequest, actionResponse, wrappedPortletConfig, bridgeConfig);
        bridgePhase.execute();
    } else {
        throw new BridgeUninitializedException();
    }
}
Also used : PortletConfig(javax.portlet.PortletConfig) BridgeNotAFacesRequestException(javax.portlet.faces.BridgeNotAFacesRequestException) BridgeConfig(javax.portlet.faces.BridgeConfig) BridgeUninitializedException(javax.portlet.faces.BridgeUninitializedException)

Aggregations

PortletConfig (javax.portlet.PortletConfig)3 BridgeConfig (javax.portlet.faces.BridgeConfig)3 BridgeNotAFacesRequestException (javax.portlet.faces.BridgeNotAFacesRequestException)3 BridgeUninitializedException (javax.portlet.faces.BridgeUninitializedException)3