/** * @see org.apache.wicket.session.ISessionStore#getAttribute(org.apache.wicket.Request, * java.lang.String) */ public Object getAttribute(Request request, String name) { WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { return httpSession.getAttribute(getSessionAttributePrefix(webRequest) + name); } return null; }
/** * @see org.apache.wicket.session.ISessionStore#getAttribute(org.apache.wicket.Request, * java.lang.String) */ public Object getAttribute(Request request, String name) { WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { return httpSession.getAttribute(getSessionAttributePrefix(webRequest) + name); } return null; }
/** * @see org.apache.wicket.session.ISessionStore#getAttributeNames(Request) */ public List getAttributeNames(Request request) { List list = new ArrayList(); WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { final Enumeration names = httpSession.getAttributeNames(); final String prefix = getSessionAttributePrefix(webRequest); while (names.hasMoreElements()) { final String name = (String)names.nextElement(); if (name.startsWith(prefix)) { list.add(name.substring(prefix.length())); } } } return list; }
/** * @see org.apache.wicket.session.ISessionStore#getAttributeNames(Request) */ public List<String> getAttributeNames(Request request) { List<String> list = new ArrayList<String>(); WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { @SuppressWarnings("unchecked") final Enumeration<String> names = httpSession.getAttributeNames(); final String prefix = getSessionAttributePrefix(webRequest); while (names.hasMoreElements()) { final String name = names.nextElement(); if (name.startsWith(prefix)) { list.add(name.substring(prefix.length())); } } } return list; }
/** * @see org.apache.wicket.session.ISessionStore#removeAttribute(Request,java.lang.String) */ public void removeAttribute(Request request, String name) { // ignore call if the session was marked invalid if (!isSessionValid()) { return; } WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { String attributeName = getSessionAttributePrefix(webRequest) + name; IRequestLogger logger = application.getRequestLogger(); if (logger != null) { Object value = httpSession.getAttribute(attributeName); if (value != null) { logger.objectRemoved(value); } } httpSession.removeAttribute(attributeName); } }
/** * @see org.apache.wicket.session.ISessionStore#removeAttribute(Request,java.lang.String) */ public void removeAttribute(Request request, String name) { // ignore call if the session was marked invalid if (!isSessionValid()) { return; } WebRequest webRequest = toWebRequest(request); HttpSession httpSession = getHttpSession(webRequest); if (httpSession != null) { String attributeName = getSessionAttributePrefix(webRequest) + name; IRequestLogger logger = application.getRequestLogger(); if (logger != null) { Object value = httpSession.getAttribute(attributeName); if (value != null) { logger.objectRemoved(value); } } httpSession.removeAttribute(attributeName); } }
String attributeName = getSessionAttributePrefix(webRequest) + name; if (logger != null)
String attributeName = getSessionAttributePrefix(webRequest) + name; if (logger != null)