/** * 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); }
/** * Constructor that must be used if the stream should write * only to a buffer.<p> */ public CmsServletOutputStream() { m_servletStream = null; clear(); }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsFlexCacheException(container, cause); } }
/** * 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()); }
/** * Adds another flex request/response pair to the stack.<p> * * @param req the request to add * @param res the response to add */ public void push(CmsFlexRequest req, CmsFlexResponse res) { m_flexRequestList.add(req); m_flexResponseList.add(res); m_flexContextInfoList.add(new CmsFlexRequestContextInfo()); updateRequestContextInfo(); }
/** * Method overload from the standard HttpServletRequest API.<p> * * @see javax.servlet.ServletResponse#getWriter() */ @Override public PrintWriter getWriter() throws IOException { if (m_writer == null) { initStream(); } return m_writer; }
/** * Set caching status for this response.<p> * * Will always be set to <code>"true"</code> if setOnlyBuffering() is set to <code>"true"</code>. * Currently this is an optimization for non - JSP elements that * are known not to be cachable.<p> * * @param value the value to set */ void setCmsCachingRequired(boolean value) { m_cachingRequired = (value || m_writeOnlyToBuffer) && !m_controller.isForwardMode(); }
/** * @see org.opencms.monitor.I_CmsMemoryMonitorable#getMemorySize() */ public int getMemorySize() { return getLruCacheCosts(); }
/** * Method overload from the standard HttpServletRequest API.<p> * * @see javax.servlet.http.HttpServletResponse#sendRedirect(java.lang.String) * * @throws IllegalArgumentException In case of a malformed location string */ @Override public void sendRedirect(String location) throws IOException { sendRedirect(location, false); }
/** * Method overload from the standard HttpServletRequest API.<p> * * @see javax.servlet.http.HttpServletResponse#setIntHeader(java.lang.String, int) */ @Override public void setIntHeader(String name, int value) { setHeader(name, "" + value); }
/** * Creates a new instance.<p> * * @param cms the CMS context to use */ public CmsTemplateContextManager(CmsObject cms) { m_cms = cms; CmsFlexController.registerUncacheableAttribute(ATTR_TEMPLATE_RESOURCE); CmsFlexController.registerUncacheableAttribute(ATTR_TEMPLATE_CONTEXT); CmsFlexController.registerUncacheableAttribute(ATTR_TEMPLATE_RESOURCE); }
/** * 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 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); }
/** * Constructor that must be used if the stream should write * only to a buffer.<p> */ public CmsServletOutputStream() { m_servletStream = null; clear(); }
/** * Method overload from the standard HttpServletRequest API.<p> * * @see javax.servlet.ServletResponse#getOutputStream() */ @Override public ServletOutputStream getOutputStream() throws IOException { if (m_out == null) { initStream(); } return m_out; }
/** * Set caching status for this response.<p> * * Will always be set to <code>"true"</code> if setOnlyBuffering() is set to <code>"true"</code>. * Currently this is an optimization for non - JSP elements that * are known not to be cachable.<p> * * @param value the value to set */ void setCmsCachingRequired(boolean value) { m_cachingRequired = (value || m_writeOnlyToBuffer) && !m_controller.isForwardMode(); }
/** * @see org.opencms.monitor.I_CmsMemoryMonitorable#getMemorySize() */ public int getMemorySize() { return getLruCacheCosts(); }
/** * Constructor that must be used if the stream should write * to a buffer and to another stream at the same time.<p> * * @param servletStream The stream to write to */ public CmsServletOutputStream(ServletOutputStream servletStream) { m_servletStream = servletStream; clear(); }
/** * Method overload from the standard HttpServletRequest API.<p> * * @see javax.servlet.ServletResponse#getWriter() */ @Override public PrintWriter getWriter() throws IOException { if (m_writer == null) { initStream(); } return m_writer; }
/** * Constructor that must be used if the stream should write * to a buffer and to another stream at the same time.<p> * * @param servletStream The stream to write to */ public CmsServletOutputStream(ServletOutputStream servletStream) { m_servletStream = servletStream; clear(); }