org.apache.tools.ant.taskdefs.optional.ide

Class VAJToolsServlet

Known Direct Subclasses:
VAJExportServlet, VAJImportServlet, VAJLoadServlet

public abstract class VAJToolsServlet
extends HttpServlet

Abstract base class to provide common services for the VAJ tool API servlets

Field Summary

static String
CLASSES_PARAM
static String
DEFAULT_EXCLUDES_PARAM
static String
DIR_PARAM
static String
EXCLUDE_PARAM
static String
INCLUDE_PARAM
static String
PROJECT_NAME_PARAM
static String
RESOURCES_PARAM
static String
SOURCES_PARAM

Method Summary

void
doGet(HttpServletRequest req, HttpServletResponse res)
Respond to a HTTP request.
protected abstract void
executeRequest()
Execute the request by calling the appropriate VAJ tool API methods.
protected boolean
getBooleanParam(String param)
Get the boolean value of a parameter.
protected boolean
getBooleanParam(String param, boolean defaultValue)
Get the boolean value of a parameter, with a default value if the parameter hasn't been passed to the servlet.
protected String
getFirstParamValueString(String param)
Returns the first encountered value for a parameter.
protected String[]
getParamValues(String param)
Returns all values for a parameter.
protected void
initRequest()
initialize the servlet.
protected boolean
toBoolean(String string)
A utility method to translate the strings "yes", "true", and "ok" to boolean true, and everything else to false.

Field Details

CLASSES_PARAM

public static final String CLASSES_PARAM

DEFAULT_EXCLUDES_PARAM

public static final String DEFAULT_EXCLUDES_PARAM

DIR_PARAM

public static final String DIR_PARAM

EXCLUDE_PARAM

public static final String EXCLUDE_PARAM

INCLUDE_PARAM

public static final String INCLUDE_PARAM

PROJECT_NAME_PARAM

public static final String PROJECT_NAME_PARAM

RESOURCES_PARAM

public static final String RESOURCES_PARAM

SOURCES_PARAM

public static final String SOURCES_PARAM

Method Details

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
            throws ServletException,
                   IOException
Respond to a HTTP request. This method initializes the servlet and handles errors. The real work is done in the abstract method executeRequest()

executeRequest

protected abstract void executeRequest()
Execute the request by calling the appropriate VAJ tool API methods. This method must be implemented by the concrete servlets

getBooleanParam

protected boolean getBooleanParam(String param)
Get the boolean value of a parameter.

getBooleanParam

protected boolean getBooleanParam(String param,
                                  boolean defaultValue)
Get the boolean value of a parameter, with a default value if the parameter hasn't been passed to the servlet.

getFirstParamValueString

protected String getFirstParamValueString(String param)
Returns the first encountered value for a parameter.

getParamValues

protected String[] getParamValues(String param)
Returns all values for a parameter.

initRequest

protected void initRequest()
            throws IOException
initialize the servlet.

toBoolean

protected boolean toBoolean(String string)
A utility method to translate the strings "yes", "true", and "ok" to boolean true, and everything else to false.

Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.