|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface describes a resource loader for OpenCms, a class that can load a resource from the VFS, process it's contents and deliver the result to the user.
The I_CmsResourceLoader operates with Request and Response in much the same way as a standard Java web application.
The I_CmsResourceLoader is closely related to the I_CmsLauncher
interface. In essence, both interfaces serve the same purpose.
However, the I_ResourceLoader is much closer related to the standard
Java Servlet API then the I_CmsLauncher, which makes it easier to
understand for the novice OpenCms programmer. That way, a programmer
will hopefully need less time to get productive with OpenCms.
This interface uses a standard servlet
HttpServletRequestWrapper / HttpServletResponseWrapper
that provide access to a special implementation of the RequestDispatcher.
The handling of the output written to the response is done by this
dispatcher. The results are then passed back to OpenCms which
will deliver them to the requesting user.
CmsFlexRequest,
CmsFlexResponse,
CmsFlexRequestDispatcher| Field Summary | |
static String |
C_LOADER_CACHENAME
Name of FlexCache runtime property |
static String |
C_LOADER_CACHEPROPERTY
The name of the VFS property that steers the caching |
static String |
C_LOADER_EXCEPTION_PREFIX
Prefix for exception message that occurs in a loaded file |
static String |
C_LOADER_STREAMPROPERTY
The name of the VFS property that steers the streaming |
| Method Summary | |
void |
destroy()
Destroy this ResourceLoder |
String |
getResourceLoaderInfo()
Return a String describing the ResourceLoader |
void |
init(A_OpenCms openCms)
Initialize the ResourceLoader. |
void |
load(CmsObject cms,
CmsFile file,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Basic top-page processing method for a I_CmsResourceLoader, this method is called if the page is called as a sub-element on a page not already loded with a I_CmsResourceLoader, which most often would be an I_CmsLauncher then. |
void |
service(CmsObject cms,
CmsResource file,
CmsFlexRequest req,
CmsFlexResponse res)
Does the job of including the requested resource, this method is called directly if the element is called as a sub-element from another I_CmsResourceLoader. |
| Field Detail |
public static final String C_LOADER_CACHEPROPERTY
public static final String C_LOADER_STREAMPROPERTY
public static final String C_LOADER_CACHENAME
public static final String C_LOADER_EXCEPTION_PREFIX
| Method Detail |
public void init(A_OpenCms openCms)
openCms - An A_OpenCms object to use for initalizing.public void destroy()
public String getResourceLoaderInfo()
public void load(CmsObject cms,
CmsFile file,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
IOException
cms - the initialized CmsObject which provides user permissionsfile - the requested OpenCms VFS resourcereq - the original servlet requestres - the original servlet response
javax.servlet.ServletException - might be thrown in the process of including the JSP
IOException - might be thrown in the process of including the JSPservice(CmsObject, CmsResource, CmsFlexRequest, CmsFlexResponse)
public void service(CmsObject cms,
CmsResource file,
CmsFlexRequest req,
CmsFlexResponse res)
throws javax.servlet.ServletException,
IOException
cms - used to access the OpenCms VFSfile - the reqested JSP file resource in the VFSreq - the current requestres - the current response
javax.servlet.ServletException - might be thrown in the process of including the JSP
IOException - might be thrown in the process of including the JSPCmsFlexRequestDispatcher
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||