Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.aendvari.griffin.validation.dataset
Class Property  view Property download Property.java

java.lang.Object
  extended bycom.aendvari.griffin.validation.dataset.Property

public class Property
extends java.lang.Object

Defines a Property.

A property is a single item in which a validation is wish to be run upon.


Nested Class Summary
static interface Property.Type
          Constants for the type of the property.
 
Field Summary
private  java.lang.String errorHandler
          The name of the com.aendvari.griffin.validation.validator.ErrorHandler in which to call on this property.
private  java.util.HashMap errorHandlerParameterDefines
          A HashMap of name/com.aendvari.griffin.validation.validator.ParameterDefine pairs for the error handler's method.
private  java.lang.String path
          The path to retrieve the value of the property.
private  java.lang.String type
          The type of the property.
private  java.lang.String validator
          The name of the com.aendvari.griffin.validation.validator.Validator in which to call on this property.
private  java.util.HashMap validatorParameterDefines
          A HashMap of name/com.aendvari.griffin.validation.validator.ParameterDefine pairs for the validator's method.
private  java.lang.Object value
          The value of the property.
 
Constructor Summary
Property()
          Constructs an empty Validator instance.
 
Method Summary
private  void adjustParameters(com.aendvari.common.model.ModelTree modelTree, com.aendvari.common.model.ModelNode datasetNode, java.lang.Object defaultValue, com.aendvari.griffin.validation.validator.Handler handler)
          Sets the parameter values for each of the handlers' com.aendvari.griffin.validation.validator.ParameterDefine.
 void executeValidation(com.aendvari.common.model.ModelNode datasetNode, com.aendvari.common.util.MultiHashMap validators, java.util.HashMap handlers)
          Executes this classes' part of a Dataset validation.
 com.aendvari.griffin.validation.validator.ParameterDefine getErrorHandlerParameterDefine(java.lang.String name)
          Get a validator parameter.
private  com.aendvari.griffin.validation.validator.Validator getMatchingValidator(java.util.Collection list)
          Gets the matching com.aendvari.griffin.validation.validator.Validator instance from the collection of instances.
 java.lang.String getPath()
          Get the path of the property.
 java.lang.String getType()
          Get the type of the property.
 java.lang.String getValidator()
          Get the validator of the property.
 com.aendvari.griffin.validation.validator.ParameterDefine getValidatorParameterDefine(java.lang.String name)
          Get a validator parameter.
 java.lang.Object getValue()
          Get the value of the property.
 java.lang.String setErrorHandler()
          Get the validator of the property.
 void setErrorHandler(java.lang.String setErrorHandler)
          Set the error handler of the property.
 void setErrorHandlerParameterDefine(java.lang.String name, com.aendvari.griffin.validation.validator.ParameterDefine value)
          Add a validator parameter.
 void setPath(java.lang.String setPath)
          Set the path of the property.
 void setType(java.lang.String setType)
          Set the type of the property.
 void setValidator(java.lang.String setValidator)
          Set the validator of the property.
 void setValidatorParameterDefine(java.lang.String name, com.aendvari.griffin.validation.validator.ParameterDefine value)
          Add a validator parameter.
 java.lang.String toString()
          Convert this object into a String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

path

private java.lang.String path
The path to retrieve the value of the property.


type

private java.lang.String type
The type of the property.


value

private java.lang.Object value
The value of the property. This is only set within executeValidation and the value is derived from the ModelNode that is passed into that method call.


validator

private java.lang.String validator
The name of the com.aendvari.griffin.validation.validator.Validator in which to call on this property.


validatorParameterDefines

private java.util.HashMap validatorParameterDefines
A HashMap of name/com.aendvari.griffin.validation.validator.ParameterDefine pairs for the validator's method.


errorHandler

private java.lang.String errorHandler
The name of the com.aendvari.griffin.validation.validator.ErrorHandler in which to call on this property.


errorHandlerParameterDefines

private java.util.HashMap errorHandlerParameterDefines
A HashMap of name/com.aendvari.griffin.validation.validator.ParameterDefine pairs for the error handler's method.

Constructor Detail

Property

public Property()
Constructs an empty Validator instance.

Method Detail

getValue

public java.lang.Object getValue()
Get the value of the property.


getPath

public java.lang.String getPath()
Get the path of the property.


setPath

public void setPath(java.lang.String setPath)
Set the path of the property.


getType

public java.lang.String getType()
Get the type of the property.


setType

public void setType(java.lang.String setType)
Set the type of the property.


getValidator

public java.lang.String getValidator()
Get the validator of the property.


setValidator

public void setValidator(java.lang.String setValidator)
Set the validator of the property.


setErrorHandler

public java.lang.String setErrorHandler()
Get the validator of the property.


setErrorHandler

public void setErrorHandler(java.lang.String setErrorHandler)
Set the error handler of the property.


setValidatorParameterDefine

public void setValidatorParameterDefine(java.lang.String name,
                                        com.aendvari.griffin.validation.validator.ParameterDefine value)
Add a validator parameter.


getValidatorParameterDefine

public com.aendvari.griffin.validation.validator.ParameterDefine getValidatorParameterDefine(java.lang.String name)
Get a validator parameter.


setErrorHandlerParameterDefine

public void setErrorHandlerParameterDefine(java.lang.String name,
                                           com.aendvari.griffin.validation.validator.ParameterDefine value)
Add a validator parameter.


getErrorHandlerParameterDefine

public com.aendvari.griffin.validation.validator.ParameterDefine getErrorHandlerParameterDefine(java.lang.String name)
Get a validator parameter.


adjustParameters

private void adjustParameters(com.aendvari.common.model.ModelTree modelTree,
                              com.aendvari.common.model.ModelNode datasetNode,
                              java.lang.Object defaultValue,
                              com.aendvari.griffin.validation.validator.Handler handler)
Sets the parameter values for each of the handlers' com.aendvari.griffin.validation.validator.ParameterDefine. The values of the parameter are derived from the defined values of this property.


getMatchingValidator

private com.aendvari.griffin.validation.validator.Validator getMatchingValidator(java.util.Collection list)
Gets the matching com.aendvari.griffin.validation.validator.Validator instance from the collection of instances. The matching com.aendvari.griffin.validation.validator.Validator is found by matching the names of the com.aendvari.griffin.validation.validator.ParameterDefine's of this Property and MethodDefine's of the com.aendvari.griffin.validation.validator.Validator.


executeValidation

public void executeValidation(com.aendvari.common.model.ModelNode datasetNode,
                              com.aendvari.common.util.MultiHashMap validators,
                              java.util.HashMap handlers)
                       throws java.lang.Exception
Executes this classes' part of a Dataset validation.


toString

public java.lang.String toString()
Convert this object into a String representation.