nl.openedge.baritus.validation.impl
Class RequiredSessionAttributeValidator

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

public class RequiredSessionAttributeValidator
extends AbstractFormValidator

Checks whether a session attribute exists with the key that was set for property sessionAttributeKey.

Author:
Eelco Hillenius

Constructor Summary
RequiredSessionAttributeValidator()
          Construct.
RequiredSessionAttributeValidator(java.lang.String errorMessageKey)
          Construct with errorMessageKey.
RequiredSessionAttributeValidator(java.lang.String errorMessageKey, java.lang.String sessionAttributeKey)
          Construct with message prefix and session attribute key to check for.
RequiredSessionAttributeValidator(java.lang.String errorMessageKey, ValidationActivationRule rule)
          Construct with errorMessageKey and rule.
RequiredSessionAttributeValidator(ValidationActivationRule rule)
          Construct with rule.
 
Method Summary
 java.lang.String getErrorMessageKey()
          Get key of error message.
 java.lang.String getSessionAttributeKey()
          get the session attribute key that will be checked for
 boolean isValid(org.infohazard.maverick.flow.ControllerContext cctx, FormBeanContext formBeanContext)
          Checks if form is valid.
 void setErrorMessageKey(java.lang.String string)
          Set key of error message.
 void setSessionAttributeKey(java.lang.String string)
          set the session attribute key that will be checked for
 
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

RequiredSessionAttributeValidator

public RequiredSessionAttributeValidator()
Construct.


RequiredSessionAttributeValidator

public RequiredSessionAttributeValidator(java.lang.String errorMessageKey)
Construct with errorMessageKey.

Parameters:
errorMessageKey -

RequiredSessionAttributeValidator

public RequiredSessionAttributeValidator(ValidationActivationRule rule)
Construct with rule.

Parameters:
rule -

RequiredSessionAttributeValidator

public RequiredSessionAttributeValidator(java.lang.String errorMessageKey,
                                         ValidationActivationRule rule)
Construct with errorMessageKey and rule.

Parameters:
errorMessageKey -
rule -

RequiredSessionAttributeValidator

public RequiredSessionAttributeValidator(java.lang.String errorMessageKey,
                                         java.lang.String sessionAttributeKey)
Construct with message prefix and session attribute key to check for.

Parameters:
errorMessageKey -
Method Detail

isValid

public boolean isValid(org.infohazard.maverick.flow.ControllerContext cctx,
                       FormBeanContext formBeanContext)
Description copied from interface: FormValidator
Checks if form is valid.

Parameters:
cctx - maverick context
formBeanContext - context with form for this currentRequest
Returns:
true if valid, false if not.

getSessionAttributeKey

public java.lang.String getSessionAttributeKey()
get the session attribute key that will be checked for

Returns:
String the session attribute key that will be checked for

setSessionAttributeKey

public void setSessionAttributeKey(java.lang.String string)
set the session attribute key that will be checked for

Parameters:
string - the session attribute key that will be checked for

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.