Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3)
B16005-01


oracle.jbo.rules
Class JboRegExpValidator

java.lang.Object
  extended byoracle.jbo.rules.AbstractValidator
      extended byoracle.jbo.rules.JboAbstractValidator
          extended byoracle.jbo.rules.JboRegExpValidator

All Implemented Interfaces:
JboValidatorInterface

public class JboRegExpValidator
extends JboAbstractValidator
implements JboValidatorInterface

A validator that tests attribute values by comparing them with a pre-defined regular expression.

The value to be validated is designated as the left-hand operand of a relation operation. The validator provides the right-hand operand

Since:
Jdeveloper 3.0

Field Summary
protected  java.lang.String mFlagValue
           
protected  java.lang.String mPattern
           
static java.lang.String REGEX_CANON_EQ_TEXT
           
static java.lang.String REGEX_CASE_INSENSITIVE_TEXT
           
static java.lang.String REGEX_DOTALL_TEXT
           
static java.lang.String REGEX_MULTILINE_TEXT
           
static java.lang.String REGEX_UNICODE_CASE_TEXT
           

 

Fields inherited from class oracle.jbo.rules.JboAbstractValidator
mValidatingAttr, mValidatingAttrName

 

Fields inherited from class oracle.jbo.rules.AbstractValidator
mbInverse, mDescription, mErrorMessageClass, mMsgId

 

Constructor Summary
JboRegExpValidator()
          Creates an uninitialized regular expression validator.
JboRegExpValidator(boolean inverse, java.lang.String patternArg, java.lang.String flagValueArg)
          Creates an initialized regular expression validator.

 

Method Summary
 java.lang.String getFlagValue()
          Gets the match flags for the regular expression comparison.
protected static int getKeyValue(java.lang.String flagValue, java.lang.String keyString, int keyValue)
          Internal:
 java.lang.String getPattern()
          Gets the right-side operand of this validator's expression.
static int getRegExpFlagInt(java.lang.String flagStr)
          Gets the computed int value of the regular expression match flags.
protected  void initialize(JboValidatorContext evObj)
           
 void setFlagValue(java.lang.String flagValueArg)
          Sets the match flags for the regular expression comparison.
 void setPattern(java.lang.String patternArg)
          Sets the right-side operand of this validator's expression.
 java.lang.String toString()
          Internal: For debugging purposes only.
 boolean validateValue(java.lang.Object value)
          Validate an object by matching it with a pre-defined regular expression.

 

Methods inherited from class oracle.jbo.rules.JboAbstractValidator
getValidatingAttributeName, getValueToValidate, setNewValue, setValidatingAttribute, setValidatingAttribute, setValidatingAttributeName, validate

 

Methods inherited from class oracle.jbo.rules.AbstractValidator
convertToJava, getDescription, getErrorMessageClass, getErrorMsgId, getInverse, setDescription, setErrorMessageClass, setErrorMsgId, setInverse

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.jbo.rules.JboValidatorInterface
getDescription, setDescription, validate

 

Field Detail

REGEX_CASE_INSENSITIVE_TEXT

public static final java.lang.String REGEX_CASE_INSENSITIVE_TEXT
See Also:
Constant Field Values

REGEX_MULTILINE_TEXT

public static final java.lang.String REGEX_MULTILINE_TEXT
See Also:
Constant Field Values

REGEX_DOTALL_TEXT

public static final java.lang.String REGEX_DOTALL_TEXT
See Also:
Constant Field Values

REGEX_UNICODE_CASE_TEXT

public static final java.lang.String REGEX_UNICODE_CASE_TEXT
See Also:
Constant Field Values

REGEX_CANON_EQ_TEXT

public static final java.lang.String REGEX_CANON_EQ_TEXT
See Also:
Constant Field Values

mPattern

protected java.lang.String mPattern

mFlagValue

protected java.lang.String mFlagValue

Constructor Detail

JboRegExpValidator

public JboRegExpValidator()
Creates an uninitialized regular expression validator.

The method setPattern() must be invoked before validation can be performed.


JboRegExpValidator

public JboRegExpValidator(boolean inverse,
                          java.lang.String patternArg,
                          java.lang.String flagValueArg)
Creates an initialized regular expression validator.
Parameters:
inverse - if true the logic of this validator's comparison relation is inverted.
patternArg - this validator's right-hand operand, a reference object containing a regular expression.
flagValueArg - validator's match flags

Method Detail

initialize

protected void initialize(JboValidatorContext evObj)
Overrides:
initialize in class JboAbstractValidator

validateValue

public boolean validateValue(java.lang.Object value)
Validate an object by matching it with a pre-defined regular expression.

The value parameter is the left-hand operand of this validator's regular expression comparison relation. The right-hand operand is the value set by setPattern().

This method is called by AbstractValidator#vetoableChange().

Specified by:
validateValue in class JboAbstractValidator
Parameters:
value - the object to be validated.
Returns:
true if the relation holds, or false if the relation does not hold or operand is invalid or uninitialized.

setPattern

public void setPattern(java.lang.String patternArg)
Sets the right-side operand of this validator's expression.
Parameters:
patternArg - a reference object containing a regular expression.

getPattern

public java.lang.String getPattern()
Gets the right-side operand of this validator's expression.

setFlagValue

public void setFlagValue(java.lang.String flagValueArg)
Sets the match flags for the regular expression comparison.
Parameters:
flagValueArg - a reference object containing String representation of the match flags.

getFlagValue

public java.lang.String getFlagValue()
Gets the match flags for the regular expression comparison.

toString

public java.lang.String toString()
Internal: For debugging purposes only.

getRegExpFlagInt

public static int getRegExpFlagInt(java.lang.String flagStr)
Gets the computed int value of the regular expression match flags.

getKeyValue

protected static int getKeyValue(java.lang.String flagValue,
                                 java.lang.String keyString,
                                 int keyValue)
Internal:

Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3)
B16005-01


Copyright © 1997, 2005, Oracle. All rights reserved.