Class ErrorReport
java.lang.Object
org.kuali.rice.krad.datadictionary.validator.ErrorReport
Collection of information regarding a single error detected within a dictionary bean
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionErrorReport(int ErrorStatus) Constructor creating a new report for an errorErrorReport(int errorStatus, String validationFailed, String beanLocation) Constructor creating a new report for an error with set valuesErrorReport(int errorStatus, String validationFailed, String beanLocation, String[] values) Constructor creating a new report for an error with set valuesErrorReport(int errorStatus, String validationFailed, ValidationTrace trace) Constructor creating a new report for an error with set valuesErrorReport(int errorStatus, String validationFailed, ValidationTrace trace, String[] values) Constructor creating a new report for an error with set values -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCurrentValue(String value) Adds a value involved in the errorvoidaddXmlPage(String page) Adds a xml page involved in the errorvoidaddXmlPages(ArrayList<String> pages) Add a list of xml page involved in the errorstatic ErrorReportcreateError(String validationFailed, ValidationTrace trace) Creates a new ErrorReport of ERROR statusstatic ErrorReportcreateWarning(String validationFailed, ValidationTrace trace) Creates a new ErrorReport of WARNING statusCreates a message for the error being reportedCreates a message for the xml pages involvedRetrieves the location of the bean in the tracegetCurrentValue(int index) Retrieves a value involved in the errorintRetrieves the number of values involved in the error.intRetrieves the type of errorRetrieves the validation that was failedgetXmlPage(int index) Retrieves a xml page file location involved in the errorintRetrieves the number of xml pages involved in the errorbooleanisError()Returns whether this message represents an error per its errorStatus.booleanReturns whether this message represents a warning per its errorStatus.voidmodifyCurrentValue(int index, String value) Replaces a value in the list of those involvedvoidmodifyXmlPage(int index, String page) Replaces a xml page in the list of those involvedvoidremoveCurrentValue(int index) Removes a value from the list of those involvedvoidremoveXmlPage(int index) Removes a xml page from the list of those involvedvoidsetBeanLocation(String location) Sets the location of the bean in the tracevoidsetValidationFailed(String validation) Sets the validation that was failed
-
Field Details
-
ERROR
public static final int ERROR- See Also:
-
WARNING
public static final int WARNING- See Also:
-
-
Constructor Details
-
ErrorReport
public ErrorReport(int ErrorStatus) Constructor creating a new report for an error- Parameters:
ErrorStatus- - The type of error being reported
-
ErrorReport
Constructor creating a new report for an error with set values- Parameters:
errorStatus- - The type of error being reportedvalidationFailed- - The validation that was failedbeanLocation- - The location of the bean in which error occurredvalues- - An array of the values effected
-
ErrorReport
Constructor creating a new report for an error with set values- Parameters:
errorStatus- - The type of error being reportedvalidationFailed- - The validation that was failedtrace- - ValidationTrace containing information on xml files and location
-
ErrorReport
public ErrorReport(int errorStatus, String validationFailed, ValidationTrace trace, String[] values) Constructor creating a new report for an error with set values- Parameters:
errorStatus- - The type of error being reportedvalidationFailed- - The validation that was failedtrace- - ValidationTrace containing information on xml files and locationvalues- - An array of the values effected
-
ErrorReport
Constructor creating a new report for an error with set values- Parameters:
errorStatus- - The type of error being reportedvalidationFailed- - The validation that was failedbeanLocation- - The location of the bean in which error occurred
-
-
Method Details
-
createError
Creates a new ErrorReport of ERROR status- Parameters:
validationFailed- - The validation that was failedtrace- - ValidationTrace containing information on xml files and location- Returns:
- Returns a new ErrorReport of ERROR status
-
createWarning
Creates a new ErrorReport of WARNING status- Parameters:
validationFailed- - The validation that was failedtrace- - ValidationTrace containing information on xml files and location- Returns:
- Returns a new ErrorReport of WARNING status
-
addCurrentValue
Adds a value involved in the error- Parameters:
value- - Value involved ("Name of Value = Its Value")
-
addXmlPage
Adds a xml page involved in the error- Parameters:
page- - The file path of the xml page involved
-
addXmlPages
Add a list of xml page involved in the error- Parameters:
pages- - The file path of the xml page involved
-
removeCurrentValue
public void removeCurrentValue(int index) Removes a value from the list of those involved- Parameters:
index- - The index of the value
-
removeXmlPage
public void removeXmlPage(int index) Removes a xml page from the list of those involved- Parameters:
index- - The index of the xml page
-
modifyCurrentValue
Replaces a value in the list of those involved- Parameters:
index- - The index of the valuevalue- - The value to replace the value with
-
modifyXmlPage
Replaces a xml page in the list of those involved- Parameters:
index- - The index of the pagepage- - The page to replace the xml page with
-
errorMessage
Creates a message for the error being reported- Returns:
- A compiled message about the error in the report
-
errorPageList
Creates a message for the xml pages involved- Returns:
- A compiled list of the xml pages involved
-
setValidationFailed
Sets the validation that was failed- Parameters:
validation- - The validation that failed
-
setBeanLocation
Sets the location of the bean in the trace- Parameters:
location- - The Bean location
-
getErrorStatus
public int getErrorStatus()Retrieves the type of error- Returns:
- Integer value of the type of error
-
getValidationFailed
Retrieves the validation that was failed- Returns:
- The failed validation
-
getBeanLocation
Retrieves the location of the bean in the trace- Returns:
- The location of the bean
-
getCurrentValue
Retrieves a value involved in the error- Parameters:
index- - The index of the value- Returns:
- The value involved at the provided index
-
getXmlPage
Retrieves a xml page file location involved in the error- Parameters:
index- - The index of the page- Returns:
- The xml file involved at the provided index
-
getCurrentValueSize
public int getCurrentValueSize()Retrieves the number of values involved in the error.- Returns:
- The number of values involved
-
getXmlPageSize
public int getXmlPageSize()Retrieves the number of xml pages involved in the error- Returns:
- The number of xml pages involved
-
isError
public boolean isError()Returns whether this message represents an error per its errorStatus.- Returns:
- true if the message represents an error
-
isWarning
public boolean isWarning()Returns whether this message represents a warning per its errorStatus.- Returns:
- true if the message represents a warning
-