public class DefaultValidatorImpl extends BaseAbstractValidator
validatorFactory
Constructor and Description |
---|
DefaultValidatorImpl() |
getValidatorFactory, setValidatorFactory
public DefaultValidatorImpl()
public MessageService getMessageService()
public void setMessageService(MessageService messageService)
public String getMessageLocaleKey()
public void setMessageLocaleKey(String messageLocaleKey)
public String getMessageGroupKey()
public void setMessageGroupKey(String messageGroupKey)
public void setDateParser(DateParser dateParser)
public boolean isServerSide()
public void setServerSide(boolean serverSide)
serverSide
- the serverSide to setpublic DateParser getDateParser()
public List<ValidationResultInfo> validateObject(Object data, ObjectStructureDefinition objStructure, ContextInfo contextInfo)
validateObject
in interface Validator
validateObject
in class BaseAbstractValidator
org.kuali.student.r1.common.validator.Validator#validateObject(java.lang.Object, org.kuali.student.common.dictionary.dto.ObjectStructureDefinition)
public List<ValidationResultInfo> validateObject(Object data, ObjectStructureHierarchy objStructure, ContextInfo contextInfo)
data
- objStructure
- public void validateField(List<ValidationResultInfo> results, FieldDefinition field, ObjectStructureHierarchy objStruct, ConstraintDataProvider dataProvider, Stack<String> elementStack, Object rootData, ObjectStructureDefinition rootObjectStructure, ContextInfo contextInfo)
protected void processNestedObjectStructure(List<ValidationResultInfo> results, Object value, ObjectStructureHierarchy nestedObjStruct, FieldDefinition field, Stack<String> elementStack, Object rootData, ObjectStructureDefinition rootObjStructure, ConstraintDataProvider parentDataProvider, ContextInfo contextInfo)
protected void processConstraint(List<ValidationResultInfo> valResults, FieldDefinition field, ObjectStructureHierarchy objStructure, Object value, ConstraintDataProvider dataProvider, Stack<String> elementStack, Object rootData, ObjectStructureDefinition rootObjStructure, ContextInfo contextInfo)
protected ValidationResultInfo processRequireConstraint(String element, RequiredConstraint constraint, FieldDefinition field, ObjectStructureDefinition objStructure, ConstraintDataProvider dataProvider, ContextInfo contextInfo)
protected Constraint processCaseConstraint(List<ValidationResultInfo> valResults, CaseConstraint caseConstraint, ObjectStructureHierarchy objStructure, Object value, ConstraintDataProvider dataProvider, Stack<String> elementStack, Object rootData, ObjectStructureDefinition rootObjStructure, ContextInfo contextInfo)
valResults
- caseConstraint
- objStructure
- public ValidationResultInfo processValidCharConstraint(String element, ValidCharsConstraint vcConstraint, ConstraintDataProvider dataProvider, Object value, ContextInfo contextInfo)
protected ValidationResultInfo processOccursConstraint(String element, MustOccurConstraint constraint, FieldDefinition field, ObjectStructureDefinition objStructure, ConstraintDataProvider dataProvider, ContextInfo contextInfo)
element
- constraint
- field
- objStructure
- dataProvider
- protected void processLookupConstraint(List<ValidationResultInfo> valResults, LookupConstraint lookupConstraint, FieldDefinition field, Stack<String> elementStack, ConstraintDataProvider dataProvider, ObjectStructureDefinition objStructure, Object rootData, ObjectStructureDefinition rootObjStructure, Object value, ContextInfo contextInfo)
protected void processBaseConstraints(List<ValidationResultInfo> valResults, Constraint constraint, FieldDefinition field, Object value, Stack<String> elementStack, ContextInfo contextInfo)
protected void processCrossFieldWarning(List<ValidationResultInfo> valResults, CaseConstraint crossConstraint, Constraint constraint, Object value, ValidationResult.ErrorLevel errorLevel, ContextInfo contextInfo)
valResults
- crossConstraint
- constraint
- protected void processCrossFieldWarning(List<ValidationResultInfo> valResults, RequiredConstraint requiredConstraint, ValidationResult.ErrorLevel errorLevel, String field, ContextInfo contextInfo)
valResults
- requiredConstraint
- field
- protected void processCrossFieldWarning(List<ValidationResultInfo> valResults, LookupConstraint lookupConstraint, ValidationResult.ErrorLevel errorLevel, ContextInfo contextInfo)
valResults
- lookupConstraint
- protected void addCrossFieldWarning(List<ValidationResultInfo> valResults, String crossFieldPath, String message, ValidationResult.ErrorLevel errorLevel)
protected void validateBoolean(Object value, Constraint constraint, String element, List<ValidationResultInfo> results, ContextInfo contextInfo)
protected void validateDouble(Object value, Constraint constraint, String element, List<ValidationResultInfo> results, ContextInfo contextInfo)
protected void validateFloat(Object value, Constraint constraint, String element, List<ValidationResultInfo> results, ContextInfo contextInfo)
protected void validateLong(Object value, Constraint constraint, String element, List<ValidationResultInfo> results, ContextInfo contextInfo)
protected void validateInteger(Object value, Constraint constraint, String element, List<ValidationResultInfo> results, ContextInfo contextInfo)
protected void validateDate(Object value, Constraint constraint, String element, List<ValidationResultInfo> results, DateParser dateParser, ContextInfo contextInfo)
protected void validateString(Object value, Constraint constraint, String element, List<ValidationResultInfo> results, ContextInfo contextInfo)
protected String getMessage(String messageId, ContextInfo contextInfo)
protected String getElementXpath(Stack<String> elementStack)
protected Map<String,Object> toMap(Constraint c)
public SearchService getSearchDispatcher()
public void setSearchDispatcher(SearchService searchDispatcher)
public List<ValidationResultInfo> validateObject(FieldDefinition field, Object o, ObjectStructureDefinition objStructure, Stack<String> elementStack, ContextInfo contextInfo)
validateObject
in interface Validator
validateObject
in class BaseAbstractValidator
org.kuali.student.r1.common.validator.Validator#validateObject(org.kuali.student.common.dictionary.dto.FieldDefinition, java.lang.Object, org.kuali.student.common.dictionary.dto.ObjectStructureDefinition, java.util.Stack)
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.