ValidateThis API Documentation

ValidateThis.core
Class Validation

WEB-INF.cftags.component
        extended by ValidateThis.core.Validation

public class Validation
extends WEB-INF.cftags.component

I am a transient validation object.


Constructor Summary
init(any objectChecker, any parameter)
          I am the constructor
 
Method Summary
 void addParameter(string name, any value, [string type='value'])
 void fail(any FailureMessage)
          I do what needs to be done when a validation fails
 void failWithResult(any result)
          I do what needs to be done when a validation fails
 any getClientFieldName()
 any getClientTest()
 any getCondition()
 any getConditionName()
 any getContext()
 any getCurrentLocale()
 any getFailureMessage()
 any getIsRequired()
 any getIsSuccess()
 any getMemento()
 array getObjectList()
 string getObjectType()
 any getObjectValue([any propertyName='[runtime expression]'])
          I return the value from the stored object that corresponds to the field being validated
 any getParameter(string parameterName)
 any getParameterValue(string parameterName, [any defaultValue=''])
 any getParameters()
          This will process the Parameters struct to return just values
 any getPropertyDesc()
 string getPropertyMethodName([any propertyName='[runtime expression]'])
          I determine the method to use for a given property
 any getPropertyName()
 any getResult()
 any getServerTest()
 any getTheObject()
 any getValType()
 any getValidateThis()
 any hasClientTest()
 any hasCondition()
 any hasFailureMessage()
 boolean hasParameter(string name)
 boolean hasParameters()
 boolean hasResult()
 any hasServerTest()
 any load(any ValStruct)
          I load a fresh validation rule into the validation object, which allows it to be reused
 boolean propertyExists([any propertyName='[runtime expression]'])
          I report whether a property exists in the object being validated
 boolean propertyHasValue([any propertyName='[runtime expression]'])
          I determine whether the property that the validation references has a value
 void setClientFieldName(any ClientFieldName)
 void setCondition(any Condition)
 any setContext([string context=''])
 any setCurrentLocale([string currentLocale=''])
 void setFailureMessage(any FailureMessage)
 void setIsRequired(any IsRequired)
 void setIsSuccess(any IsSuccess)
 void setObjectList(array objectList)
 void setObjectType(string ObjectType)
 void setParameters(any Parameters)
 void setPropertyDesc(any PropertyDesc)
 void setPropertyName(any PropertyName)
 any setResult([any result=''])
 void setTheObject(any theObject)
 void setValType(any ValType)
 any setup(any ValidateThis, [any theObject=''], [array objectList='[runtime expression]'])
          I am called after the constructor to load data into an instance
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

Public init(any objectChecker, any parameter)
I am the constructor

Parameters:
objectChecker - A component used to distinguish object types
parameter - A reusable transient Parameter object
Method Detail

addParameter

public void addParameter(string name, any value, [string type='value'])

Parameters:
name
value
type

fail

public void fail(any FailureMessage)
I do what needs to be done when a validation fails.

Parameters:
FailureMessage - A Failure message to store.

failWithResult

public void failWithResult(any result)
I do what needs to be done when a validation fails.

Parameters:
result - A Failure message to store.

getClientFieldName

public any getClientFieldName()


getClientTest

public any getClientTest()


getCondition

public any getCondition()


getConditionName

public any getConditionName()


getContext

public any getContext()


getCurrentLocale

public any getCurrentLocale()


getFailureMessage

public any getFailureMessage()


getIsRequired

public any getIsRequired()


getIsSuccess

public any getIsSuccess()


getMemento

public any getMemento()


getObjectList

public array getObjectList()


getObjectType

public string getObjectType()


getObjectValue

public any getObjectValue([any propertyName='[runtime expression]'])
I return the value from the stored object that corresponds to the field being validated.

Parameters:
propertyName

getParameter

public any getParameter(string parameterName)

Parameters:
parameterName

getParameterValue

public any getParameterValue(string parameterName, [any defaultValue=''])

Parameters:
parameterName
defaultValue

getParameters

public any getParameters()
This will process the Parameters struct to return just values.


getPropertyDesc

public any getPropertyDesc()


getPropertyMethodName

public string getPropertyMethodName([any propertyName='[runtime expression]'])
I determine the method to use for a given property.

Parameters:
propertyName

getPropertyName

public any getPropertyName()


getResult

public any getResult()


getServerTest

public any getServerTest()


getTheObject

public any getTheObject()


getValType

public any getValType()


getValidateThis

public any getValidateThis()


hasClientTest

public any hasClientTest()


hasCondition

public any hasCondition()


hasFailureMessage

public any hasFailureMessage()


hasParameter

public boolean hasParameter(string name)

Parameters:
name

hasParameters

public boolean hasParameters()


hasResult

public boolean hasResult()


hasServerTest

public any hasServerTest()


load

Public any load(any ValStruct)
I load a fresh validation rule into the validation object, which allows it to be reused

Parameters:
ValStruct - The validation struct from the xml file

propertyExists

public boolean propertyExists([any propertyName='[runtime expression]'])
I report whether a property exists in the object being validated.

Parameters:
propertyName

propertyHasValue

public boolean propertyHasValue([any propertyName='[runtime expression]'])
I determine whether the property that the validation references has a value.

Parameters:
propertyName

setClientFieldName

public void setClientFieldName(any ClientFieldName)

Parameters:
ClientFieldName

setCondition

public void setCondition(any Condition)

Parameters:
Condition

setContext

public any setContext([string context=''])

Parameters:
context

setCurrentLocale

public any setCurrentLocale([string currentLocale=''])

Parameters:
currentLocale

setFailureMessage

public void setFailureMessage(any FailureMessage)

Parameters:
FailureMessage

setIsRequired

public void setIsRequired(any IsRequired)

Parameters:
IsRequired

setIsSuccess

public void setIsSuccess(any IsSuccess)

Parameters:
IsSuccess

setObjectList

public void setObjectList(array objectList)

Parameters:
objectList

setObjectType

public void setObjectType(string ObjectType)

Parameters:
ObjectType

setParameters

public void setParameters(any Parameters)

Parameters:
Parameters

setPropertyDesc

public void setPropertyDesc(any PropertyDesc)

Parameters:
PropertyDesc

setPropertyName

public void setPropertyName(any PropertyName)

Parameters:
PropertyName

setResult

public any setResult([any result=''])

Parameters:
result

setTheObject

public void setTheObject(any theObject)

Parameters:
theObject

setValType

public void setValType(any ValType)

Parameters:
ValType

setup

Public any setup(any ValidateThis, [any theObject=''], [array objectList='[runtime expression]'])
I am called after the constructor to load data into an instance

Parameters:
ValidateThis - The ValidateThis.cfc facade object
theObject - The object being validated
objectList - A list of objects already validated

ValidateThis API Documentation