Package org.opencms.flex
Class CmsFlexRequestKey
- java.lang.Object
-
- org.opencms.flex.CmsFlexRequestKey
-
public class CmsFlexRequestKey extends java.lang.Object
Describes the caching behaviour (or caching options) for a Flex request.- Since:
- 6.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsFlexRequestKey.PathsBean
Contains the root paths to be used for determining the buckets of a flex cache entry.
-
Constructor Summary
Constructors Constructor Description CmsFlexRequestKey(javax.servlet.http.HttpServletRequest req, java.lang.String target, boolean online)
This constructor is used when building a cache key from a request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
Returns the request attributes.java.lang.String
getContainerElement()
Returns the current container element.java.lang.String
getDevice()
Returns the device.java.lang.String
getElement()
Returns the element.java.lang.String
getEncoding()
Returns the encoding.java.lang.String
getIp()
Returns the ip.java.lang.String
getLocale()
Returns the locale.java.util.Map<java.lang.String,java.lang.String[]>
getParams()
Returns the parameters.CmsFlexRequestKey.PathsBean
getPaths()
Gets the bean containing the paths which should be used to determine the flex cache buckets for this entry.java.lang.Integer
getPort()
Returns the port.java.lang.String
getResource()
Returns the resource.java.lang.String
getScheme()
Returns the schemes.javax.servlet.http.HttpSession
getSession()
Returns the the current users session, ornull
if the current user has no session.java.lang.String
getSite()
Returns the site root.java.lang.String
getUri()
Returns the uri.java.lang.String
getUser()
Returns the user.boolean
isForceAbsoluteLinks()
Returns true if the 'force absolute links' flag is set in the request context.
-
-
-
Constructor Detail
-
CmsFlexRequestKey
public CmsFlexRequestKey(javax.servlet.http.HttpServletRequest req, java.lang.String target, boolean online)
This constructor is used when building a cache key from a request.The request contains several data items that are neccessary to construct the output. These items are e.g. the Query-String, the requested resource, the current time etc. etc. All required items are saved in the constructed cache - key.
- Parameters:
req
- the request to construct the key fortarget
- the requested resource in the OpenCms VFSonline
- must be true for an online resource, false for offline resources
-
-
Method Detail
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns the request attributes.- Returns:
- the request attributes
-
getContainerElement
public java.lang.String getContainerElement()
Returns the current container element.- Returns:
- the current container element
-
getDevice
public java.lang.String getDevice()
Returns the device.- Returns:
- the device
-
getElement
public java.lang.String getElement()
Returns the element.- Returns:
- the element
-
getEncoding
public java.lang.String getEncoding()
Returns the encoding.- Returns:
- the encoding
-
getIp
public java.lang.String getIp()
Returns the ip.- Returns:
- the ip
-
getLocale
public java.lang.String getLocale()
Returns the locale.- Returns:
- the locale
-
getParams
public java.util.Map<java.lang.String,java.lang.String[]> getParams()
Returns the parameters.- Returns:
- the parameters
-
getPaths
public CmsFlexRequestKey.PathsBean getPaths()
Gets the bean containing the paths which should be used to determine the flex cache buckets for this entry.- Returns:
- the bean with the paths for this entry
-
getPort
public java.lang.Integer getPort()
Returns the port.- Returns:
- the port
-
getResource
public java.lang.String getResource()
Returns the resource.- Returns:
- the resource
-
getScheme
public java.lang.String getScheme()
Returns the schemes.- Returns:
- the schemes
-
getSession
public javax.servlet.http.HttpSession getSession()
Returns the the current users session, ornull
if the current user has no session.- Returns:
- the current users session, or
null
if the current user has no session
-
getSite
public java.lang.String getSite()
Returns the site root.- Returns:
- the site root
-
getUri
public java.lang.String getUri()
Returns the uri.- Returns:
- the uri
-
getUser
public java.lang.String getUser()
Returns the user.- Returns:
- the user
-
isForceAbsoluteLinks
public boolean isForceAbsoluteLinks()
Returns true if the 'force absolute links' flag is set in the request context.- Returns:
- the 'force absolute links' flag from the request context
-
-