public void removeAttribute(String name) { setAttribute(name, null); }
public String toString() { return getStringId(); }
public Object getAttribute(String name) { return getAttributes().get(name); }
PortletDefinition portletDefinition = window.getPortletDefinition(); PortletApplication app = portletDefinition.getApplication(); boolean useForward = window.getAttribute(PortalReservedParameters.PORTLET_CONTAINER_INVOKER_USE_FORWARD) != null; ((JetspeedRequestContext)window.getRequestContext()).setCurrentPortletWindow(window); window.setInvocationState(action, requestContext, responseContext, portletRequest, portletResponse, portletInstance); window.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, window.getFragment()); window.setAttribute(PortalReservedParameters.PORTLET_WINDOW_ATTRIBUTE, window); window.setAttribute(PortalReservedParameters.PORTLET_DEFINITION_ATTRIBUTE, portletDefinition); window.setAttribute(PortalReservedParameters.PORTLET_FILTER_MANAGER_ATTRIBUTE, filter); ((JetspeedRequestContext)window.getRequestContext()).setCurrentPortletWindow(null);
((JetspeedRequestContext)window.getRequestContext()).setCurrentPortletWindow(window); window.setInvocationState(action, requestContext, responseContext, portletRequest, portletResponse, portletInstance); window.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, window.getFragment()); window.setAttribute(PortalReservedParameters.PORTLET_WINDOW_ATTRIBUTE, window); window.setAttribute(PortalReservedParameters.PORTLET_DEFINITION_ATTRIBUTE, portletDefinition); requestContext.init(window.getPortletInstance().getConfig(), this.jetspeedContext, request, response); window.getPortletResponseContext().init(request, response); renderResponse.setContentType(window.getRequestContext().getMimeType()); portletInstance.render(renderRequest, renderResponse); ((JetspeedRequestContext)window.getRequestContext()).setCurrentPortletWindow(null); Thread.currentThread().setContextClassLoader(oldLoader);
public void setInvocationState(Action action, PortletRequestContext portletRequestContext, PortletResponseContext portletResponseContext, PortletRequest portletRequest, PortletResponse portletResponse, PortletInstance portletInstance) { if (!valid) { throw new IllegalStateException("Invalid window "+getId()+" should not have been invoked"); } this.action = action; this.portletRequest = portletRequest; this.portletResponseContext = portletResponseContext; this.portletRequestContext = portletRequestContext; this.portletResponse = portletResponse; this.portletInstance = portletInstance; }
private PortletWindow createPortletWindow(ContentFragment fragment) { PortletWindow window = null; PortletDefinition pd = rcc.getPortletRegistry().getPortletDefinitionByUniqueName(fragment.getName(), true); if (pd != null) { window = new PortletWindowImpl(this, fragment, pd); } else { // invalid window: create one anyway so that this error condition is only "recorded" once for this request window = new PortletWindowImpl(this, fragment); fragment.overrideRenderedContent("Failed to retrieve Portlet Definition for " + fragment.getName()); log.error(fragment.getOverriddenContent()); } portletWindows.put(window.getWindowId(), window); return window; }
public void setAttribute(String name, Object value) { if (name == null) { throw new IllegalArgumentException("name parameter is required"); } if (value == null) { getAttributes().remove(name); } else { getAttributes().put(name, value); } }