public interface QueryablePlugin extends Plugin
This interface is implemented by payment plug-ins that support financial queries.
In general, the Payment Plug-in Controller manages the state of financial objects for plug-ins. However, if the payment back-end system supports real time queries, the plug-in writer might want to leverage this capability by implementing this interface.
This approach has the advantage to provide real-time and up-to-date status of financial objects (payments and credits). However, it causes more network connectivity than it may otherwise be required.
If the payment back-end system does not support real-time queries then this interface should not be implemented.
When a plug-in implements this interface but some of the query methods are not supported by the back-end system, the plug-in should throw FunctionNotSupportedException in these methods.
When the Payment Plug-in Controller invokes a plug-in query method and receives a FunctionNotSupportedException, it uses its own persisted information to process the query request. For example, if getCredit(PluginContext, Credit) is invoked, and FunctionNotSupportedException is thrown, the Payment Plug-in Controller will use its own information regarding the target Credit container.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal | getAvailableBalance(PluginContext pluginContext, PaymentInstruction paymentInstruction)
This method gets the available balance for the specified PaymentInstruction account.
|
Credit | getCredit(PluginContext pluginContext, Credit credit)
This method refreshes the current attributes of the Credit container.
|
Payment | getPayment(PluginContext pluginContext, Payment payment)
This method refreshes the current attributes of the Payment container.
|
static final java.lang.String COPYRIGHT
java.math.BigDecimal getAvailableBalance(PluginContext pluginContext, PaymentInstruction paymentInstruction) throws PluginException, java.rmi.RemoteException
This method gets the available balance for the specified PaymentInstruction account.
This methods is typically used for stored-value cards, gift cards, gift certificates or credit line (or line of credit) implementations.
Credit getCredit(PluginContext pluginContext, Credit credit) throws PluginException, java.rmi.RemoteException
This method refreshes the current attributes of the Credit container.
The Payment Plug-in controller provides a fully pre-populated Credit container as input. The plug-in determines which attributes have changed and updates those attributes on the returned object.
Note that the Credit parameter can be used as the object to be returned. However, only the changes made on the actual returned Credit container object will be processed. Changes in the container parameter passed in will be ignored.
Payment getPayment(PluginContext pluginContext, Payment payment) throws PluginException, java.rmi.RemoteException
This method refreshes the current attributes of the Payment container.
The Payment Plug-in Controller provides a fully pre-populated Payment container as input. The plug-in determines which attributes have changed and updates those attributes on the returned object.
Note that the Payment parameter can be used as the object to be returned. However, only the changes made on the actual returned Payment container object will be processed. Changes in the container parameter passed in will be ignored.