org.kuali.rice.kns.datadictionary.validation.fieldlevel
Class FixedPointValidationPattern

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.validation.ValidationPattern
      extended by org.kuali.rice.krad.datadictionary.validation.FieldLevelValidationPattern
          extended by org.kuali.rice.kns.datadictionary.validation.fieldlevel.FixedPointValidationPattern
All Implemented Interfaces:
Serializable

public class FixedPointValidationPattern
extends FieldLevelValidationPattern

Validation pattern for matching fixed point numbers, optionally matching negative numbers

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.krad.datadictionary.validation.ValidationPattern
ValidationPattern.ValidationPatternException
 
Field Summary
protected  boolean allowNegative
           
static String PATTERN_TYPE_PRECISION
           
static String PATTERN_TYPE_SCALE
           
protected  int precision
           
protected  int scale
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.FieldLevelValidationPattern
regexPattern
 
Constructor Summary
FixedPointValidationPattern()
           
 
Method Summary
 ExportMap buildExportMap(String exportKey)
           
 void completeValidation()
          This method throws an exception if it is not configured properly
 boolean getAllowNegative()
           
protected  String getPatternTypeName()
           
 int getPrecision()
           
protected  String getRegexString()
          Adds special handling to account for optional allowNegative and dynamic precision, scale
 int getScale()
           
 String getValidationErrorMessageKey()
          This overridden method ...
 String[] getValidationErrorMessageParameters(String attributeLabel)
          This overridden method ...
 void setAllowNegative(boolean allowNegative)
           
 void setPrecision(int precision)
           
 void setScale(int scale)
           
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.FieldLevelValidationPattern
getRegexPattern
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.ValidationPattern
matches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATTERN_TYPE_PRECISION

public static final String PATTERN_TYPE_PRECISION
See Also:
Constant Field Values

PATTERN_TYPE_SCALE

public static final String PATTERN_TYPE_SCALE
See Also:
Constant Field Values

allowNegative

protected boolean allowNegative

precision

protected int precision

scale

protected int scale
Constructor Detail

FixedPointValidationPattern

public FixedPointValidationPattern()
Method Detail

getPrecision

public int getPrecision()
Returns:
Returns the precision.

setPrecision

public void setPrecision(int precision)
Parameters:
precision - The precision to set.

getScale

public int getScale()
Returns:
Returns the scale.

setScale

public void setScale(int scale)
Parameters:
scale - The scale to set.

getAllowNegative

public boolean getAllowNegative()
Returns:
allowNegative

setAllowNegative

public void setAllowNegative(boolean allowNegative)
Parameters:
allowNegative -

getRegexString

protected String getRegexString()
Adds special handling to account for optional allowNegative and dynamic precision, scale

Overrides:
getRegexString in class FieldLevelValidationPattern
Returns:
String version of regular expression base, suitable for modification with length-specifiers and used internally by getRegexPattern
See Also:
ValidationPattern.getRegexString()

getPatternTypeName

protected String getPatternTypeName()
Specified by:
getPatternTypeName in class FieldLevelValidationPattern
Returns:
the key used to retrieve the validationPattern's type name, which is used as the suffix of the regex property key, as the type entry in the exportMap, etc.
See Also:
FieldLevelValidationPattern.getPatternTypeName()

buildExportMap

public ExportMap buildExportMap(String exportKey)
Overrides:
buildExportMap in class FieldLevelValidationPattern
Returns:
ExportMap describing the subclass instance
See Also:
ValidationPattern.buildExportMap(java.lang.String)

getValidationErrorMessageKey

public String getValidationErrorMessageKey()
Description copied from class: FieldLevelValidationPattern
This overridden method ...

Overrides:
getValidationErrorMessageKey in class FieldLevelValidationPattern
See Also:
FieldLevelValidationPattern.getValidationErrorMessageKey()

getValidationErrorMessageParameters

public String[] getValidationErrorMessageParameters(String attributeLabel)
This overridden method ...

Overrides:
getValidationErrorMessageParameters in class ValidationPattern
See Also:
ValidationPattern.getValidationErrorMessageParameters(java.lang.String)

completeValidation

public void completeValidation()
                        throws ValidationPattern.ValidationPatternException
Description copied from class: ValidationPattern
This method throws an exception if it is not configured properly

Overrides:
completeValidation in class ValidationPattern
Throws:
ValidationPattern.ValidationPatternException


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.