|
ValidateThis API Documentation | ||||
| FRAMES | |||||
WEB-INF.cftags.component
ValidateThis.core.BOValidator
public class BOValidator
I am a validator responsible for holding validation rules for a business object.
| Constructor Summary | |
|---|---|
init(string objectType, any FileSystem, any externalFileReader, any annotationReader, any ServerValidator, any ClientValidator, any TransientFactory, any CommonScriptGenerator, any Version, string defaultFormName, string defaultJSLib, string JSIncludes, string definitionPath, string specificDefinitionPath, any theObject, any componentPath, string debuggingMode, string defaultLocale)
I build a new BOValidator |
|
| Method Summary | |
|---|---|
void |
addRule(any propertyName, any valType, [any clientFieldName='[runtime expression]'], [any propertyDesc='[runtime expression]'], [Struct condition='[runtime expression]'], [Struct parameters='[runtime expression]'], [any contexts=''], [any failureMessage=''], [any formName=''])
I am used to add a rule via CF code |
any |
determineFormName(any theArguments)
I try to determine the form name by looking at the missing method arguments |
private string |
determineLabel(string label)
|
any |
determineLocale(any theArguments)
I try to determine the locale by looking at the missing method arguments |
private any |
determineRequiredPropertiesAndFields()
|
any |
determineScriptType(any methodName)
I try to determine the script type by looking at the missing method name |
boolean |
fieldIsRequired(any fieldName, [any context=''])
I determine whether a field is required |
any |
fixDefaultContext(any Context)
|
any |
getAllContexts()
|
any |
getFormName(any Context)
|
any |
getHashFromStruct(struct args)
|
any |
getInitializationScript([any JSLib='[runtime expression]'], [Any JSIncludes='[runtime expression]'], [Any locale='[runtime expression]'])
I generate JS statements required to setup client-side validations for VT |
any |
getObjectType()
I get the BOValidator Object type |
string |
getPropertyDescription(string propertyName)
Returns the descriptive name of a property |
any |
getRequiredFields([any Context=''])
|
any |
getRequiredProperties([any Context=''])
|
any |
getRequiredPropertiesAndDescs([string context=''])
|
any |
getValidationClientFieldDescs()
|
any |
getValidationFormContexts()
|
any |
getValidationPropertyDescs()
|
any |
getValidationRulesStruct([any Context=''], [any formName='[runtime expression]'], [any JSLib='[runtime expression]'], [Any locale='[runtime expression]'], [Any theObject=''])
I generate the JS using the Client Validator script |
any |
getValidationScript([any Context=''], [any formName='[runtime expression]'], [any JSLib='[runtime expression]'], [Any locale='[runtime expression]'], [Any theObject=''])
I generate the JS using the Client Validator script |
any |
getValidations([any Context=''])
|
any |
getVersion()
I report the current version of the framework |
private void |
loadRulesFromAnnotations(any objectType, any theObject, any componentPath)
I ask the externalFileReader to read the validations XML file and reformat it into a struct |
private void |
loadRulesFromExternalFile(any objectType, any definitionPath)
I ask the externalFileReader to read the validations XML file and reformat it into a struct |
void |
loadRulesFromStruct(struct theStruct)
I take a struct of validation data and call addrule for each validation |
any |
newBusinessObjectWrapper(any theObject)
I create a BusinessObjectWrapper object |
any |
newResult()
I create a Result object |
Any |
onMissingMethod(any missingMethodName, any missingMethodArguments)
This is used to eliminate the need for duplicate methods which all just pass calls on to the Client Validator |
boolean |
propertyIsRequired(any propertyName, [any Context=''])
I determine whether a property is required |
any |
validate(any theObject, [any Context=''], [any Result=''], [array objectList='[runtime expression]'], [string debuggingMode='[runtime expression]'], [boolean ignoreMissingProperties='false'], [string locale='[runtime expression]'])
I perform the validations using the Server Validator, returning info in the result object |
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Constructor Detail |
|---|
public init(string objectType, any FileSystem, any externalFileReader, any annotationReader, any ServerValidator, any ClientValidator, any TransientFactory, any CommonScriptGenerator, any Version, string defaultFormName, string defaultJSLib, string JSIncludes, string definitionPath, string specificDefinitionPath, any theObject, any componentPath, string debuggingMode, string defaultLocale)
objectTypeFileSystemexternalFileReaderannotationReaderServerValidatorClientValidatorTransientFactoryCommonScriptGeneratorVersiondefaultFormNamedefaultJSLibJSIncludesdefinitionPathspecificDefinitionPaththeObject - The object from which to read annotations, a blank means no object was passedcomponentPath - The component path to the object - used to read annotations using getComponentMetadatadebuggingMode - The debuggingMode from the VTConfig structdefaultLocale - The defaultLocale for the resource bundle| Method Detail |
|---|
public void addRule(any propertyName, any valType, [any clientFieldName='[runtime expression]'], [any propertyDesc='[runtime expression]'], [Struct condition='[runtime expression]'], [Struct parameters='[runtime expression]'], [any contexts=''], [any failureMessage=''], [any formName=''])
propertyNamevalTypeclientFieldNamepropertyDescconditionparameterscontextsfailureMessageformNamepublic any determineFormName(any theArguments)
theArgumentsprivate string determineLabel(string label)
labelpublic any determineLocale(any theArguments)
theArgumentsprivate any determineRequiredPropertiesAndFields()
public any determineScriptType(any methodName)
methodNamepublic boolean fieldIsRequired(any fieldName, [any context=''])
fieldName - The name of the property.contextpublic any fixDefaultContext(any Context)
Contextpublic any getAllContexts()
public any getFormName(any Context)
Contextpublic any getHashFromStruct(struct args)
argspublic any getInitializationScript([any JSLib='[runtime expression]'], [Any JSIncludes='[runtime expression]'], [Any locale='[runtime expression]'])
JSLibJSIncludeslocalepublic any getObjectType()
public string getPropertyDescription(string propertyName)
propertyNamepublic any getRequiredFields([any Context=''])
Contextpublic any getRequiredProperties([any Context=''])
Contextpublic any getRequiredPropertiesAndDescs([string context=''])
contextpublic any getValidationClientFieldDescs()
public any getValidationFormContexts()
public any getValidationPropertyDescs()
public any getValidationRulesStruct([any Context=''], [any formName='[runtime expression]'], [any JSLib='[runtime expression]'], [Any locale='[runtime expression]'], [Any theObject=''])
ContextformName - The name of the form for which validations are being generated.JSLiblocaletheObjectpublic any getValidationScript([any Context=''], [any formName='[runtime expression]'], [any JSLib='[runtime expression]'], [Any locale='[runtime expression]'], [Any theObject=''])
ContextformName - The name of the form for which validations are being generated.JSLiblocaletheObjectpublic any getValidations([any Context=''])
Contextpublic any getVersion()
private void loadRulesFromAnnotations(any objectType, any theObject, any componentPath)
objectTypetheObjectcomponentPathprivate void loadRulesFromExternalFile(any objectType, any definitionPath)
objectTypedefinitionPathpublic void loadRulesFromStruct(struct theStruct)
theStructpublic any newBusinessObjectWrapper(any theObject)
theObjectpublic any newResult()
public Any onMissingMethod(any missingMethodName, any missingMethodArguments)
missingMethodNamemissingMethodArgumentspublic boolean propertyIsRequired(any propertyName, [any Context=''])
propertyName - The name of the property.Contextpublic any validate(any theObject, [any Context=''], [any Result=''], [array objectList='[runtime expression]'], [string debuggingMode='[runtime expression]'], [boolean ignoreMissingProperties='false'], [string locale='[runtime expression]'])
theObjectContextResultobjectListdebuggingModeignoreMissingPropertieslocale
|
ValidateThis API Documentation | ||||
| FRAMES | |||||