com.ibm.commerce.edp.api

Class InvalidRequestException

  • All Implemented Interfaces:
    java.io.Serializable


    public class InvalidRequestException
    extends InputException

    This class represents the exception thrown when an invalid request is being attempted.

    In invalid request falls in the following categories:

    • a request to PDP is trying to use objects that have been previously canceled
    • an edit request is trying to modify a PI that cannot be modified (not mutable)
    • an edit request is trying to modify a PI amount beyond its allowed limits (maximum or minimum)
    • a last chance edit is tried (changes after releases have been created)
    • an edit request is trying to remove a PI after deposited requests have been successfully executed
    See Also:
    Serialized Form
    • Constructor Detail

      • InvalidRequestException

        public InvalidRequestException()

        Default Constructor.

      • InvalidRequestException

        public InvalidRequestException(java.lang.String resourceBundleName,
                                       java.lang.String messageKey,
                                       java.lang.Object[] formatArguments,
                                       java.lang.String defaultText)

        Constructor with localized message.

        Parameters:
        resourceBundleName - the name of the resource bundle to be used to generate a localized exception message
        messageKey - the key to identify the resource to generate a localized exception
        formatArguments - an array of arguments to build the localized message
        defaultText - the message that is shown if the localized message cannot be generated
      • InvalidRequestException

        public InvalidRequestException(java.lang.String resourceBundleName,
                                       java.lang.String messageKey,
                                       java.lang.Object[] formatArguments,
                                       java.lang.String defaultText,
                                       java.lang.Throwable exception)

        Constructor with a localized message and a chained exception.

        Parameters:
        resourceBundleName - the name of the resource bundle to be used to generate a localized exception message
        messageKey - the key to identify the resource to generate a localized exception
        formatArguments - an array of arguments to build the localized message
        defaultText - the message that is shown if the localized message cannot be generated
        exception - the exception to be chained
      • InvalidRequestException

        public InvalidRequestException(java.lang.Throwable exception)

        Constructor with a chained exception.

        Parameters:
        exception - the exception to be chained
    • Method Detail

      • setFailedRequest

        public void setFailedRequest(java.lang.String localFailedRequest)

        This method sets the request that could not be executed because the target object was canceled.

        Parameters:
        failedRequest - the request that failed because the target object was canceled
      • getFailedRequest

        public java.lang.String getFailedRequest()

        This method returns the request that could not be executed because the target object was canceled.

        Returns:
        the request that failed because the target object was canceled
      • setObjectId

        public void setObjectId(java.lang.String localObjectId)

        This method sets the unique identifier of the canceled object.

        Parameters:
        objectId - the unique identifier of the canceled object
      • getObjectId

        public java.lang.String getObjectId()

        This method returns the unique identifier of the canceled object.

        Returns:
        the unique identifier of the canceled object
      • setObjectType

        public void setObjectType(java.lang.String localObjectType)

        This method sets the type of the canceled object.

        Parameters:
        objectType - the type of the canceled object
      • getObjectType

        public java.lang.String getObjectType()

        This method returns the type of the canceled object.

        Returns:
        the type of the canceled object
      • dumpException

        public java.lang.String dumpException()
        This method dumps this exception to a String.
        Overrides:
        dumpException in class BaseException
        Returns:
        String The string after dumping this exception