org.kuali.student.common.validator.old
Class Validator
java.lang.Object
org.kuali.student.common.validator.old.Validator
public class Validator
- extends Object
Method Summary |
private void |
computeBaseConstraints(ConstraintSelector constraint,
Validator.BaseConstraintBean bcb,
Field field)
|
DateParser |
getDateParser()
|
private String |
getElementXpath(Stack<String> elementStack)
|
private String |
getMessage(String messageId)
|
String |
getMessageGroupKey()
|
String |
getMessageLocaleKey()
|
MessageService |
getMessageService()
|
private boolean |
hasText(String string)
|
private boolean |
isNullable(Field field)
|
boolean |
isServerSide()
|
private void |
processBaseConstraints(List<ValidationResultInfo> valResults,
Validator.BaseConstraintBean bcb,
Field field,
Object value,
Stack<String> elementStack)
|
private void |
processCaseConstraint(List<ValidationResultInfo> valResults,
CaseConstraint constraint,
Field field,
Type type,
State state,
ObjectStructure objStructure,
Object value,
ConstraintDataProvider dataProvider,
Validator.BaseConstraintBean bcb,
Stack<String> elementStack)
Process caseConstraint tag and sets any of the base constraint items if
any of the when condition matches |
private void |
processConstraint(List<ValidationResultInfo> valResults,
ConstraintSelector constraint,
Field field,
Type type,
State state,
ObjectStructure objStructure,
Object value,
ConstraintDataProvider dataProvider,
Validator.BaseConstraintBean bcb,
Stack<String> elementStack)
|
private void |
processLookupConstraint(List<ValidationResultInfo> valResults)
|
private void |
processNestedObjectStructure(List<ValidationResultInfo> results,
Object value,
ObjectStructure nestedObjStruct,
Field field,
Stack<String> elementStack)
|
private ValidationResultInfo |
processOccursConstraint(String element,
OccursConstraint constraint,
Field field,
Type type,
State state,
ObjectStructure objStructure,
ConstraintDataProvider dataProvider)
Computes if all the filed required in the occurs clause are between the
min and max |
private ValidationResultInfo |
processRequireConstraint(String element,
RequireConstraint constraint,
Field field,
ObjectStructure objStructure,
ConstraintDataProvider dataProvider)
|
private void |
processTypeStateCaseConstraint(List<ValidationResultInfo> valResults)
|
private ValidationResultInfo |
processValidCharConstraint(String element,
ValidCharsConstraint vcConstraint,
ConstraintDataProvider dataProvider,
Object value)
|
void |
setDateParser(DateParser dateParser)
|
void |
setMessageGroupKey(String messageGroupKey)
|
void |
setMessageLocaleKey(String messageLocaleKey)
|
void |
setMessageService(MessageService messageService)
|
void |
setServerSide(boolean serverSide)
|
private Integer |
tryParse(String s)
|
private void |
validateBoolean(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
|
private void |
validateDate(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results,
DateParser dateParser)
|
private void |
validateDouble(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
|
List<ValidationResultInfo> |
validateField(Field field,
Type type,
State state,
ObjectStructure objStruct,
ConstraintDataProvider dataProvider,
Stack<String> elementStack)
|
private void |
validateFloat(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
|
private void |
validateInteger(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
|
private void |
validateLong(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
|
private void |
validateString(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
|
List<ValidationResultInfo> |
validateTypeStateObject(Object data,
ObjectStructure objStructure)
Validate Object and all its nested child objects for given type and state |
private List<ValidationResultInfo> |
validateTypeStateObject(Object data,
ObjectStructure objStructure,
Stack<String> elementStack)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_STATE
private static final String DEFAULT_STATE
- See Also:
- Constant Field Values
UNBOUNDED_CHECK
private static final String UNBOUNDED_CHECK
messageService
private MessageService messageService
messageLocaleKey
private String messageLocaleKey
messageGroupKey
private String messageGroupKey
dateParser
private DateParser dateParser
serverSide
private boolean serverSide
Validator
public Validator()
getMessageService
public MessageService getMessageService()
setMessageService
public void setMessageService(MessageService messageService)
getMessageLocaleKey
public String getMessageLocaleKey()
setMessageLocaleKey
public void setMessageLocaleKey(String messageLocaleKey)
getMessageGroupKey
public String getMessageGroupKey()
setMessageGroupKey
public void setMessageGroupKey(String messageGroupKey)
setDateParser
public void setDateParser(DateParser dateParser)
isServerSide
public boolean isServerSide()
- Returns:
- the serverSide
setServerSide
public void setServerSide(boolean serverSide)
- Parameters:
serverSide
- the serverSide to set
getDateParser
public DateParser getDateParser()
- Returns:
- the dateParser
validateTypeStateObject
public List<ValidationResultInfo> validateTypeStateObject(Object data,
ObjectStructure objStructure)
- Validate Object and all its nested child objects for given type and state
- Parameters:
data
- objStructure
-
- Returns:
validateTypeStateObject
private List<ValidationResultInfo> validateTypeStateObject(Object data,
ObjectStructure objStructure,
Stack<String> elementStack)
validateField
public List<ValidationResultInfo> validateField(Field field,
Type type,
State state,
ObjectStructure objStruct,
ConstraintDataProvider dataProvider,
Stack<String> elementStack)
isNullable
private boolean isNullable(Field field)
tryParse
private Integer tryParse(String s)
processNestedObjectStructure
private void processNestedObjectStructure(List<ValidationResultInfo> results,
Object value,
ObjectStructure nestedObjStruct,
Field field,
Stack<String> elementStack)
computeBaseConstraints
private void computeBaseConstraints(ConstraintSelector constraint,
Validator.BaseConstraintBean bcb,
Field field)
processConstraint
private void processConstraint(List<ValidationResultInfo> valResults,
ConstraintSelector constraint,
Field field,
Type type,
State state,
ObjectStructure objStructure,
Object value,
ConstraintDataProvider dataProvider,
Validator.BaseConstraintBean bcb,
Stack<String> elementStack)
processRequireConstraint
private ValidationResultInfo processRequireConstraint(String element,
RequireConstraint constraint,
Field field,
ObjectStructure objStructure,
ConstraintDataProvider dataProvider)
processCaseConstraint
private void processCaseConstraint(List<ValidationResultInfo> valResults,
CaseConstraint constraint,
Field field,
Type type,
State state,
ObjectStructure objStructure,
Object value,
ConstraintDataProvider dataProvider,
Validator.BaseConstraintBean bcb,
Stack<String> elementStack)
- Process caseConstraint tag and sets any of the base constraint items if
any of the when condition matches
- Parameters:
bcb
- caseConstraint
- field
-
processValidCharConstraint
private ValidationResultInfo processValidCharConstraint(String element,
ValidCharsConstraint vcConstraint,
ConstraintDataProvider dataProvider,
Object value)
processOccursConstraint
private ValidationResultInfo processOccursConstraint(String element,
OccursConstraint constraint,
Field field,
Type type,
State state,
ObjectStructure objStructure,
ConstraintDataProvider dataProvider)
- Computes if all the filed required in the occurs clause are between the
min and max
- Parameters:
valResults
- constraint
- field
- type
- state
- objStructure
- dataProvider
-
- Returns:
processLookupConstraint
private void processLookupConstraint(List<ValidationResultInfo> valResults)
processTypeStateCaseConstraint
private void processTypeStateCaseConstraint(List<ValidationResultInfo> valResults)
processBaseConstraints
private void processBaseConstraints(List<ValidationResultInfo> valResults,
Validator.BaseConstraintBean bcb,
Field field,
Object value,
Stack<String> elementStack)
validateBoolean
private void validateBoolean(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
validateDouble
private void validateDouble(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
validateFloat
private void validateFloat(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
validateLong
private void validateLong(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
validateInteger
private void validateInteger(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
validateDate
private void validateDate(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results,
DateParser dateParser)
validateString
private void validateString(Object value,
Validator.BaseConstraintBean bcb,
String element,
List<ValidationResultInfo> results)
getMessage
private String getMessage(String messageId)
getElementXpath
private String getElementXpath(Stack<String> elementStack)
hasText
private boolean hasText(String string)
Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.