@Override public Object getAttribute(String name) { return wrapped.getAttribute(name); }
@Override public Object getAttribute(String name, int scope) { return wrapped.getAttribute(name, scope); }
@Override public Object getAttribute(String name) { return session.getAttribute(name); }
/** * Returns the object bound with the specified name in this session, or * <code>null</code> if no object is bound under the name in the given * scope. * * @param name * a string specifying the name of the object * @param scope * session scope of this attribute * * @return the object with the specified name * * @exception java.lang.IllegalStateException * if this method is called on an invalidated session, or the * scope is unknown to the container. * @exception java.lang.IllegalArgumentException * if name is <code>null</code>. * * @see PortletSession#getAttribute(String, int) * @see PortletSession#PORTLET_SCOPE * @see PortletSession#APPLICATION_SCOPE * * @since 7.6 */ public Object getAttribute(String name, int scope) { return session.getAttribute(name, scope); }
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 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 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; }
(ProgressTracker)_portletSession.getAttribute( _getPercentAttributeName(), PortletSession.APPLICATION_SCOPE);
public Session get(Object navsess) { return (Session) (navsess instanceof PortletSession ? ((PortletSession) navsess).getAttribute(Attributes.ZK_SESSION, PortletSession.APPLICATION_SCOPE) : ((HttpSession) navsess).getAttribute(Attributes.ZK_SESSION)); }
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 getErrorMessage(PortletRequest request) { PortletSession pSession = request.getPortletSession(true); try { return (String) pSession.getAttribute("error.message"); } 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 Object remove(Object key) { if (sessionExists()) { String skey = key(key); Object previous = session.getAttribute(skey); session.removeAttribute(skey); return (previous); } else { return (null); } }
@Override public void render(RenderRequest request, RenderResponse response) throws PortletException, IOException { @SuppressWarnings("unchecked") SoftReference<List<CommonMessage>> msgRef = (SoftReference<List<CommonMessage>>) request.getPortletSession().getAttribute(COMMON_MESSAGES); if (null != msgRef && null != msgRef.get()) { request.setAttribute(COMMON_MESSAGES, msgRef.get()); } request.getPortletSession().removeAttribute(COMMON_MESSAGES); request.setAttribute(FMT_LOCALE, request.getLocale()); super.render(request, response); }
public static SystemLog getCurrentSystemLog(PortletRequest request) { SystemLog log = (SystemLog) request.getPortletSession(true).getAttribute(SYSTEM_LOG_KEY, PortletSession.APPLICATION_SCOPE); if (log == null) { ManagementHelper helper = getManagementHelper(request); log = helper.getSystemLog(getCurrentJVM(request)); request.getPortletSession().setAttribute(SYSTEM_LOG_KEY, log, PortletSession.APPLICATION_SCOPE); } return log; }