use of javax.portlet.faces.BridgeUninitializedException in project liferay-faces-bridge-impl by liferay.
the class BridgeImpl method doFacesRequest.
@Override
public void doFacesRequest(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws BridgeUninitializedException, BridgeException {
checkNull(resourceRequest, resourceResponse);
if (initialized) {
PortletConfig wrappedPortletConfig = BridgePortletConfigFactory.getPortletConfigInstance(portletConfig);
BridgeConfig bridgeConfig = BridgeConfigFactory.getBridgeConfigInstance(wrappedPortletConfig);
BridgePhase bridgePhase = new BridgePhaseResourceImpl(resourceRequest, resourceResponse, wrappedPortletConfig, bridgeConfig);
bridgePhase.execute();
} else {
throw new BridgeUninitializedException();
}
}
use of javax.portlet.faces.BridgeUninitializedException in project liferay-faces-bridge-impl by liferay.
the class BridgeCompatImpl method doFacesRequest.
@Override
public void doFacesRequest(HeaderRequest headerRequest, HeaderResponse headerResponse) throws BridgeDefaultViewNotSpecifiedException, BridgeUninitializedException, BridgeException {
checkNull(headerRequest, headerResponse);
if (isInitialized()) {
PortletConfig wrappedPortletConfig = BridgePortletConfigFactory.getPortletConfigInstance(getPortletConfig());
BridgeConfig bridgeConfig = BridgeConfigFactory.getBridgeConfigInstance(wrappedPortletConfig);
BridgePhase bridgePhase = new BridgePhaseHeaderImpl(headerRequest, headerResponse, wrappedPortletConfig, bridgeConfig);
bridgePhase.execute();
} else {
throw new BridgeUninitializedException();
}
}
use of javax.portlet.faces.BridgeUninitializedException in project liferay-faces-bridge-impl by liferay.
the class BridgeDestroyTestPortlet method runActionDestroyTest.
private void runActionDestroyTest(ActionRequest request, ActionResponse response) throws PortletException, IOException {
BridgeTCKResultWriter resultWriter = new BridgeTCKResultWriter(DESTROY_ACTION_TEST);
// Run test
Bridge bridge = getFacesBridge(request, response);
bridge.destroy();
try {
bridge.doFacesRequest(request, response);
resultWriter.setStatus(BridgeTCKResultWriter.FAIL);
resultWriter.setDetail("Didn't throw the BridgeUninitializedException from doFacesRequest(action) when passed a destroyed bridge. Instead the request completed without an exception.");
} catch (BridgeUninitializedException bue) {
resultWriter.setStatus(BridgeTCKResultWriter.PASS);
resultWriter.setDetail("Correctly threw BridgeUninitializedException from doFacesRequest(action) when passed a destroyed bridge.");
} catch (Exception e) {
resultWriter.setStatus(BridgeTCKResultWriter.FAIL);
resultWriter.setDetail("Didn't throw the BridgeUninitializedException from doFacesRequest(action) when passed a destroyed bridge. Instead it threw: " + e.toString());
}
mActionResult = resultWriter.toString();
}
use of javax.portlet.faces.BridgeUninitializedException 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();
}
}
use of javax.portlet.faces.BridgeUninitializedException 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();
}
}
Aggregations