HDIV API 2.0.4

org.hdiv.filter
Interface IValidationHelper

All Known Implementing Classes:
AbstractValidatorHelper, ValidatorHelperRequest, ValidatorHelperThreadLocal

public interface IValidationHelper

Interface to validate a client request.

Author:
Roberto Velasco, Gorka Vicente

Method Summary
 void endPage()
          It is called in the post-processing stage of each user request.
 RequestWrapper getRequestWrapper()
           
 java.lang.String getTarget()
           
 void init(javax.servlet.http.HttpServletRequest request)
          Initialization of the objects needed for the validation process.
 void setHdivConfig(HDIVConfig hdivConfig)
           
 void setRequestWrapper(RequestWrapper request)
           
 void setTarget(java.lang.String target)
           
 void setTargetWithoutContextPath(java.lang.String targetWithoutContextPath)
           
 void startPage()
          It is called in the pre-processing stage of each user request.
 boolean validate()
          Checks if the values of the parameters received in the request request are valid.
 

Method Detail

init

void init(javax.servlet.http.HttpServletRequest request)
Initialization of the objects needed for the validation process.

Parameters:
request - HTTP servlet request
Throws:
HDIVException - if there is an initialization error.

validate

boolean validate()
Checks if the values of the parameters received in the request request are valid. These values are valid if and only if the noneditable parameters havenīt been modified.

Returns:
True If all the parameter values of the request request pass the the HDIV validation. False, otherwise.
Throws:
HDIVException - If the request doesn't pass the HDIV validation an exception is thrown explaining the cause of the error.

getRequestWrapper

RequestWrapper getRequestWrapper()
Returns:
Returns the uwrapper for HTTP servlet request.

setHdivConfig

void setHdivConfig(HDIVConfig hdivConfig)
Parameters:
hdivConfig - The HDIV configuration object to set.

getTarget

java.lang.String getTarget()
Returns:
Returns the target.

setTarget

void setTarget(java.lang.String target)
Parameters:
target - The target to set.

setRequestWrapper

void setRequestWrapper(RequestWrapper request)
Parameters:
request - The request to set. Only for testing.

setTargetWithoutContextPath

void setTargetWithoutContextPath(java.lang.String targetWithoutContextPath)
Parameters:
targetWithoutContextPath - The targetWithoutContextPath to set. Only for testing.

startPage

void startPage()
It is called in the pre-processing stage of each user request.


endPage

void endPage()
It is called in the post-processing stage of each user request.


HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.