req = uploadReq;
}
String companyId = PortalUtil.getCompanyId(req);
User user = PortalUtil.getUser(req);
Layout layout = (Layout)req.getAttribute(WebKeys.LAYOUT);
String portletId = ParamUtil.getString(req, "p_p_id");
Portlet portlet =
PortletManagerUtil.getPortletById(companyId, portletId);
ServletContext ctx = (ServletContext)req.getAttribute(WebKeys.CTX);
CachePortlet cachePortlet = PortalUtil.getPortletInstance(portlet, ctx);
if (user != null) {
CachePortlet.clearResponse(ses, layout, portletId);
}
// PortletPreferences portletPrefs =
// PortletPreferencesManagerUtil.getPreferences(
// companyId, PortalUtil.getPortletPreferencesPK(req, portletId));
PortletPreferences portletPrefs = null;
PortletConfig portletConfig = PortalUtil.getPortletConfig(portlet, ctx);
PortletContext portletCtx = portletConfig.getPortletContext();
WindowState windowState = new WindowState(
ParamUtil.getString(req, "p_p_state"));
PortletMode portletMode = new PortletMode(
ParamUtil.getString(req, "p_p_mode"));
if (action) {
ActionRequestImpl actionRequest = new ActionRequestImpl(
req, portlet, cachePortlet, portletCtx, windowState,
portletMode, portletPrefs, layout.getId());
ActionResponseImpl actionResponse = new ActionResponseImpl(
actionRequest, res, portletId, user, layout, windowState,
portletMode);
actionRequest.defineObjects(portletConfig, actionResponse);
cachePortlet.processAction(actionRequest, actionResponse);
RenderParametersPool.put(
req, layout.getId(), portletId,
actionResponse.getRenderParameters());
}
else {
// PortalUtil.updateWindowState(portletId, user, layout, windowState);
//