Package lumis.portal
Class PortalRequestContext
- java.lang.Object
-
- lumis.portal.PortalRequestContext
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,javax.servlet.jsp.el.VariableResolver
public class PortalRequestContext extends java.lang.Object implements javax.servlet.jsp.el.VariableResolver, java.lang.AutoCloseable
Stores all request context on LumisXP.
The request context can be Devices informations, Session informations, information from External Entities, etc.
It's possible to plug custom Request Context developed by user. In this case just use the
#setEntry(String, IPortalRequestContextEntry)
.- Since:
- 6.0.0
- Version:
- $Revision$ $Date$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PortalRequestContext.IPortalRequestContextCampaignProvider
Provides the value used for the campaign entry in thePortalRequestContext
.
-
Constructor Summary
Constructors Constructor Description PortalRequestContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.util.Map<java.lang.String,java.lang.String>
getDeviceEntry()
Returns the Device Request Context thats contains all information about the device that is making the current request.java.lang.Object
getEntry(java.lang.String key)
Returns the specific request context based on Key parameter.static PortalRequestContext
getPortalRequestContext(javax.servlet.http.HttpServletRequest request)
Returns the Portal Request Context from a given request.static PortalRequestContext
getPortalRequestContext(IServiceInterfaceRequest request)
Returns the Portal Request Context from a given request.java.lang.Object
resolveVariable(java.lang.String pName)
void
setEntry(java.lang.String key, java.lang.Object value)
Puts a custom request context on the context map to be used in another time.
-
-
-
Method Detail
-
getEntry
public java.lang.Object getEntry(java.lang.String key)
Returns the specific request context based on Key parameter.- Parameters:
key
- id of the Request context to be find. This information is the entry key of the map.- Returns:
- the Request Context that match with key parameter.
- Since:
- 6.0.0
-
getDeviceEntry
public java.util.Map<java.lang.String,java.lang.String> getDeviceEntry()
Returns the Device Request Context thats contains all information about the device that is making the current request.- Returns:
- a map with the device properties.
- Since:
- 6.0.0
-
setEntry
public void setEntry(java.lang.String key, java.lang.Object value)
Puts a custom request context on the context map to be used in another time.- Parameters:
key
- name of the Request Context. This information is the entry key of the map.value
- the custom context value. If it implementsSupplier
, it will be replaced by theSupplier.get()
value when accessed (as a lazy load feature).- Since:
- 6.0.0
-
resolveVariable
public java.lang.Object resolveVariable(java.lang.String pName) throws javax.servlet.jsp.el.ELException
- Specified by:
resolveVariable
in interfacejavax.servlet.jsp.el.VariableResolver
- Throws:
javax.servlet.jsp.el.ELException
-
getPortalRequestContext
public static PortalRequestContext getPortalRequestContext(javax.servlet.http.HttpServletRequest request)
Returns the Portal Request Context from a given request.- Parameters:
request
- request that contains the PortalRequestContext.- Returns:
- the Portal Request Context.
- Since:
- 6.0.0
-
getPortalRequestContext
public static PortalRequestContext getPortalRequestContext(IServiceInterfaceRequest request)
Returns the Portal Request Context from a given request.- Parameters:
request
- request that contains the PortalRequestContext.- Returns:
- the Portal Request Context.
- Since:
- 6.0.0
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-