org.jwarp.service.web.util
Class WebParamValidator

java.lang.Object
  |
  +--org.jwarp.service.web.util.WebParamValidator

public class WebParamValidator
extends java.lang.Object

This is a class to describe one parameter.

Version:
1.0
Author:
Anatole Tresch, Martin Schaefer

Method Summary
static void validate(javax.servlet.http.HttpServletRequest req, IParameterDescription descr)
          validate a parameter description to the given request.
static void validateContents(javax.servlet.http.HttpServletRequest req, IParameterDescription descr)
          Validates content of a parameter
implemented: INTEGER FLOAT DOUBLE LONG BOOLEAN
not yet implemented: TIME DATE DATETIME
if requiredType == CHECKED the validate function is called
static void validateExistence(javax.servlet.http.HttpServletRequest req, IParameterDescription descr)
          Checks existence of NOT_EMPTY parameter
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public static void validate(javax.servlet.http.HttpServletRequest req,
                            IParameterDescription descr)
                     throws ParameterNotFoundException,
                            ParameterException
validate a parameter description to the given request.
Parameters:
req - The http request
descr - The parameter description
Throws:
ParameterNotFoundException - if a NOT_NULL parameter is missing
ParameterException - if the parameter is not valid

validateExistence

public static void validateExistence(javax.servlet.http.HttpServletRequest req,
                                     IParameterDescription descr)
                              throws ParameterNotFoundException
Checks existence of NOT_EMPTY parameter
Parameters:
req - The request
Throws:
ParameterNotFoundException - if a NOT_NULL parameter is missing

validateContents

public static void validateContents(javax.servlet.http.HttpServletRequest req,
                                    IParameterDescription descr)
                             throws ParameterException
Validates content of a parameter
implemented: INTEGER FLOAT DOUBLE LONG BOOLEAN
not yet implemented: TIME DATE DATETIME
if requiredType == CHECKED the validate function is called
Parameters:
context - The servlet
req - The request
Throws:
ParameterException - if validation fails

©   O R C A   S y s t e m s