nl.openedge.baritus.validation.impl
Class PropertyNotNullFormValidator

java.lang.Object
  extended bynl.openedge.baritus.validation.AbstractValidator
      extended bynl.openedge.baritus.validation.AbstractFormValidator
          extended bynl.openedge.baritus.validation.impl.PropertyNotNullFormValidator
All Implemented Interfaces:
FormValidator, ValidationRuleDependend

public class PropertyNotNullFormValidator
extends AbstractFormValidator

Checks whether the form contains a non null property with the name of property propertyName.

Author:
Eelco Hillenius

Constructor Summary
PropertyNotNullFormValidator()
          construct
PropertyNotNullFormValidator(java.lang.String errorMessageKey)
          construct with errorMessageKey
PropertyNotNullFormValidator(java.lang.String propertyName, java.lang.String errorMessageKey)
          construct with property name and errorMessageKey
PropertyNotNullFormValidator(java.lang.String errorMessageKey, ValidationActivationRule rule)
          construct with error message and rule
PropertyNotNullFormValidator(ValidationActivationRule rule)
          construct with rule
 
Method Summary
 java.lang.String getErrorMessageKey()
          Get key of error message.
 java.lang.String getPropertyName()
          get the name of the property
 boolean isValid(org.infohazard.maverick.flow.ControllerContext cctx, FormBeanContext formBeanContext)
          check whether the form contains a not null property with the name of property propertyName
 void setErrorMessageKey(java.lang.String string)
          Set key of error message.
 void setPropertyName(java.lang.String string)
          set the name of the property
 
Methods inherited from class nl.openedge.baritus.validation.AbstractValidator
getFieldName, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getValidationActivationRule, removeValidationActivationRule, setErrorMessage, setValidationRule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.openedge.baritus.validation.ValidationRuleDependend
getValidationActivationRule, removeValidationActivationRule, setValidationRule
 

Constructor Detail

PropertyNotNullFormValidator

public PropertyNotNullFormValidator()
construct


PropertyNotNullFormValidator

public PropertyNotNullFormValidator(java.lang.String errorMessageKey)
construct with errorMessageKey

Parameters:
errorMessageKey -

PropertyNotNullFormValidator

public PropertyNotNullFormValidator(ValidationActivationRule rule)
construct with rule

Parameters:
rule - validation rule

PropertyNotNullFormValidator

public PropertyNotNullFormValidator(java.lang.String errorMessageKey,
                                    ValidationActivationRule rule)
construct with error message and rule

Parameters:
errorMessageKey - message key
rule - validation rule

PropertyNotNullFormValidator

public PropertyNotNullFormValidator(java.lang.String propertyName,
                                    java.lang.String errorMessageKey)
construct with property name and errorMessageKey

Parameters:
propertyName - name of property
errorMessageKey - message key
Method Detail

isValid

public boolean isValid(org.infohazard.maverick.flow.ControllerContext cctx,
                       FormBeanContext formBeanContext)
check whether the form contains a not null property with the name of property propertyName

Parameters:
cctx - maverick context
formBeanContext - context with form for this currentRequest
Returns:
boolean true if property in form with name of property propertyName exists and is not null, false otherwise
See Also:
FormValidator.isValid(org.infohazard.maverick.flow.ControllerContext, nl.openedge.baritus.FormBeanContext)

getPropertyName

public java.lang.String getPropertyName()
get the name of the property

Returns:
String name of property

setPropertyName

public void setPropertyName(java.lang.String string)
set the name of the property

Parameters:
string - name of the property

getErrorMessageKey

public java.lang.String getErrorMessageKey()
Get key of error message.

Returns:
String key of error message

setErrorMessageKey

public void setErrorMessageKey(java.lang.String string)
Set key of error message.

Parameters:
string - key of error message


Copyright © 2003-2004 Open Edge. All Rights Reserved.