Class ValidationTrace
java.lang.Object
org.kuali.rice.krad.datadictionary.validator.ValidationTrace
Linear collection of identifiers for individual Spring Beans starting with the base bean and ending with the most
recent. Has the ability to located xml files related to the trace.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for an empty token to start a traceValidationTrace(String[] files, org.springframework.core.io.ResourceLoader loader) Constructor for an empty token to start a trace -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a single entry into the tracevoidaddBean(UifDictionaryBean configurable) Adds a UIF Configurable to the tracevoidAdds a UIF Component to the tracevoidcreateError(String validation, String[] values) Creates a new error report as an Error and adds it to the global list.voidcreateWarning(String validation, String[] values) Creates a new error report as a Warning and adds it to the global list.Finds related xml files to an error by searching for files that contain beans that have been encountered in the validation.getBeanId(int index) Retrieves a single entry in the BeanId trace list, a collection identifiers for the traced beansRetrieves the complete trace path with each bean shown in the form beanId(BeanType)getBeanType(int index) Retrieves a single entry in the BeanType trace list, a collection of types for the traced beansa collection identifiers for the traced beansgetCopy()Creates a copy of the ValidationTraceRetrieves the list of xmls file paths found to be related to errorintRetrieves the number of beans in the trace listintRetrieves the stage when the trace is taking place The stage is the time frame when the validation is taking place in the applicationvoidmodifyBean(int index, String beanId, String beanType) Replaces a trace entry's informationvoidremoveBean(int index) Removes an entry from the tracevoidsetValidationStage(int stage) Sets the stage of the validation where the trace is taking place
-
Field Details
-
NO_BEAN_ID
- See Also:
-
START_UP
public static final int START_UP- See Also:
-
BUILD
public static final int BUILD- See Also:
-
-
Constructor Details
-
ValidationTrace
public ValidationTrace()Constructor for an empty token to start a trace -
ValidationTrace
Constructor for an empty token to start a trace- Parameters:
files- files to loadloader- resource loader
-
-
Method Details
-
addBean
Adds a single entry into the trace- Parameters:
beanType- - The type of beanbeanId- - An identifier for the bean
-
addBean
Adds a UIF Component to the trace- Parameters:
component- - The object to be added
-
addBean
Adds a UIF Configurable to the trace- Parameters:
configurable- - The object to be added
-
removeBean
public void removeBean(int index) Removes an entry from the trace- Parameters:
index-
-
modifyBean
Replaces a trace entry's information- Parameters:
index- - The location of the beanbeanId- - An identifier for the beanbeanType- - The type of bean
-
getCopy
Creates a copy of the ValidationTrace- Returns:
- A complete copy of the current token
-
findXmlFiles
Finds related xml files to an error by searching for files that contain beans that have been encountered in the validation. The file path and Document version of the xmls are paired and stored in a Map. This allows for returning the file paths easy when searching through the Documents.- Returns:
- A list of file paths to the xmls in which the beans were found
-
setValidationStage
public void setValidationStage(int stage) Sets the stage of the validation where the trace is taking place- Parameters:
stage- - The stage of the validation
-
createError
Creates a new error report as an Error and adds it to the global list.- Parameters:
validation- - The validation that fails.values- - The values involved.
-
createWarning
Creates a new error report as a Warning and adds it to the global list.- Parameters:
validation- - The validation that fails.values- - The values involved.
-
getBeanId
Retrieves a single entry in the BeanId trace list, a collection identifiers for the traced beans- Parameters:
index- - The location of the bean- Returns:
- String Identifier for the bean at the provided index of the trace
-
getBeanType
Retrieves a single entry in the BeanType trace list, a collection of types for the traced beansa collection identifiers for the traced beans- Parameters:
index- - The location of the bean type- Returns:
- String Type for the bean at the provided index of the trace
-
getValidationStage
public int getValidationStage()Retrieves the stage when the trace is taking place The stage is the time frame when the validation is taking place in the application- Returns:
- Returns the stage of the validation.
-
getTraceSize
public int getTraceSize()Retrieves the number of beans in the trace list- Returns:
- Number of beans stored in the trace
-
getBeanLocation
Retrieves the complete trace path with each bean shown in the form beanId(BeanType)- Returns:
- The String path of the trace
-
getRelatedXmls
Retrieves the list of xmls file paths found to be related to error- Returns:
- A list of file paths to the related xmls
-