/** * @see org.jasig.portal.portlet.session.IPortletSessionActionManager#clear(org.jasig.portal.portlet.window.IPortletWindow, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, int) */ public void clear(IPortletWindow portletWindow, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, int scope) throws PortletException, IOException, PortletContainerException { final PortletWindow plutoPortletWindow = plutoDomainObjectHelper.getPortletWindow(portletWindow); httpServletRequest.setAttribute(this.controllerAttributeName, this.listenerName); httpServletRequest.setAttribute(PortletSessionAdministrativeRequestListener.ACTION, PortletSessionAdministrativeRequestListener.SessionAction.CLEAR); httpServletRequest.setAttribute(PortletSessionAdministrativeRequestListener.SCOPE, scope); try { this.portletContainer.doAdmin(plutoPortletWindow, httpServletRequest, httpServletResponse); } catch (org.apache.pluto.PortletContainerException pce) { throw new PortletContainerException("Failed to execute Pluto admin request", pce); } finally { httpServletRequest.removeAttribute(PortletSessionAdministrativeRequestListener.ACTION); httpServletRequest.removeAttribute(PortletSessionAdministrativeRequestListener.SCOPE); } }
/** * @see org.jasig.portal.portlet.session.IPortletSessionActionManager#setAttribute(org.jasig.portal.portlet.window.IPortletWindow, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Object, int) */ public void setAttribute(IPortletWindow portletWindow, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String name, Object value, int scope) throws PortletException, IOException, PortletContainerException { final PortletWindow plutoPortletWindow = plutoDomainObjectHelper.getPortletWindow(portletWindow); httpServletRequest.setAttribute(this.controllerAttributeName, this.listenerName); httpServletRequest.setAttribute(PortletSessionAdministrativeRequestListener.ACTION, PortletSessionAdministrativeRequestListener.SessionAction.SET_ATTRIBUTE); httpServletRequest.setAttribute(PortletSessionAdministrativeRequestListener.ARGUMENTS, new Object[] { name, value }); httpServletRequest.setAttribute(PortletSessionAdministrativeRequestListener.SCOPE, scope); try { this.portletContainer.doAdmin(plutoPortletWindow, httpServletRequest, httpServletResponse); } catch (org.apache.pluto.PortletContainerException pce) { throw new PortletContainerException("Failed to execute Pluto admin request", pce); } finally { httpServletRequest.removeAttribute(PortletSessionAdministrativeRequestListener.ACTION); httpServletRequest.removeAttribute(PortletSessionAdministrativeRequestListener.ARGUMENTS); httpServletRequest.removeAttribute(PortletSessionAdministrativeRequestListener.SCOPE); } } }