org.kuali.rice.krad.datadictionary.validator
Class TracerToken

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.validator.TracerToken

public class TracerToken
extends Object

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
static int BUILD
           
static String NO_BEAN_ID
           
static int START_UP
           
 
Constructor Summary
TracerToken()
          Constructor for an empty token to start a trace
TracerToken(String[] files, org.springframework.core.io.ResourceLoader loader)
          Constructor for an empty token to start a trace
 
Method Summary
 void addBean(Component component)
          Adds a UIF Component to the trace
 void addBean(String beanType, String beanId)
          Adds a single entry into the trace
 void addBean(UifDictionaryBean configurable)
          Adds a UIF Configurable to the trace
 ArrayList<String> findXmlFiles()
          Finds related xml files to an error by searching for files that contain beans that have been encountered in the validation.
 String getBeanId(int index)
          Retrieves a single entry in the BeanId trace list, a collection identifiers for the traced beans
 String getBeanLocation()
          Retrieves the complete trace path with each bean shown in the form beanId(BeanType)
 String 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 beans
 TracerToken getCopy()
          Creates a copy of the TracerToken
 ArrayList<String> getRelatedXmls()
          Retrieves the list of xmls file paths found to be related to error
 int getTraceSize()
          Retrieves the number of beans in the trace list
 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
 void modifyBean(int index, String beanId, String beanType)
          Replaces a trace entry's information
 void removeBean(int index)
          Removes an entry from the trace
 void setValidationStage(int stage)
          Sets the stage of the validation where the trace is taking place
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_BEAN_ID

public static final String NO_BEAN_ID
See Also:
Constant Field Values

START_UP

public static final int START_UP
See Also:
Constant Field Values

BUILD

public static final int BUILD
See Also:
Constant Field Values
Constructor Detail

TracerToken

public TracerToken()
Constructor for an empty token to start a trace


TracerToken

public TracerToken(String[] files,
                   org.springframework.core.io.ResourceLoader loader)
Constructor for an empty token to start a trace

Method Detail

addBean

public void addBean(String beanType,
                    String beanId)
Adds a single entry into the trace

Parameters:
beanId - - An identifier for the bean
beanType - - The type of bean

addBean

public void addBean(Component component)
Adds a UIF Component to the trace

Parameters:
component - - The object to be added

addBean

public void addBean(UifDictionaryBean configurable)
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

public void modifyBean(int index,
                       String beanId,
                       String beanType)
Replaces a trace entry's information

Parameters:
index -
beanId - - An identifier for the bean
beanType - - The type of bean

getCopy

public TracerToken getCopy()
Creates a copy of the TracerToken

Returns:
A complete copy of the current token

findXmlFiles

public ArrayList<String> 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 -

getBeanId

public String getBeanId(int index)
Retrieves a single entry in the BeanId trace list, a collection identifiers for the traced beans

Parameters:
index -
Returns:
String Identifier for the bean at the provided index of the trace

getBeanType

public String 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 beans

Parameters:
index -
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:

getTraceSize

public int getTraceSize()
Retrieves the number of beans in the trace list

Returns:
Number of beans stored in the trace

getBeanLocation

public String getBeanLocation()
Retrieves the complete trace path with each bean shown in the form beanId(BeanType)

Returns:
The String path of the trace

getRelatedXmls

public ArrayList<String> getRelatedXmls()
Retrieves the list of xmls file paths found to be related to error

Returns:
A list of file paths to the related xmls


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