Oracle

weblogicx.jsp.tags.validators
Class CustomValidator

java.lang.Object
  extended by weblogicx.jsp.tags.validators.ValidatableAdapter
      extended by weblogicx.jsp.tags.validators.ValidatableTagAdapter
          extended by weblogicx.jsp.tags.validators.CustomValidator
All Implemented Interfaces:
Serializable, Validatable

public class CustomValidator
extends ValidatableTagAdapter

Class implements the ValidatableTagAdapter and forms a wrapper around the Customizable classes. A Customizable Class is instantiated and method calls delegated to the particular instance.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class weblogicx.jsp.tags.validators.ValidatableTagAdapter
bodyContent, pageContext, parent
 
Fields inherited from class weblogicx.jsp.tags.validators.ValidatableAdapter
errorMessage, fieldToValidate, isValid
 
Fields inherited from interface weblogicx.jsp.tags.validators.Validatable
ENCODED_SEPERATOR, SEPERATOR
 
Constructor Summary
CustomValidator()
           
 
Method Summary
 Validatable decodeHiddenField(String stToDecode)
          given the String of writtenHiddenField(), this method must know how to reconstruct an object from the string.
 boolean equals(Object o)
           
 String getExpression()
           
 String getValidatorClass()
           
 void instantiateCustomClass(String className)
          instantiates the custom class
 void release()
           
 void setExpression(String exp)
           
 void setValidatorClass(String vclass)
           
 boolean userExit()
          This acts as an User Exit...
 boolean validate(ServletRequest req)
          abstract class to be implemented
 String writeHiddenField()
          write a hidden input type e.g.
 
Methods inherited from class weblogicx.jsp.tags.validators.ValidatableTagAdapter
doAfterBody, doEndTag, doInitBody, doStartTag, getHiddenField, getParent, setBodyContent, setPageContext, setParent
 
Methods inherited from class weblogicx.jsp.tags.validators.ValidatableAdapter
defaultDecodeHiddenField, defaultWriteHiddenField, getErrorMessage, getFieldToValidate, isValid, setErrorMessage, setFieldToValidate, setIsValid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomValidator

public CustomValidator()
Method Detail

setExpression

public void setExpression(String exp)

setValidatorClass

public void setValidatorClass(String vclass)

getExpression

public String getExpression()

getValidatorClass

public String getValidatorClass()

validate

public boolean validate(ServletRequest req)
                 throws Exception
Description copied from class: ValidatableAdapter
abstract class to be implemented

Specified by:
validate in interface Validatable
Specified by:
validate in class ValidatableAdapter
Throws:
Exception

writeHiddenField

public String writeHiddenField()
Description copied from interface: Validatable
write a hidden input type e.g. className=classImplementingValidatable+ENCODED_SEPERATOR+ fieldToValidate=somefield+ENCODED_SEPERATOR+expression=someexpr +ENCODED_SEPERATOR+errorMessage

Specified by:
writeHiddenField in interface Validatable
Overrides:
writeHiddenField in class ValidatableAdapter

decodeHiddenField

public Validatable decodeHiddenField(String stToDecode)
                              throws Exception
Description copied from interface: Validatable
given the String of writtenHiddenField(), this method must know how to reconstruct an object from the string.

Specified by:
decodeHiddenField in interface Validatable
Overrides:
decodeHiddenField in class ValidatableAdapter
Throws:
Exception

userExit

public boolean userExit()
                 throws JspException
Description copied from class: ValidatableTagAdapter
This acts as an User Exit... This Class guarantees that this method will be called in the doStartTag method.

Specified by:
userExit in class ValidatableTagAdapter
Returns:
boolean which says whether the user exit was successful or not. true --> EVAL_BODY_TAG false --> SKIP_BODY
Throws:
JspException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

instantiateCustomClass

public void instantiateCustomClass(String className)
                            throws ClassNotFoundException,
                                   InstantiationException,
                                   IllegalAccessException,
                                   UnImplementedException
instantiates the custom class

Parameters:
className - to be instantiated
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
UnImplementedException

release

public void release()
Overrides:
release in class ValidatableTagAdapter

Documentation is available at
http://download.oracle.com/docs/cd/E12839_01/web.1111
Copyright 1996,2009, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Part Number E13941-01
Oracle WebLogic Server 10.3.1 API Reference