|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.flex.CmsFlexRequestContextInfo
public class CmsFlexRequestContextInfo
Contains information about the OpenCms request context required by the Flex implementation.
An instance of this class is attached to every CmsRequestContext
as
an attribute as soon as the request context is wrapped in a flex response.
Information about the "last modified" and "expire" times of VFS resources are
stored in this Object.
Constructor Summary | |
---|---|
CmsFlexRequestContextInfo()
Public constructor. |
Method Summary | |
---|---|
long |
getDateExpires()
Returns the "expires" date for this context. |
long |
getDateLastModified()
Returns the "last modified" date for this context. |
void |
merge(CmsFlexRequestContextInfo other)
Merges this context info with the values from the other context info. |
void |
updateDateExpires(long dateExpires)
Updates the "expires" date for this context with the given value. |
void |
updateDateLastModified(long dateLastModified)
Updates the "last modified" date for this context with the given value. |
void |
updateDates(long dateLastModified,
long dateExpires)
Updates both the "last modified" and the "expires" date for this context with the given values. |
void |
updateFromResource(CmsResource resource)
Updates the "last modified" date for this context as well as the "expires" date with the values from a given resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsFlexRequestContextInfo()
Method Detail |
---|
public long getDateExpires()
public long getDateLastModified()
public void merge(CmsFlexRequestContextInfo other)
other
- the context info to merge withpublic void updateDateExpires(long dateExpires)
dateExpires
- the value to update the "expires" date withpublic void updateDateLastModified(long dateLastModified)
The currently stored value is only updated with the new value if the new value is either larger (i.e. newer) then the stored value, or if the new value is less then zero, which indicates that the "last modified" optimization can not be used because the element is dynamic.
dateLastModified
- the value to update the "last modified" date withpublic void updateDates(long dateLastModified, long dateExpires)
dateLastModified
- the value to update the "last modified" date withdateExpires
- the value to update the "expires" date withpublic void updateFromResource(CmsResource resource)
The "expires" date is the calculated from the given date values of resource release and expiration and also the current time.
resource
- the resource to use for updating the context values
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |