@Override public WindowState getWindowState() { return ((PortletRequest)wrapped).getWindowState(); }
/** * The default behavior of this method is to call * <code>getWindowState()</code> on the wrapped request object. */ public WindowState getWindowState() { return request.getWindowState(); }
/** * @return portletRequest.getWindowState() */ public WindowState getWindowState() { return portletRequest.getWindowState(); }
public WindowState getWindowState() { return request.getWindowState(); }
public WindowState getWindowState() { return portletRequest.getWindowState(); }
public WindowState getWindowState() { return request.getWindowState(); }
/** * Producer method for the window state. */ @Produces @PortletRequestScoped @Named("windowState") public static WindowState produceWindowState() { PortletArtifactProducer pap = producers.get(); assert pap != null; return pap.req.getWindowState(); }
public static WindowState getWindowState() { PortletRequest portletRequest = getPortletRequest(); if (portletRequest == null) { throw new IllegalStateException( "The request is not PortletRequest."); } return portletRequest.getWindowState(); }
public WindowState getWindowState() { return getPortletRequest().getWindowState(); }
public WindowState getWindowState() { if (request != null) return request.getWindowState(); if (actionResponse != null) return actionResponse.getWindowState(); return WindowState.NORMAL; }
public WindowState getWindowState() { return getPortletRequest().getWindowState(); }
_portletSessionId = portletRequest.getRequestedSessionId(); _scheme = portletRequest.getScheme(); _windowState = portletRequest.getWindowState();
@Override public boolean match(PortletRequest request) { return (PortletRequest.RENDER_PHASE.equals(request.getAttribute(PortletRequest.LIFECYCLE_PHASE)) && (this.windowState == null || this.windowState.equals(request.getWindowState())) && super.match(request)); }
@Override public boolean match(PortletRequest request) { return (PortletRequest.RENDER_PHASE.equals(request.getAttribute(PortletRequest.LIFECYCLE_PHASE)) && (this.windowState == null || this.windowState.equals(request.getWindowState())) && super.match(request)); }
public BridgeContextLiferayImpl(BridgeConfig bridgeConfig, BridgeRequestScope bridgeRequestScope, PortletConfig portletConfig, PortletContext portletContext, PortletRequest portletRequest, PortletResponse portletResponse, Bridge.PortletPhase portletPhase, IncongruityContext incongruityContext) { super(bridgeConfig, bridgeRequestScope, portletConfig, portletContext, portletRequest, portletResponse, portletPhase, incongruityContext); String namespace = portletResponse.getNamespace(); // Initialize the pseudo-constants. NAMESPACED_P_P_COL_ID = namespace.concat("p_p_col_id"); NAMESPACED_P_P_COL_POS = namespace.concat("p_p_col_pos"); NAMESPACED_P_P_COL_COUNT = namespace.concat("p_p_col_count"); NAMESPACED_P_P_MODE = namespace.concat("p_p_mode"); NAMESPACED_P_P_STATE = namespace.concat("p_p_state"); // Save the render attributes. if (portletRequest instanceof RenderRequest) { PortletMode portletMode = portletRequest.getPortletMode(); WindowState windowState = portletRequest.getWindowState(); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); saveRenderAttributes(portletMode, windowState, portletDisplay, portletContext); } setCurrentInstance(this); }
public BridgeContextLiferayImpl(BridgeConfig bridgeConfig, BridgeRequestScope bridgeRequestScope, PortletConfig portletConfig, PortletContext portletContext, PortletRequest portletRequest, PortletResponse portletResponse, Bridge.PortletPhase portletPhase, IncongruityContext incongruityContext) { super(bridgeConfig, bridgeRequestScope, portletConfig, portletContext, portletRequest, portletResponse, portletPhase, incongruityContext); String namespace = portletResponse.getNamespace(); // Initialize the pseudo-constants. NAMESPACED_P_P_COL_ID = namespace.concat("p_p_col_id"); NAMESPACED_P_P_COL_POS = namespace.concat("p_p_col_pos"); NAMESPACED_P_P_COL_COUNT = namespace.concat("p_p_col_count"); NAMESPACED_P_P_MODE = namespace.concat("p_p_mode"); NAMESPACED_P_P_STATE = namespace.concat("p_p_state"); // Save the render attributes. if (portletRequest instanceof RenderRequest) { PortletMode portletMode = portletRequest.getPortletMode(); WindowState windowState = portletRequest.getWindowState(); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); saveRenderAttributes(portletMode, windowState, portletDisplay, portletContext); } setCurrentInstance(this); }
protected void populateConveniencePortletProperties(PortletRequest request) { request.setAttribute("portletMode", request.getPortletMode().toString()); request.setAttribute("portletWindowState", request.getWindowState().toString()); }
public <T> T getProperty(PropertyType<T> propertyType) { Object propertyValue = null; if (JuzuPortlet.PORTLET_MODE.equals(propertyType)) { propertyValue = req.getPortletMode(); } else if (JuzuPortlet.WINDOW_STATE.equals(propertyType)) { propertyValue = req.getWindowState(); } if (RunMode.PROPERTY.equals(propertyType)) { propertyValue = bridge.getRunMode(); } else if (InjectorProvider.PROPERTY.equals(propertyType)) { return propertyType.cast(bridge.getConfig().injectorProvider); } return propertyValue == null ? null : propertyType.cast(propertyValue); }
public <T> T getProperty(PropertyType<T> propertyType) { Object propertyValue = null; if (JuzuPortlet.PORTLET_MODE.equals(propertyType)) { propertyValue = req.getPortletMode(); } else if (JuzuPortlet.WINDOW_STATE.equals(propertyType)) { propertyValue = req.getWindowState(); } if (RunMode.PROPERTY.equals(propertyType)) { propertyValue = bridge.getRunMode(); } else if (InjectorProvider.PROPERTY.equals(propertyType)) { return propertyType.cast(bridge.getConfig().injectorProvider); } return propertyValue == null ? null : propertyType.cast(propertyValue); }
/** * Create runtime data for a given request * @param req current request * @return channel runtime data for the current request */ protected ChannelRuntimeData getGeneralRuntimeData(PortletRequest req) { Locale locale=req.getLocale(); // select out parameters from the request PortletAdapterChannelRuntimeData rd; rd=new PortletAdapterChannelRuntimeData(req.getParameterMap()); // set browser info rd.setBrowserInfo(new PortletBrowserInfo(req)); // set is rendering as root rd.setRenderingAsRoot(WindowState.MAXIMIZED.equals(req.getWindowState())); // set keywords ResourceBundle rb=getPortletConfig().getResourceBundle(locale); if(rb!=null) { rd.setKeywords(rb.getString(PORTLET_KEYWORDS_RESOURCE_STRING)); } //TODO: set remote address //TODO: set http method // set locales rd.setLocales(new Locale[]{locale}); return rd; }