@Override public PortletSession getPortletSession() { return ((PortletRequest)wrapped).getPortletSession(); }
@Override public PortletSession getPortletSession(boolean create) { return ((PortletRequest)wrapped).getPortletSession(create); }
public ProgressInputStream( PortletRequest portletRequest, InputStream inputStream, long totalSize, String progressId) { _portletSession = portletRequest.getPortletSession(); _inputStream = inputStream; _totalSize = totalSize; _progressId = progressId; initProgress(); }
public void finish(PortletRequest portletRequest) { finish(portletRequest.getPortletSession()); }
public void start(PortletRequest portletRequest) { start(portletRequest.getPortletSession()); }
public void initialize(PortletRequest portletRequest) { initialize(portletRequest.getPortletSession()); }
private void _initPortletSessionAttributes() { if (_portletScopeSessioAttributes != null) { return; } PortletSession portletSession = _portletRequest.getPortletSession(); try { _portletScopeSessioAttributes = portletSession.getAttributeMap( PortletSession.PORTLET_SCOPE); _applicationScopeSessionAttributes = portletSession.getAttributeMap( PortletSession.APPLICATION_SCOPE); } catch (IllegalStateException ise) { if (_log.isWarnEnabled()) { _log.warn(ise.getMessage()); } } }
(LiferayPortletSession)portletRequest.getPortletSession();
public static double getDouble( PortletRequest portletRequest, String param, double defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { double value = GetterUtil.getDouble(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Double portletSessionValue = (Double)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static long getLong( PortletRequest portletRequest, String param, long defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { long value = GetterUtil.getLong(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Long portletSessionValue = (Long)portletSession.getAttribute(param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static short getShort( PortletRequest portletRequest, String param, short defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { short value = GetterUtil.getShort(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Short portletSessionValue = (Short)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static int getInteger( PortletRequest portletRequest, String param, int defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { int value = GetterUtil.getInteger(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Integer portletSessionValue = (Integer)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static boolean getBoolean( PortletRequest portletRequest, String param, boolean defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { boolean value = GetterUtil.getBoolean(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Boolean portletSessionValue = (Boolean)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static String getString( PortletRequest portletRequest, String param, String defaultValue) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { String value = GetterUtil.getString(portletRequestValue); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { String portletSessionValue = (String)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static double getDouble( PortletRequest portletRequest, String param, double defaultValue, Locale locale) { PortletSession portletSession = portletRequest.getPortletSession(false); String portletRequestValue = portletRequest.getParameter(param); if (portletRequestValue != null) { double value = GetterUtil.getDouble(portletRequestValue, locale); portletSession.setAttribute(param, value); return value; } if (portletSession != null) { Double portletSessionValue = (Double)portletSession.getAttribute( param); if (portletSessionValue != null) { return portletSessionValue; } } return defaultValue; }
public static String getErrorOutput(PortletRequest request) { PortletSession pSession = request.getPortletSession(true); try { return (String) pSession.getAttribute("error.output"); } catch (Throwable t) { return null; } }
public static Map getErrorMap(PortletRequest request) { PortletSession pSession = request.getPortletSession(true); try { return (Map) pSession.getAttribute("error.map"); } catch (Throwable t) { return null; } }
public static String getDebugOutput(PortletRequest request) { PortletSession pSession = request.getPortletSession(true); try { return (String) pSession.getAttribute("debug.print"); } catch (Throwable t) { return null; } }
public static void clearDebugOutput(PortletRequest request) { PortletSession pSession = request.getPortletSession(true); pSession.removeAttribute("debug.print"); }
public static void clearErrorMessage(PortletRequest request) { PortletSession pSession = request.getPortletSession(true); pSession.removeAttribute("error.message"); pSession.removeAttribute("error.output"); pSession.removeAttribute("error.map"); }