org.kuali.rice.krad.datadictionary.validation.result
Class ProcessorResult

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.validation.result.ProcessorResult

public class ProcessorResult
extends Object

defines the information expected when a processor has processed a constraint

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

Constructor Summary
ProcessorResult(ConstraintValidationResult constraintValidationResult)
          creates a processor result from the provided constraint validation result
ProcessorResult(ConstraintValidationResult constraintValidationResult, Constrainable definition, AttributeValueReader attributeValueReader, Constraint... constraints)
          creates a processor result from the parameters provided
ProcessorResult(ConstraintValidationResult constraintValidationResult, Constrainable definition, AttributeValueReader attributeValueReader, List<Constraint> constraints)
          creates a processor result from the parameters provided
ProcessorResult(List<ConstraintValidationResult> constraintValidationResults)
          creates a processor result from the provided constraint validation results
ProcessorResult(List<ConstraintValidationResult> constraintValidationResults, Constrainable definition, AttributeValueReader attributeValueReader, Constraint... constraints)
          creates a processor result from the parameters provided
 
Method Summary
 AttributeValueReader getAttributeValueReader()
           
 List<Constraint> getConstraints()
           
 List<ConstraintValidationResult> getConstraintValidationResults()
           
 Constrainable getDefinition()
           
 ConstraintValidationResult getFirstConstraintValidationResult()
          gets the first constraint validation result
 boolean isAttributeValueReaderProvided()
          checks whether an attribute value reader is present
 boolean isDefinitionProvided()
          checks whether a Data Dictionary definition is present
 boolean isSingleConstraintResult()
          checks whether this object has a single constraint validation result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorResult

public ProcessorResult(ConstraintValidationResult constraintValidationResult)
creates a processor result from the provided constraint validation result

Parameters:
constraintValidationResult - - the constraint validation result

ProcessorResult

public ProcessorResult(ConstraintValidationResult constraintValidationResult,
                       Constrainable definition,
                       AttributeValueReader attributeValueReader,
                       Constraint... constraints)
creates a processor result from the parameters provided

Parameters:
constraintValidationResult - - the constraint validation result
definition - - a Data Dictionary definition e.g. ComplexAttributeDefinition or CollectionDefinition
attributeValueReader - - provides access to the attribute being validated
constraints - - optional constraints to use

ProcessorResult

public ProcessorResult(ConstraintValidationResult constraintValidationResult,
                       Constrainable definition,
                       AttributeValueReader attributeValueReader,
                       List<Constraint> constraints)
creates a processor result from the parameters provided

Parameters:
constraintValidationResult - - the constraint validation result
definition - - a Data Dictionary definition e.g. ComplexAttributeDefinition or CollectionDefinition
attributeValueReader - - provides access to the attribute being validated
constraints - - the list of constraints to use

ProcessorResult

public ProcessorResult(List<ConstraintValidationResult> constraintValidationResults)
creates a processor result from the provided constraint validation results

Parameters:
constraintValidationResults - - the constraint validation results to use

ProcessorResult

public ProcessorResult(List<ConstraintValidationResult> constraintValidationResults,
                       Constrainable definition,
                       AttributeValueReader attributeValueReader,
                       Constraint... constraints)
creates a processor result from the parameters provided

Parameters:
constraintValidationResults - - the constraint validation results
definition - - a Data Dictionary definition e.g. ComplexAttributeDefinition or CollectionDefinition
attributeValueReader - - provides access to the attribute being validated
constraints - - optional constraints to use
Method Detail

isSingleConstraintResult

public boolean isSingleConstraintResult()
checks whether this object has a single constraint validation result

Returns:
true if only one result found, false if not

isDefinitionProvided

public boolean isDefinitionProvided()
checks whether a Data Dictionary definition is present

Returns:
true if definition is present, false otherwise

isAttributeValueReaderProvided

public boolean isAttributeValueReaderProvided()
checks whether an attribute value reader is present

Returns:
true if reader is present, false otherwise

getFirstConstraintValidationResult

public ConstraintValidationResult getFirstConstraintValidationResult()
gets the first constraint validation result

Returns:
null if there are no results

getConstraintValidationResults

public List<ConstraintValidationResult> getConstraintValidationResults()
Returns:
the constraintValidationResults

getDefinition

public Constrainable getDefinition()
Returns:
the definition

getAttributeValueReader

public AttributeValueReader getAttributeValueReader()
Returns:
the attributeValueReader

getConstraints

public List<Constraint> getConstraints()
Returns:
the constraints


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