jodd.vtor.constraint
Class WildcardMatchConstraint

java.lang.Object
  extended by jodd.vtor.constraint.WildcardMatchConstraint
All Implemented Interfaces:
ValidationConstraint<WildcardMatch>

public class WildcardMatchConstraint
extends java.lang.Object
implements ValidationConstraint<WildcardMatch>


Field Summary
protected  java.lang.String pattern
           
 
Constructor Summary
WildcardMatchConstraint()
           
WildcardMatchConstraint(java.lang.String pattern)
           
 
Method Summary
 void configure(WildcardMatch annotation)
          Configures constraint from associated annotation.
 java.lang.String getPattern()
           
 boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
          Performs validation in context of target object on provided value.
 void setPattern(java.lang.String pattern)
           
static boolean validate(java.lang.Object value, java.lang.String pattern)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pattern

protected java.lang.String pattern
Constructor Detail

WildcardMatchConstraint

public WildcardMatchConstraint()

WildcardMatchConstraint

public WildcardMatchConstraint(java.lang.String pattern)
Method Detail

getPattern

public java.lang.String getPattern()

setPattern

public void setPattern(java.lang.String pattern)

configure

public void configure(WildcardMatch annotation)
Description copied from interface: ValidationConstraint
Configures constraint from associated annotation.

Specified by:
configure in interface ValidationConstraint<WildcardMatch>

isValid

public boolean isValid(ValidationConstraintContext vcc,
                       java.lang.Object value)
Description copied from interface: ValidationConstraint
Performs validation in context of target object on provided value.

Specified by:
isValid in interface ValidationConstraint<WildcardMatch>
Returns:
true if validation passes, otherwise false.

validate

public static boolean validate(java.lang.Object value,
                               java.lang.String pattern)


Copyright © 2003-2010 Jodd Team