|
spring-webmvc-portlet | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.web.context.request.AbstractRequestAttributes
org.springframework.web.portlet.context.PortletRequestAttributes
public class PortletRequestAttributes
Portlet-based implementation of the
RequestAttributes
interface.
Accesses objects from portlet request and portlet session scope, with a distinction between "session" (the PortletSession's "portlet scope") and "global session" (the PortletSession's "application scope").
PortletRequest.getAttribute(java.lang.String)
,
PortletSession.getAttribute(java.lang.String)
,
PortletSession.PORTLET_SCOPE
,
PortletSession.APPLICATION_SCOPE
,
RequestAttributes.SCOPE_SESSION
,
RequestAttributes.SCOPE_GLOBAL_SESSION
Field Summary | |
---|---|
static java.lang.String |
DESTRUCTION_CALLBACK_NAME_PREFIX
Constant identifying the String prefixed to the name of a
destruction callback when it is stored in a PortletSession . |
Fields inherited from class org.springframework.web.context.request.AbstractRequestAttributes |
---|
requestDestructionCallbacks |
Fields inherited from interface org.springframework.web.context.request.RequestAttributes |
---|
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION |
Constructor Summary | |
---|---|
PortletRequestAttributes(javax.portlet.PortletRequest request)
Create a new PortletRequestAttributes instance for the given request. |
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String name,
int scope)
|
java.lang.String[] |
getAttributeNames(int scope)
|
javax.portlet.PortletRequest |
getRequest()
Exposes the native PortletRequest that we're wrapping. |
protected javax.portlet.PortletSession |
getSession(boolean allowCreate)
Exposes the PortletSession that we're wrapping. |
java.lang.String |
getSessionId()
|
java.lang.Object |
getSessionMutex()
|
void |
registerDestructionCallback(java.lang.String name,
java.lang.Runnable callback,
int scope)
|
protected void |
registerSessionDestructionCallback(java.lang.String name,
java.lang.Runnable callback)
Register the given callback as to be executed after session termination. |
void |
removeAttribute(java.lang.String name,
int scope)
|
java.lang.Object |
resolveReference(java.lang.String key)
|
void |
setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
|
java.lang.String |
toString()
|
protected void |
updateAccessedSessionAttributes()
Update all accessed session attributes through session.setAttribute
calls, explicitly indicating to the container that they might have been modified. |
Methods inherited from class org.springframework.web.context.request.AbstractRequestAttributes |
---|
isRequestActive, registerRequestDestructionCallback, removeRequestDestructionCallback, requestCompleted |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DESTRUCTION_CALLBACK_NAME_PREFIX
String
prefixed to the name of a
destruction callback when it is stored in a PortletSession
.
Constructor Detail |
---|
public PortletRequestAttributes(javax.portlet.PortletRequest request)
request
- current portlet requestMethod Detail |
---|
public final javax.portlet.PortletRequest getRequest()
PortletRequest
that we're wrapping.
protected final javax.portlet.PortletSession getSession(boolean allowCreate)
PortletSession
that we're wrapping.
allowCreate
- whether to allow creation of a new session if none exists yetpublic java.lang.Object getAttribute(java.lang.String name, int scope)
public void setAttribute(java.lang.String name, java.lang.Object value, int scope)
public void removeAttribute(java.lang.String name, int scope)
public java.lang.String[] getAttributeNames(int scope)
public void registerDestructionCallback(java.lang.String name, java.lang.Runnable callback, int scope)
public java.lang.Object resolveReference(java.lang.String key)
public java.lang.String getSessionId()
public java.lang.Object getSessionMutex()
protected void updateAccessedSessionAttributes()
session.setAttribute
calls, explicitly indicating to the container that they might have been modified.
updateAccessedSessionAttributes
in class org.springframework.web.context.request.AbstractRequestAttributes
protected void registerSessionDestructionCallback(java.lang.String name, java.lang.Runnable callback)
Note: The callback object should be serializable in order to survive web app restarts.
name
- the name of the attribute to register the callback forcallback
- the callback to be executed for destructionpublic java.lang.String toString()
toString
in class java.lang.Object
|
spring-webmvc-portlet | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |