public class PluginException extends BaseException
This class is the base exception for the plug-in exception hierarchy.
All of the specific plug-in exceptions extend this exception. Some exceptions, depending on the failed transaction, include the associated financial container objects. This allows the Payment Plug-in Controller to obtain additional data the plug-in intends to store on these containers.
For example, if a FinancialException is thrown by a plug-in during the processing of the method approve, the plug-in should add the relevant information associated with Payment. It should include: the reason code, the reference number, tracking ID. The plug-in might also need to record additional extended data in the FinancialTransaction. This information is extremely relevant and should allow the Customer Support personnel to solve the failure situation.
If a plug-in throws an exception that extends directly from PluginException, the Payment Plug-in Controller will not persist any transactional data. It will roll back any changes. Plug-in writers should use this feature with caution. Predefined exceptions extending PluginException are recommended instead.
In the predefined exceptions, the following exceptions will cause Payment Plug-in Controller to roll back any change in database:
Plug-ins should not log exceptions since the Payment Plug-in Controller or other higher components will take care of the task. The exception and all its associated contextual information will be logged.
If there is any specific information that needs to be added to an exception, plug-ins can add it through addProperties(Map), addProperties(Properties) or addProperty(String, Object).
Constructor and Description |
---|
PluginException()
This method is the default constructor.
|
PluginException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText)
This method is the constructor with a localized message.
|
PluginException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText, java.lang.Throwable exception)
This method constructor with a localized message and a chained exception.
|
PluginException(java.lang.Throwable exception)
This method is the constructor with a chained exception.
|
Modifier and Type | Method and Description |
---|---|
Credit | getCredit()
This method gets the Credit container associated with the exception context.
|
FinancialTransaction | getFinancialTransaction()
This method gets the FinancialTransaction container associated with the exception.
|
Payment | getPayment()
This method gets the Payment container associated with the exception context.
|
PaymentInstruction | getPaymentInstruction()
This method gets the PaymentInstruction container associated with the exception.
|
void | setCredit(Credit theCredit)
This method sets the Credit container.
|
void | setFinancialTransaction(FinancialTransaction thePaymentTransaction)
This method sets the PaymentTransaction container associated with the exception context.
|
void | setPayment(Payment thePayment)
This method sets the Payment container associated with the exception context.
|
void | setPaymentInstruction(PaymentInstruction thePaymentInstruction)
This method sets the PaymentInstruction container associated with the exception context.
|
public PluginException()
This method is the default constructor.
public PluginException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText)
This method is the constructor with a localized message.
public PluginException(java.lang.String resourceBundleName, java.lang.String messageKey, java.lang.Object[] formatArguments, java.lang.String defaultText, java.lang.Throwable exception)
This method constructor with a localized message and a chained exception.
public PluginException(java.lang.Throwable exception)
This method is the constructor with a chained exception.
public void setCredit(Credit theCredit)
public Credit getCredit()
This method gets the Credit container associated with the exception context.
The Credit container might not be present.
public void setPayment(Payment thePayment)
public Payment getPayment()
This method gets the Payment container associated with the exception context.
The Payment container might not be present.
public void setPaymentInstruction(PaymentInstruction thePaymentInstruction)
public PaymentInstruction getPaymentInstruction()
The PaymentInstruction container might not be present.
public void setFinancialTransaction(FinancialTransaction thePaymentTransaction)
public FinancialTransaction getFinancialTransaction()
The FinancialTransaction container might not be present.