org.kuali.rice.krad.datadictionary.validation.constraint
Class FixedPointPatternConstraint

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
          extended by org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
              extended by org.kuali.rice.krad.datadictionary.validation.constraint.ValidDataPatternConstraint
                  extended by org.kuali.rice.krad.datadictionary.validation.constraint.FixedPointPatternConstraint
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, Constraint

public class FixedPointPatternConstraint
extends ValidDataPatternConstraint

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

Only allows a numeric value where the precision property represents the maximum number of total numbers allowed, and scale represents the minimum numbers after the decimal point. The decimal places are implied to be 0 if not included and still count towards total numbers allowed.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
protected  boolean allowNegative
           
protected  int precision
           
protected  int scale
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
value
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, messageComponentCode, messageKey, messageNamespaceCode, states, validationMessageParams
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Constructor Summary
FixedPointPatternConstraint()
           
 
Method Summary
 void completeValidation(ValidationTrace tracer)
          Validates different requirements of component compiling a series of reports detailing information on errors found in the component.
 int getPrecision()
           
protected  String getRegexString()
          Overriding retrieval of
 int getScale()
           
 List<String> getValidationMessageParams()
          This overridden method ...
 boolean isAllowNegative()
           
 void setAllowNegative(boolean allowNegative)
           
 void setPrecision(int precision)
           
 void setScale(int scale)
           
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidDataPatternConstraint
getValue, setValue
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
getApplyClientSide, getConstraintStateOverrides, getMessageComponentCode, getMessageKey, getMessageNamespaceCode, getStates, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setMessageComponentCode, setMessageKey, setMessageNamespaceCode, setStates, setValidationMessageParams
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowNegative

protected boolean allowNegative

precision

protected int precision

scale

protected int scale
Constructor Detail

FixedPointPatternConstraint

public FixedPointPatternConstraint()
Method Detail

getRegexString

protected String getRegexString()
Overriding retrieval of

Specified by:
getRegexString in class ValidDataPatternConstraint
Returns:
regular expression
See Also:
ValidCharactersPatternConstraint.getRegexString()

isAllowNegative

public boolean isAllowNegative()
Returns:
the allowNegative

setAllowNegative

public void setAllowNegative(boolean allowNegative)
Parameters:
allowNegative - the allowNegative to set

getPrecision

public int getPrecision()
Returns:
the precision

setPrecision

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

getScale

public int getScale()
Returns:
the scale

setScale

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

getValidationMessageParams

public List<String> getValidationMessageParams()
This overridden method ...

Overrides:
getValidationMessageParams in class BaseConstraint
Returns:
the validationMessageParams
See Also:
BaseConstraint.getValidationMessageParams()

completeValidation

public void completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.

Overrides:
completeValidation in class ValidCharactersConstraint
Parameters:
tracer - Record of component's location


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.