org.iscreen
Class ValidationTrace

java.lang.Object
  extended by org.iscreen.ValidationTrace

public class ValidationTrace
extends java.lang.Object

Instances of this class provide tracing through ValidationService to ValidationService to Validator, etc. Provided as part of a failure, these instances provide full traceability through the validation engine, giving unique representations of that trace.

Author:
Shellman, Dan

Constructor Summary
ValidationTrace()
          Default constructor.
 
Method Summary
 void addFieldEntry(java.lang.String entry)
           
 void addServiceEntry(java.lang.String entry)
           
 java.lang.String getFieldTrace()
          Retrieves the trace for fields.
 java.lang.String getServiceTrace()
          Retrieves the trace for the services/validators.
 ValidationTrace getSnapshot()
           
 void popEntry()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationTrace

public ValidationTrace()
Default constructor.

Method Detail

addServiceEntry

public void addServiceEntry(java.lang.String entry)

addFieldEntry

public void addFieldEntry(java.lang.String entry)

popEntry

public void popEntry()

getSnapshot

public ValidationTrace getSnapshot()

getFieldTrace

public java.lang.String getFieldTrace()
Retrieves the trace for fields. This trace shows the object being validated through the "fields" (i.e. OGNL/MVEL mapping expressions) being validated. An example trace would be: com.acme.SomeObject->someField When iterating across validation sets, it might look like: java.util.List->3->com.acme.SomeObject->someField

Returns:
Returns the unique trace via object class and fields.

getServiceTrace

public java.lang.String getServiceTrace()
Retrieves the trace for the services/validators. This trace shows the validation sets (ValidationService) and validators through which the object is validated. An example trace would be: SomeSet->org.iscreen.StringValidator When iterating across validation sets, it might look like: SomeSet->2->SomeOtherSet->org.iscreen.StringValidator

Returns:
Returns the unique trace via service and validators.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object