com.ibm.commerce.edp.utils

Class ExceptionHelper

  • java.lang.Object
    • com.ibm.commerce.edp.utils.ExceptionHelper


  • public class ExceptionHelper
    extends java.lang.Object
    This class helps to populate fields in an exception to be thrown.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ExceptionHelper() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static ECApplicationException buildECApplicationExceptionFromBaseException(BaseException baseExc, java.lang.String sourceClassName, java.lang.String sourceMethodName)
      This method builds an ECApplicationException object from a BaseException object.
      static ECException buildECException(BaseException e, java.lang.String sourceClassName, java.lang.String sourceMethodName)
      This method returns the ECException object from the BaseException object.
      static ECSystemException buildECSystemExceptionFromBaseException(BaseException baseExc, java.lang.String sourceClassName, java.lang.String sourceMethodName)
      This method builds an ECSystemException object from a BaseException object.
      static boolean isSystemException(BaseException e)
      This method returns if the BaseException object is system level exception.
      static void setCommonProperties(BaseException theException, java.lang.String className, java.lang.String methodName)
      This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components.
      static void setCommonProperties(BaseException theException, java.lang.String className, java.lang.String methodName, java.lang.String messageKey)
      This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components.
      static void setCommonProperties(BaseException theException, java.lang.String className, java.lang.String methodName, java.lang.String messageKey, java.lang.Object messageParameter)
      This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components.
      static void setCommonProperties(BaseException theException, java.lang.String className, java.lang.String methodName, java.lang.String messageKey, java.lang.Object[] messageParameters)
      This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExceptionHelper

        public ExceptionHelper()
    • Method Detail

      • setCommonProperties

        public static void setCommonProperties(BaseException theException,
                                               java.lang.String className,
                                               java.lang.String methodName,
                                               java.lang.String messageKey,
                                               java.lang.Object[] messageParameters)
        This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components. It sets class source, method source, messagekey, message format parameters
        Parameters:
        theException - The exception to be updated
        className - The name of the class that caused the exception
        methodName - The name of the method that caused the exception
        messageKey - The key message
        messageParameters - The parameters for the message to be globalized
      • setCommonProperties

        public static void setCommonProperties(BaseException theException,
                                               java.lang.String className,
                                               java.lang.String methodName,
                                               java.lang.String messageKey,
                                               java.lang.Object messageParameter)
        This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components. It sets class source, method source, messagekey, message format parameter This overloaded method is target the message with only one format parameter
        Parameters:
        theException - The exception to be updated
        className - The name of the class that caused the exception
        methodName - The name of the method that caused the exception
        messageKey - The key message
        messageParameter - The parameters for the message to be globalized
      • setCommonProperties

        public static void setCommonProperties(BaseException theException,
                                               java.lang.String className,
                                               java.lang.String methodName,
                                               java.lang.String messageKey)
        This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components. It sets class source, method source, messageKey This overloaded method is target the message without format parameter
        Parameters:
        theException - The exception to be updated
        className - The name of the class that caused the exception
        methodName - The name of the method that caused the exception
        messageKey - The key message
      • setCommonProperties

        public static void setCommonProperties(BaseException theException,
                                               java.lang.String className,
                                               java.lang.String methodName)
        This method sets common properties of exception in Payment Rules/WebSphere Commerce Payments components. It sets class source, method source This overloaded method is target the exception not message
        Parameters:
        theException - The exception to be updated
        className - The name of the class that caused the exception
        methodName - The name of the method that caused the exception
      • buildECException

        public static ECException buildECException(BaseException e,
                                                   java.lang.String sourceClassName,
                                                   java.lang.String sourceMethodName)
        This method returns the ECException object from the BaseException object.
        Parameters:
        e - the BaseException object thrown in WebSphere Commerce Payments component
        sourceClassName - name of the source class where this exception is thrown
        sourceMethodName - name of the source method where this exception is thrown
        Returns:
        the ECException object from the BaseException object
      • buildECSystemExceptionFromBaseException

        public static ECSystemException buildECSystemExceptionFromBaseException(BaseException baseExc,
                                                                                java.lang.String sourceClassName,
                                                                                java.lang.String sourceMethodName)
        This method builds an ECSystemException object from a BaseException object.
        Parameters:
        baseExc - the BaseException object
        sourceClassName - name of the source class where this exception is thrown
        sourceMethodName - name of the source method where this exception is thrown
        Returns:
        the ECSystemException object
      • buildECApplicationExceptionFromBaseException

        public static ECApplicationException buildECApplicationExceptionFromBaseException(BaseException baseExc,
                                                                                          java.lang.String sourceClassName,
                                                                                          java.lang.String sourceMethodName)
        This method builds an ECApplicationException object from a BaseException object.
        Parameters:
        baseExc - the BaseException object
        sourceClassName - name of the source class where this exception is thrown
        sourceMethodName - name of the source method where this exception is thrown
        Returns:
        the ECApplicationException object
      • isSystemException

        public static boolean isSystemException(BaseException e)
        This method returns if the BaseException object is system level exception.
        Parameters:
        e - the BaseException object
        Returns:
        if the BaseException object is system level exception