Class ValidationController
java.lang.Object
org.kuali.rice.krad.datadictionary.validator.ValidationController
A combination view controller for the Rice Dictionary Validator that handles both the setup/execution of the
validation and the output of the results.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionConstructor creating a new Rice Dictionary ValidatorValidationController(boolean displayErrors, boolean displayWarnings, boolean displayErrorMessages, boolean displayWarningMessages, boolean displayXmlPages) Constructor creating a new Rice Dictionary Validator with limited information during output -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the displayErrorMessages, whether the error messages should be displayedbooleanGets the displayErrors, whether the number of errors should be displayedbooleanGets the displayWarningMessages, whether the warning messages should be displayedbooleanGets the displayWarnings, whether the number of warnings should be displayedbooleanGets the displayXmlPages, whether the xml pages involved should be displayedvoidsetDisplayErrorMessages(boolean display) Sets the displayErrorMessagesvoidsetDisplayErrors(boolean display) Sets the displayErrorsvoidsetDisplayWarningMessages(boolean display) Sets the displayWarningMessagesvoidsetDisplayWarnings(boolean display) Sets the displayWarningsvoidsetDisplayXmlPages(boolean display) Sets the displayXmlPagesbooleanValidates a collection of Spring Beans with no outputbooleanvalidate(String[] xmlFiles, PrintStream stream, boolean failOnWarning) Validates a collection of Spring Beans with output going to a print streambooleanValidates a collection of Spring Beans with output going to a filebooleanValidates a collection of Spring Beans with output going to Log4jbooleanvalidate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, boolean failOnWarning) Validates a collection of Spring Beans with no outputbooleanvalidate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, PrintStream stream, boolean failOnWarning) Validates a collection of Spring Beans with output going to a print streambooleanvalidate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, String outputFile, boolean failOnWarning) Validates a collection of Spring Beans with output going to a filebooleanvalidate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, org.apache.logging.log4j.Logger log, boolean failOnWarning) Validates a collection of Spring Beans with output going to Log4jbooleanValidates a Component with output going to Log4jprotected voidwriteToFile(String path, Validator validator, boolean passed) Writes the results of the validation to an output fileprotected voidwriteToLog(org.apache.logging.log4j.Logger log, Validator validator, boolean passed) Writes the results of the validation to an output fileprotected voidwriteToStream(PrintStream stream, Validator validator, boolean passed) Writes the results of the validation to an output file
-
Field Details
-
endl
-
displayWarnings
protected boolean displayWarnings -
displayErrors
protected boolean displayErrors -
displayXmlPages
protected boolean displayXmlPages -
displayErrorMessages
protected boolean displayErrorMessages -
displayWarningMessages
protected boolean displayWarningMessages
-
-
Constructor Details
-
ValidationController
public ValidationController(boolean displayErrors, boolean displayWarnings, boolean displayErrorMessages, boolean displayWarningMessages, boolean displayXmlPages) Constructor creating a new Rice Dictionary Validator with limited information during output- Parameters:
displayErrors- - True if the Validator should show the number of error during outputdisplayWarnings- - True if the Validator should show the number of warnings during outputdisplayErrorMessages- - True if the Validator should show the messages for the error reportsdisplayWarningMessages- - True if the Validator should show messages involving warningsdisplayXmlPages- - True if the Validator should show the list of xml pages for the error reports
-
ValidationController
public ValidationController()Constructor creating a new Rice Dictionary Validator
-
-
Method Details
-
validate
public boolean validate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, boolean failOnWarning) Validates a collection of Spring Beans with no output- Parameters:
xmlFiles- The collection of xml files used to load the provided beansloader- resource loaderbeans- Collection of preloaded beansfailOnWarning- Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
public boolean validate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, String outputFile, boolean failOnWarning) Validates a collection of Spring Beans with output going to a file- Parameters:
xmlFiles- - The collection of xml files used to load the provided beansloader- - The source that was used to load the beansbeans- - Collection of preloaded beansoutputFile- - The file location to save the output tofailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
public boolean validate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, PrintStream stream, boolean failOnWarning) Validates a collection of Spring Beans with output going to a print stream- Parameters:
xmlFiles- - The collection of xml files used to load the provided beansloader- - The source that was used to load the beansbeans- - Collection of preloaded beansstream- - The PrintStream the output is sent tofailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
public boolean validate(String[] xmlFiles, org.springframework.core.io.ResourceLoader loader, org.springframework.beans.factory.support.DefaultListableBeanFactory beans, org.apache.logging.log4j.Logger log, boolean failOnWarning) Validates a collection of Spring Beans with output going to Log4j- Parameters:
xmlFiles- - The collection of xml files used to load the provided beansloader- - The source that was used to load the beansbeans- - Collection of preloaded beanslog- - The Log4j logger the output is sent tofailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
Validates a collection of Spring Beans with no output- Parameters:
xmlFiles- - The collection of xml files used to load the beansfailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
Validates a collection of Spring Beans with output going to a file- Parameters:
xmlFiles- - The collection of xml files used to load the beansoutputFile- - The file location to save the output tofailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
Validates a collection of Spring Beans with output going to a print stream- Parameters:
xmlFiles- - The collection of xml files used to load the beansstream- - The PrintStream the output is sent tofailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
public boolean validate(String[] xmlFiles, org.apache.logging.log4j.Logger log, boolean failOnWarning) Validates a collection of Spring Beans with output going to Log4j- Parameters:
xmlFiles- - The collection of xml files used to load the provided beanslog- - The Log4j logger the output is sent tofailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
validate
public boolean validate(Component object, org.apache.logging.log4j.Logger log, boolean failOnWarning) Validates a Component with output going to Log4j- Parameters:
object- - The component to be validatedlog- - The Log4j logger the output is sent tofailOnWarning- - Whether detecting a warning should cause the validation to fail- Returns:
- Returns true if the beans past validation
-
writeToFile
Writes the results of the validation to an output file- Parameters:
path- - The path to the file to write results tovalidator- - The filled validatorpassed- - Whether the validation passed or not
-
writeToStream
Writes the results of the validation to an output file- Parameters:
stream- - The PrintStream the output is sent tovalidator- - The filled validatorpassed- - Whether the validation passed or not
-
writeToLog
Writes the results of the validation to an output file- Parameters:
log- - The Log4j logger the output is sent tovalidator- - The filled validatorpassed- - Whether the validation passed or not
-
setDisplayWarnings
public void setDisplayWarnings(boolean display) Sets the displayWarnings- Parameters:
display- - Display or not
-
setDisplayErrors
public void setDisplayErrors(boolean display) Sets the displayErrors- Parameters:
display- - Display or not
-
setDisplayXmlPages
public void setDisplayXmlPages(boolean display) Sets the displayXmlPages- Parameters:
display- - Display or not
-
setDisplayErrorMessages
public void setDisplayErrorMessages(boolean display) Sets the displayErrorMessages- Parameters:
display- - Display or not
-
setDisplayWarningMessages
public void setDisplayWarningMessages(boolean display) Sets the displayWarningMessages- Parameters:
display- - Display or not
-
isDisplayWarnings
public boolean isDisplayWarnings()Gets the displayWarnings, whether the number of warnings should be displayed- Returns:
- displayWarnings
-
isDisplayErrors
public boolean isDisplayErrors()Gets the displayErrors, whether the number of errors should be displayed- Returns:
- displayErros
-
isDisplayXmlPages
public boolean isDisplayXmlPages()Gets the displayXmlPages, whether the xml pages involved should be displayed- Returns:
- displayXmlPages
-
isDisplayErrorMessages
public boolean isDisplayErrorMessages()Gets the displayErrorMessages, whether the error messages should be displayed- Returns:
- displayErrorMessages
-
isDisplayWarningMessages
public boolean isDisplayWarningMessages()Gets the displayWarningMessages, whether the warning messages should be displayed- Returns:
- displayWarningMessages
-