org.hdiv.dataValidator
Class DataValidator
java.lang.Object
org.hdiv.dataValidator.DataValidator
- All Implemented Interfaces:
- IDataValidator
public class DataValidator
- extends java.lang.Object
- implements IDataValidator
It uses an object of type IState and validates all the entry data, besides to
replacing the relative values by its real values.
- Author:
- Roberto Velasco, Oscar Ocariz
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataValidator
public DataValidator()
validate
public IValidationResult validate(java.lang.String value,
java.lang.String target,
java.lang.String parameter)
Checks if the value data sent by the user to the server in the
parameter parameter is correct or not. The received value is
checked with the one stored in the state to decide if it is correct.
In the encoded and hash strategies, the state is obtained from the user
request. However, in the memory strategy the state is obtained from the user
session, using the state identifier receiced within the request.
- Specified by:
validate in interface IDataValidator
- Parameters:
value - value sent by the clienttarget - target action nameparameter - parameter name
- Returns:
- object that represents the result of the validation process for the
parameter
parameter and the value data.
getValidationResult
public IValidationResult getValidationResult()
setValidationResult
public void setValidationResult(IValidationResult validationResult)
getState
public IState getState()
- Returns:
- Returns the validation process state.
setState
public void setState(IState state)
- Specified by:
setState in interface IDataValidator
- Parameters:
state - The validation process state to set.
setConfidentiality
public void setConfidentiality(java.lang.Boolean confidentiality)
- Parameters:
confidentiality - The confidentiality to set.
Copyright © 2008 hdiv.org. All Rights Reserved.