com.xmlserv.main
Interface BackendModule

All Known Implementing Classes:
ContentGroupModule, GenericOverviewModule, LotteryModule, PollModule, UserStatusModule

public interface BackendModule

This interface is used by ContentManager implementations to interact with content generating modules that are dynamically instantiated. Objects must provide an empty constructor.


Method Summary
 boolean isCachable()
          Indicate whether instances may be cached by a ContentManager.
 org.jdom.Element toElement(java.sql.Connection con, java.lang.String context, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest req, SecurityManager securityManager)
          Main processing method.
 

Method Detail

toElement

public org.jdom.Element toElement(java.sql.Connection con,
                                  java.lang.String context,
                                  javax.servlet.ServletContext servletContext,
                                  javax.servlet.http.HttpServletRequest req,
                                  SecurityManager securityManager)
                           throws XMLServException
Main processing method. Implement isCachable() according to thread-safety of this method.
Parameters:
con - The DB connection.
context - The context String (the location where the module is integrated)
servletContext - The Servlet context.
req - The HTTP request.
securityManager - The SecurityManager instance.
Returns:
A JDOM Element.
Throws:
XMLServException - On any error.

isCachable

public boolean isCachable()
Indicate whether instances may be cached by a ContentManager.
Returns:
true if the instance is cachable, false otherwise.