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

Class VAJToolsServlet

public abstract class VAJToolsServlet extends HttpServlet

Abstract base class to provide common services for the VAJ tool API servlets
Field Summary
static StringCLASSES_PARAM
static StringDEFAULT_EXCLUDES_PARAM
static StringDIR_PARAM
static StringEXCLUDE_PARAM
static StringINCLUDE_PARAM
static StringPROJECT_NAME_PARAM
static StringRESOURCES_PARAM
static StringSOURCES_PARAM
Method Summary
voiddoGet(HttpServletRequest req, HttpServletResponse res)
Respond to a HTTP request.
protected abstract voidexecuteRequest()
Execute the request by calling the appropriate VAJ tool API methods.
protected booleangetBooleanParam(String param)
Get the boolean value of a parameter.
protected booleangetBooleanParam(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 StringgetFirstParamValueString(String param)
Returns the first encountered value for a parameter.
protected String[]getParamValues(String param)
Returns all values for a parameter.
protected voidinitRequest()
initialize the servlet.
protected booleantoBoolean(String string)
A utility method to translate the strings "yes", "true", and "ok" to boolean true, and everything else to false.

Field Detail

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 Detail

doGet

public void doGet(HttpServletRequest req, HttpServletResponse res)
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()
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