public void addProperty(Cookie cookie) { ArgumentUtility.validateNotNull("cookie", cookie); responseContext.addProperty(cookie); }
protected PortletContainer getPortletContainer() { return responseContext.getContainer(); }
/** * @param responseContext * @param copy */ public RenderURLImpl(PortletResponseContext responseContext, Copy copy) { super(responseContext, responseContext.getPortletURLProvider(PortletURLProvider.TYPE.RENDER), copy); }
protected BaseURLImpl(PortletResponseContext responseContext, PortletURLProvider urlProvider) { this.responseContext = responseContext; this.portalContext = responseContext.getContainer() .getContainerServices().getPortalContext(); this.windowId = responseContext.getPortletWindow().getId().getStringId(); this.urlProvider = urlProvider; renderURL = PortletURLProvider.TYPE.RENDER == urlProvider.getType(); if (isTrace) { StringBuilder txt = new StringBuilder(); txt.append("URL provider type=").append(urlProvider.getType()); txt.append(", WindowId=").append(windowId); txt.append(", isRender=").append(renderURL); LOGGER.debug(txt.toString()); } }
protected PortletWindow getPortletWindow() { return responseContext.getPortletWindow(); }
@Override public Collection<String> getPropertyNames() { return responseContext.getPropertyNames(); } }
@Override public String getProperty(String key) { return responseContext.getProperty(key); }
public Element createElement(String tagName) throws DOMException { ArgumentUtility.validateNotEmpty("tagName", tagName); return responseContext.createElement(tagName); }
private int getPortletMajorVersion() { PortletConfig portletConfig = responseContext.getPortletConfig(); PortletContext portletContext = portletConfig.getPortletContext(); return portletContext.getEffectiveMajorVersion(); }
response = (HttpServletResponse) requestResponseUnwrapper.unwrapContainerResponse(response); requestContext.init(window.getPortletInstance().getConfig(), this.jetspeedContext, request, response); window.getPortletResponseContext().init(request, response);
PortletURLListenerService service = responseContext.getContainer() .getContainerServices().getPortletURLListenerService(); PortletApplicationDefinition portletApp = responseContext .getPortletWindow().getPortletDefinition().getApplication(); for (PortletURLGenerationListener<RenderURL, ActionURL> listener : service .getPortletURLGenerationListeners(portletApp)) {
private boolean isPortletModeAllowed(PortletMode mode) { if (PortletMode.VIEW.equals(mode)) { return true; } String modeName = mode.toString(); PortletDefinition dd = responseContext.getPortletWindow() .getPortletDefinition(); for (Supports sup : dd.getSupports()) { for (String m : sup.getPortletModes()) { if (m.equalsIgnoreCase(modeName)) { // check if a portlet managed mode which is always allowed. CustomPortletMode cpm = dd.getApplication() .getCustomPortletMode(modeName); if (cpm != null && !cpm.isPortalManaged()) { return true; } Enumeration<PortletMode> supportedModes = portalContext .getSupportedPortletModes(); while (supportedModes.hasMoreElements()) { if (supportedModes.nextElement().equals(mode)) { return true; } } return false; } } } return false; }
window.getPortletResponseContext().init(request, response);
public void addProperty(String key, String value) { ArgumentUtility.validateNotEmpty("key", key); responseContext.addProperty(key, value); }
public void addProperty(String key, Element element) { ArgumentUtility.validateNotEmpty("key", key); ArgumentUtility.validateNotNull("element", element); responseContext.addProperty(key, element); }