use of javax.portlet.PortalContext in project liferay-faces-bridge-impl by liferay.
the class ResourceHandlerBridgeImpl method isAbleToSetHttpStatusCode.
private boolean isAbleToSetHttpStatusCode(FacesContext facesContext) {
ExternalContext externalContext = facesContext.getExternalContext();
PortletRequest portletRequest = (PortletRequest) externalContext.getRequest();
PortalContext portalContext = portletRequest.getPortalContext();
String setHttpStatusCodeSupport = portalContext.getProperty(BridgePortalContext.SET_HTTP_STATUS_CODE_SUPPORT);
return (setHttpStatusCodeSupport != null);
}
use of javax.portlet.PortalContext in project liferay-faces-bridge-impl by liferay.
the class ExternalContextCompat_2_0_Impl method setResponseBufferSize.
/**
* @see ExternalContext#setResponseBufferSize(int)
* @since JSF 2.0
*/
@Override
public void setResponseBufferSize(int size) {
if (portletResponse instanceof ResourceResponse) {
PortalContext portalContext = portletRequest.getPortalContext();
String setResponseBufferSizeSupport = portalContext.getProperty(BridgePortalContext.SET_RESOURCE_RESPONSE_BUFFER_SIZE_SUPPORT);
if (setResponseBufferSizeSupport != null) {
ResourceResponse resourceResponse = (ResourceResponse) portletResponse;
resourceResponse.setBufferSize(size);
}
} else {
if (manageIncongruities) {
incongruityContext.setResponseBufferSize(size);
} else {
throw new IllegalStateException();
}
}
}
use of javax.portlet.PortalContext in project liferay-faces-bridge-impl by liferay.
the class BridgePortalContextAjaxRequestTest method testBridgePortalContextAjaxRequest.
@Test
public void testBridgePortalContextAjaxRequest() {
boolean markupHeadElementSupport = true;
boolean ajaxRequest = true;
PortalContext portalContextBridgeImpl = new PortalContextBridgeImpl(new PortletRequestMockImpl(markupHeadElementSupport, ajaxRequest));
testBridgePortalContextAjaxRequest(portalContextBridgeImpl);
markupHeadElementSupport = false;
portalContextBridgeImpl = new PortalContextBridgeImpl(new PortletRequestMockImpl(markupHeadElementSupport, ajaxRequest));
testBridgePortalContextAjaxRequest(portalContextBridgeImpl);
}
use of javax.portlet.PortalContext in project liferay-faces-bridge-ext by liferay.
the class BridgePortletRequestFactoryLiferayImpl method getHeaderRequest.
@Override
public HeaderRequest getHeaderRequest(HeaderRequest headerRequest, HeaderResponse headerResponse, PortletConfig portletConfig, BridgeConfig bridgeConfig) {
headerRequest = getWrapped().getHeaderRequest(headerRequest, headerResponse, portletConfig, bridgeConfig);
PortalContext portalContext = new PortalContextBridgeLiferayImpl(headerRequest);
return new HeaderRequestBridgeLiferayImpl(headerRequest, headerResponse.getNamespace(), portletConfig, portalContext);
}
use of javax.portlet.PortalContext in project liferay-faces-bridge-ext by liferay.
the class BridgePortletRequestFactoryLiferayImpl method getEventRequest.
@Override
public EventRequest getEventRequest(EventRequest eventRequest, EventResponse eventResponse, PortletConfig portletConfig, BridgeConfig bridgeConfig) {
eventRequest = getWrapped().getEventRequest(eventRequest, eventResponse, portletConfig, bridgeConfig);
PortalContext portalContext = new PortalContextBridgeLiferayImpl(eventRequest);
return new EventRequestBridgeLiferayImpl(eventRequest, eventResponse.getNamespace(), portletConfig, portalContext);
}
Aggregations