com.rc.celeritas.controller
Class CrudWMServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.webmacro.servlet.WMServlet
              extended by com.rc.celeritas.controller.CrudWMServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.webmacro.WebMacro

public class CrudWMServlet
extends org.webmacro.servlet.WMServlet

Author:
rchoudhary
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.webmacro.servlet.WMServlet
_log
 
Fields inherited from interface org.webmacro.WebMacro
BUILD_DATE, VERSION
 
Constructor Summary
CrudWMServlet()
           
 
Method Summary
 boolean checkImpleoExists(java.lang.String nameKey)
           
static java.lang.String getAllowedPrincipals(java.lang.String table)
          This method will return the comma seperated list of values in celeritas-export.xml file for this table.
static java.util.Hashtable getMultipart(javax.servlet.http.HttpServletRequest req)
          Get a multipart web request into a hashtable.
static java.util.Hashtable getParameterMap(javax.servlet.http.HttpServletRequest req)
          Get a parameter map from HttpRequest object
static java.util.Hashtable getRequestMap(javax.servlet.ServletRequest req)
          Get a parameter map from HttpRequest object
 java.lang.String getSql(java.lang.String sqlRef)
          SQL String for the given SQL Key Reference
static java.lang.String getSqlProperty(java.lang.String key)
           
 org.webmacro.Template handle(org.webmacro.servlet.WebContext context)
           
 boolean registerImpleo(java.lang.String nameKey, Impleo impleo)
           
 void start()
           
 
Methods inherited from class org.webmacro.servlet.WMServlet
destroy, destroyContext, doGet, doPost, error, execute, getBroker, getConfig, getConfig, getContext, getErrorTemplate, getErrorTemplateName, getErrorVariableName, getFastWriter, getLog, getLog, getTemplate, getURL, getWebContext, init, init, initWebContext, initWebMacro, newContext, newWebContext, setLocale, stop, writeTemplate, writeTemplate
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrudWMServlet

public CrudWMServlet()
Method Detail

start

public void start()
Overrides:
start in class org.webmacro.servlet.WMServlet

handle

public org.webmacro.Template handle(org.webmacro.servlet.WebContext context)
                             throws org.webmacro.servlet.HandlerException
Specified by:
handle in class org.webmacro.servlet.WMServlet
Parameters:
context -
Returns:
Throws:
org.webmacro.servlet.HandlerException

getSqlProperty

public static java.lang.String getSqlProperty(java.lang.String key)
Parameters:
key -
Returns:

registerImpleo

public boolean registerImpleo(java.lang.String nameKey,
                              Impleo impleo)
                       throws ImpleoAlreadyExistException,
                              ImpleoMapEmptyException
Parameters:
nameKey -
impleo -
Returns:
Throws:
ImpleoAlreadyExistException
ImpleoMapEmptyException

checkImpleoExists

public boolean checkImpleoExists(java.lang.String nameKey)
                          throws ImpleoMapEmptyException
Parameters:
nameKey -
Returns:
Throws:
ImpleoMapEmptyException

getParameterMap

public static java.util.Hashtable getParameterMap(javax.servlet.http.HttpServletRequest req)
Get a parameter map from HttpRequest object

Parameters:
req - HttpRequest object
Returns:
Hashtable key value pairs in URL request

getRequestMap

public static java.util.Hashtable getRequestMap(javax.servlet.ServletRequest req)
Get a parameter map from HttpRequest object

Parameters:
req - HttpRequest object
Returns:
Hashtable key value pairs in URL request

getMultipart

public static java.util.Hashtable getMultipart(javax.servlet.http.HttpServletRequest req)
                                        throws java.io.IOException
Get a multipart web request into a hashtable. The files are converted to ByteArrayOutputStreams. Parameters are stored as name / value strings.

Parameters:
req - HttpServletRequest
Returns:
Hashtable
Throws:
java.io.IOException

getAllowedPrincipals

public static java.lang.String getAllowedPrincipals(java.lang.String table)
This method will return the comma seperated list of values in celeritas-export.xml file for this table.

Parameters:
table -
Returns:

getSql

public java.lang.String getSql(java.lang.String sqlRef)
SQL String for the given SQL Key Reference

Parameters:
sqlRef -
Returns:
java.lang.String


Copyright © 2008-2009 Rahul Choudhary. All Rights Reserved.