atg.commerce.util
Class ConcurrentUpdateDetector

java.lang.Object
  extended by atg.commerce.util.ConcurrentUpdateDetector

public class ConcurrentUpdateDetector
extends java.lang.Object

This class is intended to detect concurrent update attemps by checking exceptions to see if they are, or contain, ConcurrentUpdateExceptions (CUE) or InvalidVersionExceptions (IVE). A form handler can use this class to determine whether the user can be prompted to resubmit the form.

Concurrent updates can happen when users are using more than one browser to update the same user data. The Repository and Order object structure check for concurrent update attempts to ensure the data integrity of the order data. If a concurrent update attempt is detected, the Repository or OrderManager will throw an exception to indicate this condition. This class can be used to catch this condition and alert the user that they should resubmit their changes for them to take effect.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
ConcurrentUpdateDetector()
           
 
Method Summary
static boolean isConcurrentUpdate(java.lang.Throwable pException)
          Checks to see if the exception is an instance of ConcurrentUpdateException, InvalidVersionException, or a ContainerException which contains a CUE or IVE.
static void main(java.lang.String[] pArgs)
          UNIT TESTING CODE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

ConcurrentUpdateDetector

public ConcurrentUpdateDetector()
Method Detail

isConcurrentUpdate

public static boolean isConcurrentUpdate(java.lang.Throwable pException)
Checks to see if the exception is an instance of ConcurrentUpdateException, InvalidVersionException, or a ContainerException which contains a CUE or IVE.

Parameters:
pException - The exception to test.
Returns:
True if the exception represents an concurrent update attempt.

main

public static void main(java.lang.String[] pArgs)
UNIT TESTING CODE