org.opencms.loader
Interface I_CmsResourceStringDumpLoader

All Known Implementing Classes:
CmsXmlContentLoader, CmsXmlPageLoader

public interface I_CmsResourceStringDumpLoader

Resource loaders that implement this method can easily provide the contents of a selected targe element as a String.

Since:
6.2.0
Version:
$Revision: 1.6 $
Author:
Alexander Kandzior

Method Summary
 java.lang.String dumpAsString(CmsObject cms, CmsResource resource, java.lang.String element, java.util.Locale locale, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
          Dumps the processed content of the the requested file (and it's sub-elements) to a String.
 

Method Detail

dumpAsString

java.lang.String dumpAsString(CmsObject cms,
                              CmsResource resource,
                              java.lang.String element,
                              java.util.Locale locale,
                              javax.servlet.ServletRequest req,
                              javax.servlet.ServletResponse res)
                              throws javax.servlet.ServletException,
                                     java.io.IOException,
                                     CmsException
Dumps the processed content of the the requested file (and it's sub-elements) to a String.

This is a special form of I_CmsResourceLoader.dump(CmsObject, CmsResource, String, Locale, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) where the result is required in a String, for example for printing it to a writer.

Parameters:
cms - used to access the OpenCms VFS
resource - the requested resource in the VFS
element - the element in the file to display
locale - the locale to display
req - the servlet request
res - the servlet response
Returns:
the content of the processed file as a String
Throws:
javax.servlet.ServletException - might be thrown by the servlet environment
java.io.IOException - might be thrown by the servlet environment
CmsException - in case of errors acessing OpenCms functions
See Also:
I_CmsResourceLoader.dump(CmsObject, CmsResource, String, Locale, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)