|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.protocol.http.portlet.PortletSessionStore
public class PortletSessionStore
Abstract implementation of ISessionStore that works with portlets
| Field Summary | |
|---|---|
protected PortletApplication |
application
|
protected static org.apache.commons.logging.Log |
log
log. |
| Constructor Summary | |
|---|---|
PortletSessionStore()
Construct. |
|
| Method Summary | |
|---|---|
void |
bind(Request request,
Session newSession)
Adds the provided new session to this facade using the provided request. |
java.lang.Object |
getAttribute(Request request,
java.lang.String name)
Gets the attribute value with the given name |
java.util.List |
getAttributeNames(Request request)
|
protected javax.portlet.PortletSession |
getPortletSession(WicketPortletRequest request)
Gets the underlying HttpSession object or null. |
java.lang.String |
getSessionId(Request request)
Get the session id for the provided request. |
void |
invalidate(Request request)
Invalidates the session. |
Session |
lookup(Request request)
Retrieves the session for the provided request from this facade. |
protected void |
onBind(Request request,
Session newSession)
Template method that is called when a session is being bound to the session store. |
protected void |
onUnbind(java.lang.String sessionId)
Template method that is called when the session is being detached from the store, which typically happens when the portlet session was invalidated. |
void |
removeAttribute(Request request,
java.lang.String name)
Removes the attribute with the given name. |
void |
setAttribute(Request request,
java.lang.String name,
java.lang.Object value)
Adds or replaces the attribute with the given name and value. |
protected WicketPortletRequest |
toPortletRequest(Request request)
Cast Request to WebRequest. |
void |
unbind(java.lang.String sessionId)
Adds the provided new session to this facade using the provided request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
protected final PortletApplication application
| Constructor Detail |
|---|
public PortletSessionStore()
| Method Detail |
|---|
public final void invalidate(Request request)
ISessionStore
invalidate in interface ISessionStorerequest - the current requestISessionStore.invalidate(Request)public final java.lang.String getSessionId(Request request)
ISessionStore
getSessionId in interface ISessionStorerequest - The request
ISessionStore.getSessionId(wicket.Request)
public final void bind(Request request,
Session newSession)
ISessionStore
bind in interface ISessionStorerequest - The request that triggered making a new sesionnewSession - The new sessionISessionStore.bind(wicket.Request, wicket.Session)public final void unbind(java.lang.String sessionId)
ISessionStore
unbind in interface ISessionStoresessionId - The SessionId that must be unbinded.ISessionStore.unbind(java.lang.String)public Session lookup(Request request)
ISessionStore
This method should return null if it is not bound yet, so that Wicket can
recognize that it should create a session and call
ISessionStore.bind(Request, Session) right after that.
lookup in interface ISessionStorerequest - The current request
ISessionStore.lookup(wicket.Request)protected final WicketPortletRequest toPortletRequest(Request request)
Request to WebRequest.
request - The request to cast
protected final javax.portlet.PortletSession getPortletSession(WicketPortletRequest request)
WARNING: it is a bad idea to depend on the http session object directly. Please use the classes and methods that are exposed by Wicket instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
request -
protected void onBind(Request request,
Session newSession)
ISessionStore.setAttribute(Request, String, Object) with key
Session.SESSION_ATTRIBUTE_NAME.
request - The requestnewSession - The new sessionprotected void onUnbind(java.lang.String sessionId)
sessionId - The session id of the session that was invalidated.
public void setAttribute(Request request,
java.lang.String name,
java.lang.Object value)
ISessionStore
setAttribute in interface ISessionStorerequest - the current requestname - the name of the attributevalue - the value of the attributeISessionStore.setAttribute(Request,java.lang.String,
java.lang.Object)
public java.lang.Object getAttribute(Request request,
java.lang.String name)
ISessionStore
getAttribute in interface ISessionStorerequest - the current requestname - The name of the attribute to store
ISessionStore.getAttribute(wicket.Request,
java.lang.String)
public void removeAttribute(Request request,
java.lang.String name)
ISessionStore
removeAttribute in interface ISessionStorerequest - the current requestname - the name of the attribute to removeISessionStore.removeAttribute(Request,java.lang.String)public java.util.List getAttributeNames(Request request)
getAttributeNames in interface ISessionStorerequest - the current request
ISessionStore.getAttributeNames(Request)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||