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

java.lang.Object
  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.ValidCharactersPatternConstraint
              extended by org.kuali.rice.krad.datadictionary.validation.constraint.AllowCharacterConstraint
All Implemented Interfaces:
Serializable, Constraint
Direct Known Subclasses:
AlphaNumericPatternConstraint, AlphaPatternConstraint, NumericPatternConstraint

public abstract class AllowCharacterConstraint
extends ValidCharactersPatternConstraint

Parent abstract class that allows additional characters to be allowed in child constraint character sets, see AlphaNumericPatternConstraint, among others for example. By setting an allow flag to true you are allowing that character as a valid character in the set. AllowAll set to true will allow all characters which have a flag to be allowed in the set.

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

Field Summary
protected  boolean allowAll
           
protected  boolean allowAmpersand
           
protected  boolean allowApostrophe
           
protected  boolean allowAsterisk
           
protected  boolean allowAtSign
           
protected  boolean allowBackslash
           
protected  boolean allowBrackets
           
protected  boolean allowColon
           
protected  boolean allowComma
           
protected  boolean allowCurlyBraces
           
protected  boolean allowDash
           
protected  boolean allowDollar
           
protected  boolean allowDoubleQuote
           
protected  boolean allowEquals
           
protected  boolean allowExclaimation
           
protected  boolean allowForwardSlash
           
protected  boolean allowGreaterThan
           
protected  boolean allowLessThan
           
protected  boolean allowParenthesis
           
protected  boolean allowPercent
           
protected  boolean allowPeriod
           
protected  boolean allowPlus
           
protected  boolean allowPound
           
protected  boolean allowQuestionMark
           
protected  boolean allowSemiColon
           
protected  boolean allowUnderscore
           
protected  boolean allowWhitespace
           
protected  boolean omitNewline
           
 
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
 
Constructor Summary
AllowCharacterConstraint()
           
 
Method Summary
protected  String getAllowedCharacterRegex()
          This method returns the allowed set of characters allowed by this constraint, based on the flags set.
 List<String> getValidationMessageParams()
          Generates a comma separated string of the allowed set of characters, for the {0} parameter to be used within its validation message
 boolean isAllowAll()
          If true, this constraint will allow all symbols that have flags for them.
 boolean isAllowAmpersand()
           
 boolean isAllowApostrophe()
           
 boolean isAllowAsterisk()
           
 boolean isAllowAtSign()
           
 boolean isAllowBackslash()
           
 boolean isAllowBrackets()
           
 boolean isAllowColon()
           
 boolean isAllowComma()
           
 boolean isAllowCurlyBraces()
           
 boolean isAllowDash()
           
 boolean isAllowDollar()
           
 boolean isAllowDoubleQuote()
           
 boolean isAllowEquals()
           
 boolean isAllowExclaimation()
           
 boolean isAllowForwardSlash()
           
 boolean isAllowGreaterThan()
           
 boolean isAllowLessThan()
           
 boolean isAllowParenthesis()
           
 boolean isAllowPercent()
           
 boolean isAllowPeriod()
           
 boolean isAllowPlus()
           
 boolean isAllowPound()
           
 boolean isAllowQuestionMark()
           
 boolean isAllowSemiColon()
           
 boolean isAllowUnderscore()
           
 boolean isAllowWhitespace()
           
 boolean isOmitNewline()
           
 void setAllowAll(boolean allowAll)
           
 void setAllowAmpersand(boolean allowAmpersand)
           
 void setAllowApostrophe(boolean allowApostrophe)
           
 void setAllowAsterisk(boolean allowAsterisk)
           
 void setAllowAtSign(boolean allowAtSign)
           
 void setAllowBackslash(boolean allowBackslash)
           
 void setAllowBrackets(boolean allowBrackets)
           
 void setAllowColon(boolean allowColon)
           
 void setAllowComma(boolean allowComma)
           
 void setAllowCurlyBraces(boolean allowCurlyBraces)
           
 void setAllowDash(boolean allowDash)
           
 void setAllowDollar(boolean allowDollar)
           
 void setAllowDoubleQuote(boolean allowDoubleQuote)
           
 void setAllowEquals(boolean allowEquals)
           
 void setAllowExclaimation(boolean allowExclaimation)
           
 void setAllowForwardSlash(boolean allowForwardSlash)
           
 void setAllowGreaterThan(boolean allowGreaterThan)
           
 void setAllowLessThan(boolean allowLessThan)
           
 void setAllowParenthesis(boolean allowParenthesis)
           
 void setAllowPercent(boolean allowPercent)
           
 void setAllowPeriod(boolean allowPeriod)
           
 void setAllowPlus(boolean allowPlus)
           
 void setAllowPound(boolean allowPound)
           
 void setAllowQuestionMark(boolean allowQuestionMark)
           
 void setAllowSemiColon(boolean allowSemiColon)
           
 void setAllowUnderscore(boolean allowUnderscore)
           
 void setAllowWhitespace(boolean allowWhitespace)
           
 void setOmitNewline(boolean omitNewline)
          When set to true, omit new line characters from the set of valid characters.
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersPatternConstraint
getRegexString, getValue, setValue
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
completeValidation
 
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowWhitespace

protected boolean allowWhitespace

omitNewline

protected boolean omitNewline

allowUnderscore

protected boolean allowUnderscore

allowPeriod

protected boolean allowPeriod

allowParenthesis

protected boolean allowParenthesis

allowDollar

protected boolean allowDollar

allowForwardSlash

protected boolean allowForwardSlash

allowDoubleQuote

protected boolean allowDoubleQuote

allowApostrophe

protected boolean allowApostrophe

allowComma

protected boolean allowComma

allowColon

protected boolean allowColon

allowSemiColon

protected boolean allowSemiColon

allowQuestionMark

protected boolean allowQuestionMark

allowExclaimation

protected boolean allowExclaimation

allowDash

protected boolean allowDash

allowPlus

protected boolean allowPlus

allowEquals

protected boolean allowEquals

allowAsterisk

protected boolean allowAsterisk

allowAtSign

protected boolean allowAtSign

allowPercent

protected boolean allowPercent

allowPound

protected boolean allowPound

allowGreaterThan

protected boolean allowGreaterThan

allowLessThan

protected boolean allowLessThan

allowBrackets

protected boolean allowBrackets

allowAmpersand

protected boolean allowAmpersand

allowCurlyBraces

protected boolean allowCurlyBraces

allowBackslash

protected boolean allowBackslash

allowAll

protected boolean allowAll
Constructor Detail

AllowCharacterConstraint

public AllowCharacterConstraint()
Method Detail

isAllowWhitespace

public boolean isAllowWhitespace()
Returns:
the allowWhitespace

setAllowWhitespace

public void setAllowWhitespace(boolean allowWhitespace)
Parameters:
allowWhitespace - the allowWhitespace to set

isAllowUnderscore

public boolean isAllowUnderscore()
Returns:
the allowUnderscore

setAllowUnderscore

public void setAllowUnderscore(boolean allowUnderscore)
Parameters:
allowUnderscore - the allowUnderscore to set

isAllowPeriod

public boolean isAllowPeriod()
Returns:
the allowPeriod

setAllowPeriod

public void setAllowPeriod(boolean allowPeriod)
Parameters:
allowPeriod - the allowPeriod to set

isAllowParenthesis

public boolean isAllowParenthesis()
Returns:
the allowParenthesis

setAllowParenthesis

public void setAllowParenthesis(boolean allowParenthesis)
Parameters:
allowParenthesis - the allowParenthesis to set

isAllowDollar

public boolean isAllowDollar()
Returns:
the allowDollar

setAllowDollar

public void setAllowDollar(boolean allowDollar)
Parameters:
allowDollar - the allowDollar to set

isAllowForwardSlash

public boolean isAllowForwardSlash()
Returns:
the allowForwardSlash

setAllowForwardSlash

public void setAllowForwardSlash(boolean allowForwardSlash)
Parameters:
allowForwardSlash - the allowForwardSlash to set

isAllowDoubleQuote

public boolean isAllowDoubleQuote()
Returns:
the allowDoubleQuote

setAllowDoubleQuote

public void setAllowDoubleQuote(boolean allowDoubleQuote)
Parameters:
allowDoubleQuote - the allowDoubleQuote to set

isAllowApostrophe

public boolean isAllowApostrophe()
Returns:
the allowApostrophe

setAllowApostrophe

public void setAllowApostrophe(boolean allowApostrophe)
Parameters:
allowApostrophe - the allowApostrophe to set

isAllowComma

public boolean isAllowComma()
Returns:
the allowComma

setAllowComma

public void setAllowComma(boolean allowComma)
Parameters:
allowComma - the allowComma to set

isAllowColon

public boolean isAllowColon()
Returns:
the allowColon

setAllowColon

public void setAllowColon(boolean allowColon)
Parameters:
allowColon - the allowColon to set

isAllowSemiColon

public boolean isAllowSemiColon()
Returns:
the allowSemiColon

setAllowSemiColon

public void setAllowSemiColon(boolean allowSemiColon)
Parameters:
allowSemiColon - the allowSemiColon to set

isAllowQuestionMark

public boolean isAllowQuestionMark()
Returns:
the allowQuestionMark

setAllowQuestionMark

public void setAllowQuestionMark(boolean allowQuestionMark)
Parameters:
allowQuestionMark - the allowQuestionMark to set

isAllowExclaimation

public boolean isAllowExclaimation()
Returns:
the allowExclaimation

setAllowExclaimation

public void setAllowExclaimation(boolean allowExclaimation)
Parameters:
allowExclaimation - the allowExclaimation to set

isAllowDash

public boolean isAllowDash()
Returns:
the allowDash

setAllowDash

public void setAllowDash(boolean allowDash)
Parameters:
allowDash - the allowDash to set

isAllowPlus

public boolean isAllowPlus()
Returns:
the allowPlus

setAllowPlus

public void setAllowPlus(boolean allowPlus)
Parameters:
allowPlus - the allowPlus to set

isAllowEquals

public boolean isAllowEquals()
Returns:
the allowEquals

setAllowEquals

public void setAllowEquals(boolean allowEquals)
Parameters:
allowEquals - the allowEquals to set

isAllowAsterisk

public boolean isAllowAsterisk()
Returns:
the allowAsterisk

setAllowAsterisk

public void setAllowAsterisk(boolean allowAsterisk)
Parameters:
allowAsterisk - the allowAsterisk to set

isAllowAtSign

public boolean isAllowAtSign()
Returns:
the allowAtSign

setAllowAtSign

public void setAllowAtSign(boolean allowAtSign)
Parameters:
allowAtSign - the allowAtSign to set

isAllowPercent

public boolean isAllowPercent()
Returns:
the allowPercent

setAllowPercent

public void setAllowPercent(boolean allowPercent)
Parameters:
allowPercent - the allowPercent to set

isAllowPound

public boolean isAllowPound()
Returns:
the allowPound

setAllowPound

public void setAllowPound(boolean allowPound)
Parameters:
allowPound - the allowPound to set

isAllowGreaterThan

public boolean isAllowGreaterThan()

setAllowGreaterThan

public void setAllowGreaterThan(boolean allowGreaterThan)

isAllowLessThan

public boolean isAllowLessThan()

setAllowLessThan

public void setAllowLessThan(boolean allowLessThan)

isAllowBrackets

public boolean isAllowBrackets()

setAllowBrackets

public void setAllowBrackets(boolean allowBrackets)

isAllowAmpersand

public boolean isAllowAmpersand()

setAllowAmpersand

public void setAllowAmpersand(boolean allowAmpersand)

isAllowCurlyBraces

public boolean isAllowCurlyBraces()

setAllowCurlyBraces

public void setAllowCurlyBraces(boolean allowCurlyBraces)

isAllowBackslash

public boolean isAllowBackslash()

setAllowBackslash

public void setAllowBackslash(boolean allowBackslash)

isAllowAll

public boolean isAllowAll()
If true, this constraint will allow all symbols that have flags for them. Equivalent to setting each flag to true separately.

Returns:
the allowAll

setAllowAll

public void setAllowAll(boolean allowAll)
Parameters:
allowAll - the allowAll to set

isOmitNewline

public boolean isOmitNewline()

setOmitNewline

public void setOmitNewline(boolean omitNewline)
When set to true, omit new line characters from the set of valid characters. This flag will only have an effect if the allowWhitespace flag is true, otherwise all whitespace including new lines characters are omitted.

Parameters:
omitNewline -

getAllowedCharacterRegex

protected String getAllowedCharacterRegex()
This method returns the allowed set of characters allowed by this constraint, based on the flags set. This string is intended to be placed within the or set of a regex, ie between the [ ] symbols

Returns:

getValidationMessageParams

public List<String> getValidationMessageParams()
Generates a comma separated string of the allowed set of characters, for the {0} parameter to be used within its validation message

Overrides:
getValidationMessageParams in class BaseConstraint
Returns:
the validationMessageParams


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