/** * Updates the "expires" date for this context with the given value.<p> * * @param dateExpires the value to update the "expires" date with */ public void updateDateExpires(long dateExpires) { if (dateExpires > System.currentTimeMillis()) { if (dateExpires < m_dateExpires) { m_dateExpires = dateExpires; } } else { updateDateLastModified(dateExpires); } }
/** * Updates the "expires" date for this context with the given value.<p> * * @param dateExpires the value to update the "expires" date with */ public void updateDateExpires(long dateExpires) { if (dateExpires > System.currentTimeMillis()) { if (dateExpires < m_dateExpires) { m_dateExpires = dateExpires; } } else { updateDateLastModified(dateExpires); } }
/** * Updates both the "last modified" and the "expires" date * for this context with the given values.<p> * * @param dateLastModified the value to update the "last modified" date with * @param dateExpires the value to update the "expires" date with */ public void updateDates(long dateLastModified, long dateExpires) { updateDateLastModified(dateLastModified); updateDateExpires(dateExpires); }
/** * Updates both the "last modified" and the "expires" date * for this context with the given values.<p> * * @param dateLastModified the value to update the "last modified" date with * @param dateExpires the value to update the "expires" date with */ public void updateDates(long dateLastModified, long dateExpires) { updateDateLastModified(dateLastModified); updateDateExpires(dateExpires); }
/** * Merges this context info with the values from the other context info.<p> * * @param other the context info to merge with */ public void merge(CmsFlexRequestContextInfo other) { updateDateLastModified(other.getDateLastModified()); updateDateExpires(other.getDateExpires()); }
/** * Merges this context info with the values from the other context info.<p> * * @param other the context info to merge with */ public void merge(CmsFlexRequestContextInfo other) { updateDateLastModified(other.getDateLastModified()); updateDateExpires(other.getDateExpires()); }
/** * Updates the "last modified" date for this context as well as the * "expires" date with the values from a given resource.<p> * * The "expires" date is the calculated from the given date values * of resource release and expiration and also the current time.<p> * * @param resource the resource to use for updating the context values */ public void updateFromResource(CmsResource resource) { // first set the last modification date updateDateLastModified(resource.getDateLastModified()); // now use both release and expiration date from the resource to update the expires info updateDateExpires(resource.getDateReleased()); updateDateExpires(resource.getDateExpired()); } }
/** * Updates the "last modified" date for this context as well as the * "expires" date with the values from a given resource.<p> * * The "expires" date is the calculated from the given date values * of resource release and expiration and also the current time.<p> * * @param resource the resource to use for updating the context values */ public void updateFromResource(CmsResource resource) { // first set the last modification date updateDateLastModified(resource.getDateLastModified()); // now use both release and expiration date from the resource to update the expires info updateDateExpires(resource.getDateReleased()); updateDateExpires(resource.getDateExpired()); } }