@Override public Enumeration<String> getAttributeNames(int scope) { return wrapped.getAttributeNames(scope); }
@Override public Enumeration<String> getAttributeNames() { return wrapped.getAttributeNames(); }
@Override public Set<String> getAttributeNames() { return WrappedHttpSession.enumerationToSet(session.getAttributeNames()); }
/** * Gets the current set of attribute names bound to this session in the * given scope. * * @param scope * session scope of the attribute names * @return an unmodifiable set of the current attribute names in the given * scope * * @see PortletSession#getAttributeNames() * * @since 7.6 */ public Set<String> getAttributeNames(int scope) { return WrappedHttpSession .enumerationToSet(session.getAttributeNames(scope)); }
/** * @see javax.servlet.http.HttpSession#getAttributeNames() */ public Enumeration getAttributeNames() { return portletSession.getAttributeNames(); }
@SuppressWarnings("unchecked") private final Enumeration<String> getAttrNames() { return _navsess instanceof HttpSession ? ((HttpSession) _navsess).getAttributeNames() : _navsess != null ? ((PortletSession) _navsess).getAttributeNames(PortletSession.APPLICATION_SCOPE) : CollectionsX.EMPTY_ENUMERATION; }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") public int size() { int n = 0; Enumeration<String> keys = session.getAttributeNames(PortletSession.PORTLET_SCOPE); while (keys.hasMoreElements()) { keys.nextElement(); n++; } return (n); }
/** {@inheritDoc} */ public Set<String> keySet() { Set<String> set = new HashSet<String>(); Enumeration<String> keys = session.getAttributeNames(PortletSession.PORTLET_SCOPE); while (keys.hasMoreElements()) { set.add(keys.nextElement()); } return (set); }
public String[] getValueNames() { ArrayList<String> names = Collections.list(delegate.getAttributeNames()); // return names.toArray(new String[names.size()]); }
public int size() { int n = 0; if (sessionExists()) { Enumeration keys = session.getAttributeNames(PortletSession.PORTLET_SCOPE); while (keys.hasMoreElements()) { keys.nextElement(); n++; } } return (n); }
public boolean isEmpty() { if (sessionExists() && session.getAttributeNames().hasMoreElements()) { return false; } else { return true; } }
public Set keySet() { Set set = new HashSet(); if (sessionExists()) { Enumeration keys = session.getAttributeNames(PortletSession.PORTLET_SCOPE); while (keys.hasMoreElements()) { set.add(keys.nextElement()); } } return (set); }
@Override public Enumeration<String> getKeys() { PortletSession session = request.getPortletSession(false); if (session != null) { return session.getAttributeNames(scope); } return null; }
/** {@inheritDoc} */ public Set<Map.Entry<String, Object>> entrySet() { Set<Map.Entry<String, Object>> set = new HashSet<Map.Entry<String, Object>>(); Enumeration<String> keys = session.getAttributeNames(PortletSession.PORTLET_SCOPE); String key; while (keys.hasMoreElements()) { key = keys.nextElement(); set.add(new MapEntry<String, Object>(key, session.getAttribute(key), true)); } return (set); }
protected void dumpSession(RenderRequest request) { Enumeration attrIter = request.getPortletSession().getAttributeNames(); log.info( "session-attributes:"); while ( attrIter.hasMoreElements() ) { Object attrNm = attrIter.nextElement(); Object attrVal = request.getPortletSession().getAttribute(ObjectUtils.toString(attrNm)); String attrValDesc = ( attrVal instanceof String ) ? (String)attrVal : (( attrVal == null ) ? "null" : attrVal.getClass().getName() ); log.info( " key=" + ObjectUtils.toString(attrNm,"null") + " value=" + attrValDesc); } } protected void dumpNameValue( Map m )
protected Iterator getAttributeNames() { PortletSession session = getSession(); return session == null ? CollectionUtils.EMPTY_ITERATOR : CollectionUtils.toIterator(session .getAttributeNames()); }
protected Iterator getAttributeNames() { PortletSession session = getSession(); return (session != null) ? new EnumerationIterator(session .getAttributeNames()) : EMPTY_ITERATOR; }
@Override @SuppressWarnings("unchecked") protected Enumeration<String> getAttributeNames() { PortletSession portletSession = getSession(); return (portletSession == null) ? NullEnumeration.instance() : portletSession.getAttributeNames(PortletSession.PORTLET_SCOPE); }
protected void dumpSession(RenderRequest request) { Enumeration attrIter = request.getPortletSession().getAttributeNames(); log.info( "session-attributes:"); while ( attrIter.hasMoreElements() ) { Object attrNm = attrIter.nextElement(); Object attrVal = request.getPortletSession().getAttribute(ObjectUtils.toString(attrNm)); String attrValDesc = ( attrVal instanceof String ) ? (String)attrVal : (( attrVal == null ) ? "null" : attrVal.getClass().getName() ); log.info( " key=" + ObjectUtils.toString(attrNm,"null") + " value=" + attrValDesc); } }
protected Iterator getAttributeNames() { PortletSession session = getSession(); return session == null ? CollectionUtils.EMPTY_ITERATOR : CollectionUtils.toIterator(session .getAttributeNames(scope)); }